Assemblers You Use

Ask anything your want about Megadrive/Genesis programming.

Moderator: BigEvilCorporation

r57shell
Very interested
Posts: 478
Joined: Sun Dec 23, 2012 1:30 pm
Location: Russia
Contact:

Post by r57shell » Fri May 02, 2014 9:40 am

MintyTheCat wrote:Yes, but that's for asm68k and he wants GAS' Org. Also, you had better tab that Org directive :lol:
I was talking about asm68k. And I always use space instead of tab for indent.
Image

Nemesis
Very interested
Posts: 791
Joined: Wed Nov 07, 2007 1:09 am
Location: Sydney, Australia

Post by Nemesis » Fri May 02, 2014 11:50 am

r57shell wrote:
Nemesis wrote:If you just run it without parameters and check the usage instructions, you'll probably see a few lines I inserted at the top there explaining the edit.

Code: Select all

SN 68k version 2.53

Copyright (c) 1988-1997 S.N. Systems Software Limited,  all rights reserved

USAGE : asm68k /options source,object,symbol,listing,temporary file
.....................
This is working:

Code: Select all

 org $0
 incbin 'qwe asd zxc'
 include 'qwe asd zxc'
 dc.l filesize('qwe asd zxc')
Yeah that works, the incbin and include commands don't have issues, but try putting a space in the main source filename itself and you'll have a problem. Putting quotes around the filename on the command line won't work either. This is more of a problem when you have the compiler at a central location and pass a full path to your source files on the command line because that path now can't contain spaces either. Even if you don't do that though, and you just have the assembler in the same folder as the main source file, try placing the source and assembler in a subdirectory where the total parent directory path length is over 90 characters. You'll find it'll mess up the path handling and won't find the source file. 90 characters isn't very long by today's standards. Just something like "D:\Emulation\Source\Mega Drive" is already over 30.

These two problems were enough of a headache for me and other people at the time that I patched the binary to improve the path handing. The patched version seems to have become more common, you can download it from here:
http://info.sonicretro.org/File:ASM68k.7z

Since I patched this assembler, there seem to be more 68k assemblers available, but I've stuck with asm68k.exe because it did everything I needed, and it was compatible with the syntax used in the older source files I was working with.

Post Reply