I'm trying to write a binary file using vasm68k_mot (Motorola 68k) writing File-Size and File-Offset everything goes well, except that M68K is Big-Endian, there's a way I can change to Little-Endian in a simple way?
Let's say that the FileZ.bin has a size of 30Kb, this in hex should be 0x7530 in my binary file it writes in hex value "00 00 75 30", but I need to mirror that value to "30 75 00 00" The same applies for the file offset address.
I'm sorry if this is confusing, I'm not a programmer nor expert in ASM.
My code is like this:
dc.l 0,(FILEY_END-FILEY_START)
dc.l FILEZ_START,(FILEZ_END-FILEZ_START)
dc.l FILEX_START,(FILEX_END-FILEX_START)
cnop 0,2048
FILEZ_START
incbin C:\FileZ.BIN
FILEZ_END
cnop 0,2048
FILEX_START
FILEY_START
incbin C:\FileY.BIN
FILEY_END
cnop 0,2048
incbin C:\FileX.bin
FILEX_END
EDIT: The documentation provided by @AlexHajnal is the same i'm using, thank you! I also will link it here: http://sun.hasenbraten.de/vasm/release/vasm.pdf
EDIT: All I need to is SWAP those "dc.l" values, they are 4 bytes long, I tried writing
ROL.W #8,D0
SWAP D0
ROL.W #8,D0
but i got some random numbers, it may be related to vasmm68k_mot, but i really don't know....
dc.l FILEY_START,(FILEY_END-FILEY_START)
rather thandc.l 0,(FILEY_END-FILEY_START)
. That's assuming that the first 2kB block contains pointers and lengths within the file.