Page 1 of 1

snasm68k sections and alignment

Posted: Thu May 08, 2008 11:28 am
by Pascal
hello all,

i got a problem with snams68k, i'm working with section and it complains every time i'm trying to align at 256 bytes (or any value other than 2), i get this error

Code: Select all

cart2.asm(76) : Error 03041 : Cannot align to 256 boundary, section is 2 aligned
i tried with cnop 0,256 not better. anyone got a idea ??

please no "use asmx" :p my project is pretty huge and my debugger supports only snasm68k.

thanks

EDIT !

i found the switch SA, that i want to disable

snasm68k /Q sa- /L -O V+,C+,M+,W+,AE+ cart2.asm,demo,demo,demo
snasm68k /Q sa- /P -O V+,C+,M+,W+,AE+ main.lnk, demo.bin

but even with that switch, compiler want to align to the section boundaries :s

Posted: Thu May 08, 2008 12:14 pm
by TmEE co.(TM)

Code: Select all

SNASM68K -P -O OP+,OS+,OW+,OZ+,OAQ+,OSQ+,OMQ+  TMFPLAY.ASM, TMFPLAY.BIN
What I use.... no problems so far

EDIT : that's not useful....

Posted: Thu May 08, 2008 12:41 pm
by Pascal
TmEE co.(TM) wrote:

Code: Select all

SNASM68K -P -O OP+,OS+,OW+,OZ+,OAQ+,OSQ+,OMQ+  TMFPLAY.ASM, TMFPLAY.BIN
What I use.... no problems so far

EDIT : that's not useful....
that's the first thing i looked ;)

Posted: Thu May 08, 2008 2:13 pm
by Sik
Does SNASM68K have its custom debugging format? Otherwise you could use ASM68K, which is exactly the same, except it's the original program :P It uses the same instruction set, the same parameters (except you use a slash instead of a hyphen) and seems to be more stable. Make sure you try the Windows version, not the DOS one :P (the one at my page is the Windows version, yup).

Anyways, no idea :/ And I'm not sure how much I could be able to help here because I don't use linking, simply too complex for me, I leave that to a compiler :P Instead I use my own method for making a ROM from several executables (namely having a separate ASM file that includes the rest :P this also allows me to specify the exact order for the files in the ROM).

Posted: Thu May 08, 2008 2:26 pm
by Pascal
no, my debugger rely on how snasm68k is outputing the symbol table, not some kind of elf :p

Posted: Thu May 08, 2008 9:02 pm
by Chilly Willy
Pascal wrote:no, my debugger rely on how snasm68k is output the symbol table, not some kind of elf :p
Well, asmx is open source. If someone knows how snasm68k outputs that symbol table, it could be added to asmx.

Posted: Fri May 09, 2008 7:00 am
by Pascal
Chilly Willy wrote:
Pascal wrote:no, my debugger rely on how snasm68k is output the symbol table, not some kind of elf :p
Well, asmx is open source. If someone knows how snasm68k outputs that symbol table, it could be added to asmx.
that's the gud point of asmx, but i'd have prefer to spend my time on the code of my game ;)

anyway, asmx rely on unix command line parser. i wasn't able to recompile it :s

Posted: Sat May 10, 2008 6:32 am
by Chilly Willy
I believe you have to compile it with cygwin or mingw when on Windows. It compiles fine in Ubuntu, but you'd expect that. :)

Posted: Sat May 10, 2008 2:36 pm
by Pascal
thanks, i was able to recompile it, if i remove all the command line parsing stuff.

i gonna work on a SN syntax, compatibility :)

Posted: Mon May 12, 2008 12:46 pm
by 8bitwizard
Pascal wrote:thanks, i was able to recompile it, if i remove all the command line parsing stuff.

i gonna work on a SN syntax, compatibility :)
... or you could find source for getopt() ? It can't be that hard.