26 January 2020, 16:03 | #1 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,164
|
vasm bug with ORG directives
I think i found something on version 1.8f
test.asm: Code:
LEVEL1 ORG $400 dc.b "ABCD" org $500 dc.b "EFGH" assemble with vasmm68k_mot -devpac -nosym -Fbin -o out test.asm Open "out" with a text editor: the second "org" isn't at offset $100 of the file but at offset $500 !!! now if you define LEVEL1 like: LEVEL1 EQU 0 it works properly ! |
26 January 2020, 19:06 | #2 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
|
Sure. Because in that case the situation is completely different. With the EQU your program starts with an ORG, so everything is as you expect. But with a label called LEVEL1 the assembler automatically starts a relocatable code section (default attributes: section CODE,code).
An ORG directive within a SECTION is handled as a "relocated Org". Which means all code following that ORG is assembled absolutely for the given address, but placed within that section. Usually you will switch back with a SECTION directive. The behaviour for a second ORG following it is undefined. Seems that it works like a real ORG instead, which regards a relocatable code section as being located at $0. Not sure if this is a bug. But I guess you really wanted to start the program with an ORG and not with a label/section. |
26 January 2020, 19:09 | #3 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,164
|
I see your point! thanks. No big deal anyway. Bad habit to define constants without values then as the asm assumes they're labels.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Issues with ORG directive (vasm + FS-UAE) | Maggot | Coders. Asm / Hardware | 15 | 05 September 2023 11:56 |
assemblers LOAD & ORG directives | jotd | Coders. Asm / Hardware | 4 | 26 January 2020 16:00 |
CMake and vasm | sparhawk | Coders. General | 9 | 30 November 2019 21:04 |
Bug in x64 file requester and bug in Blizzard PPC ROM filesize | headkase | support.WinUAE | 5 | 26 June 2016 14:17 |
vasm question | marduk_kurios | Coders. Asm / Hardware | 7 | 14 February 2014 20:06 |
|
|