Jump to content
IGNORED

Mac OS X Leopard Cross-Assembler/Disassembler?


flashjazzcat

Recommended Posts

Hi

 

I use ATasm which is is MAC/65 compatible for compiling. I'm still relearning assembly so I haven't tried to use it for any kind of large project.

 

Info is here : ATasm but IIRC there's no Mac binary, I built it from source. It's trivial if you have XCode (gcc) installed but if you need a binary PM me and I'll send you mine.

 

Having just looked at MADS it should be possible to build that for Mac too. I'll have a crack at it in a moment. I stayed away from MADS because of the lack of English docs but I know it's supposed to be very powerful.

Link to comment
Share on other sites

Just built a MADS binary on OSX 10.5. If anyone wants it I can post it here. Could also post ATasm binary of anyone wants it. I just looked at xasm and it's written in D. There's a gcc add in D compiler for OSX so I could give that one a whirl too if anyone is interested.

Edited by spookt
Link to comment
Share on other sites

Just built a MADS binary on OSX 10.5. If anyone wants it I can post it here. Could also post ATasm binary of anyone wants it. I just looked at xasm and it's written in D. There's a gcc add in D compiler for OSX so I could give that one a whirl too if anyone is interested.

 

Thanks! I for one would be very interested in MADS and ATasm Mac binaries (I haven't looked into how to build them from source yet).

Link to comment
Share on other sites

OK, here we go. To save space these zips contain binaries only. If there are files you'd like that are supplied with the original distributions - demo code, source etc please get the distributions from here (ATasm) or here (MADS). The binaries were built on OS X 10.5.5 using Apple's GCC for ATasm and the Free Pascal Compiler from fink for MADS.

 

Atasm - ATasm_1.05b_OSX.zip

 

MADS - mads_1.8.4_OSX.zip

 

Hope they're useful !

 

I might try to get D working on my Mac so I can build XASM just for completeness :) Anyone know of a good 6502 disassembler for OS X?

 

EDIT:D works ! Here is XASM - xasm_3.0.1_OSX.zip

 

The XASM homepage is here. Enjoy!

Edited by spookt
  • Like 1
Link to comment
Share on other sites

Anyone know of a good 6502 disassembler for OS X?

The CC65 toolkit contains a disassembler (DA65) and by joining the mailing list any help you may need with it would be answered there. Obviously its output is more directed to being re-assembled with the CA65 assembler and I'd advise you take a look at that as an option for an assembler too as its features pretty much mirror those available in the other assemblers and a few us are using it for A8 projects so feel free to ask here if you need help.

 

Regards,

Mark

Link to comment
Share on other sites

Mac book plus XP? na, come on... that doesn't look right... ;)

 

I most certainly don't sully my Macs with Windows ;) Actually the kids have an old windows PC which I use for anything that I can't do on Mac (usually one thing - I need to use Microsoft Publisher files once a week and NOTHING else in the universe reads MS Publisher :x ) I guess I could use BootCamp or Parallels to run XP on my Mac but TBH it just as easy to boot the kids PC up.

Edited by spookt
Link to comment
Share on other sites

Can anyone recommend a 6502 cross-assembler for Mac OS X? I'm running Vista and Leopard, but I prefer the Atari800MacX emulator and I wondered if there were any programming tools I could use without switching Operating Systems.

 

The CC65 tools are quite nice. I compiled the suite for Mac OS X and then reconfigured Xcode to use them.

 

Good times.

 

You can get CC65 here: http://www.cc65.org/

Link to comment
Share on other sites

+1 for MADS - it's the best assembler around, has active development, provides lots of (often not really useful, but cool nevertheless) addons, and works like a charm on MacOSX.

 

For coding, I recommend jEdit - with some plugins it is a very powerful and customizable editor.

 

Oh, did I mention this is how Yoomp! was written? jEdit + MADS + MacOSX :)

Edited by eru
Link to comment
Share on other sites

anyone feel like giving a complete n00b a quick tutorial on how to get one of these working on my Mac? i'm completely lost. i have the developer stuff installed on my Mac (Xcode, Darwin, etc.) i just don't know where to start.... :P

 

The compilers I posted here are all command line utils. I'm guessing you could integrate them with XCode but I've not tried. If you open a Terminal window you can run each one without arguments (or if that doesn't work try with -h)to see the usage. Here's atasm for example :

 

PrometheusII:bin paul$ ./atasm -h
ATasm 1.05 beta (A mostly Mac65 compatible 6502 cross-assembler)

Usage: ./atasm [-v] [-s] [-r] [-d[symbol=value] [-o[fname.out] [-m[fname.state]] <fname.m65>
 where  -v: prints assembly trace
	 -s: prints symbol table
	 -u: enables undocumented opcodes
	 -m[fname]: defines template emulator state file
	 -x[fname]: saves object file to .XFD/.ATR disk image [fname]
	 -r: saves object code as a raw binary image
	 -f[value]: set raw binary fill byte to [value]
	 -o[fname]: saves object file to [fname] instead of <fname>.65o
	 -d[symbol=value]: pre-defines [symbol] to [value]
	 -Idirectory: search [directory] for .INCLUDE files
PrometheusII:bin paul$

 

So if I had a source file called test.m65 I could try to compile it like this:

 

atasm test.m65 -otest.com

 

Which gives me an atari binary file called test.com. Atasm also allows compling to an atr image. The atr must already exist and have DOS 2 compatible format I think:

 

PrometheusII:atari paul$ atasm105/bin/atasm test.m65 -otest.com -xtest1.atr
ATasm 1.05 beta (A mostly Mac65 compatible 6502 cross-assembler)
Pass 1: Success. (0 warnings)
Pass 2: Success. (0 warnings)

Assembly successful
 Compiled 9 bytes (~0k)
Block: 0600-0608 (9 bytes)

Compiled to binary file 'test.com'
Binary file 'test.com' saved to .ATR image 'test1.atr'

 

That's basic usage of atasm. Each compiler has it's own options and arguments, you can check the documentation for each one for the specifics. Hope that helps.

Link to comment
Share on other sites

  • 1 year later...

thanks a lot for providing binaries for MAC OS X.

 

But...

 

Since I am not able to compile myself (a step-by-step manual for mac os x might be handy), I can not compile newer versions.

 

I would like to have newest version of MADS (1.9 at the moment) and I don't know how to create that myself.

 

Anyone wanting to create from time to time newest version of these crossassemblers for OS X and post them here?

 

thanks a lot!

Marius

Link to comment
Share on other sites

thanks a lot for providing binaries for MAC OS X.

 

But...

 

Since I am not able to compile myself (a step-by-step manual for mac os x might be handy), I can not compile newer versions.

 

I would like to have newest version of MADS (1.9 at the moment) and I don't know how to create that myself.

 

Anyone wanting to create from time to time newest version of these crossassemblers for OS X and post them here?

 

thanks a lot!

Marius

 

Hey Marius!

 

I'm at work at the moment (a server crash dragged me here - now waiting 2 hours for parts to arrive :x ) but I can try to build MADS later when I get home. I'll also try to remember to post how I did it. So if no one beats me to it check back later ;)

Edited by spookt
Link to comment
Share on other sites

Hey Marius!

 

I'm at work at the moment (a server crash dragged me here - now waiting 2 hours for parts to arrive :x ) but I can try to build MADS later when I get home. I'll also try to remember to post how I did it. So if no one beats me to it check back later ;)

 

That would be VERY kind of you!!

 

I found out I had to install free pascal compiler, but when I did that my Intel Mac was not able to compile the 1.9 version. I got a strange error, and I don't know what to do with it. I'm not sure if my Mac has all the requierd installation of that Pascal thing. I really don't understand a thing of compilers on PC or Mac. Strange eh? I can do a lot of things on my Atari in Assembler, but as soon as it is programming and compiling on PC/Mac I am clueless.

 

After trying I started my iBook G4 and on that I wasn't even able to install the Pascal thing at all. And I did download the PowerPC version of it.

 

I'm afraid I will get the same (negative) result on my iMac G5 too. So I'll wait for your help, which is very appreciated! Thanks.

 

Marius

Link to comment
Share on other sites

OK finally got this to compile. Looks like a load of the GNU tools (particularly the assembler "as") got removed when I upgraded to Snow Leopard. I reinstalled XCode and then just used the fpc line from the top of the mads source.

 

So here's the current version of Mads for OS X :

 

PrometheusII:Mads paul$ ./mads
mads 1.9.0
Syntax: mads source [switches]
-b:address	Generate binary file at specific address
-c		Label case sensitivity
-d:label=value	Define a label
-f		CPU command at first column
-hc[:filename]	Header file for CC65
-hm[:filename]	Header file for MADS
-i:path		Additional include directories
-l[:filename]	Generate listing
-m:filename	File with macro definition
-o:filename	Set object file name
-p		Print fully qualified file names in listing and error messages
-s		Silent mode
-t[:filename]	List label table
-x		Exclude unreferenced procedures
-vu		Verify code inside unreferenced procedures
-u		Warn of unused labels

 

mads.zip

Link to comment
Share on other sites

OK finally got this to compile. Looks like a load of the GNU tools (particularly the assembler "as") got removed when I upgraded to Snow Leopard. I reinstalled XCode and then just used the fpc line from the top of the mads source.

 

So here's the current version of Mads for OS X :

 

PrometheusII:Mads paul$ ./mads
mads 1.9.0
Syntax: mads source [switches]
-b:address	Generate binary file at specific address
-c		Label case sensitivity
-d:label=value	Define a label
-f		CPU command at first column
-hc[:filename]	Header file for CC65
-hm[:filename]	Header file for MADS
-i:path		Additional include directories
-l[:filename]	Generate listing
-m:filename	File with macro definition
-o:filename	Set object file name
-p		Print fully qualified file names in listing and error messages
-s		Silent mode
-t[:filename]	List label table
-x		Exclude unreferenced procedures
-vu		Verify code inside unreferenced procedures
-u		Warn of unused labels

 

mads.zip

 

cool! need to throw it on my macs... ;)

Link to comment
Share on other sites

OK finally got this to compile. Looks like a load of the GNU tools (particularly the assembler "as") got removed when I upgraded to Snow Leopard. I reinstalled XCode and then just used the fpc line from the top of the mads source.

 

Hey!

 

you are too good!

 

I managed to get further in the Compile process myself too. But I got stuck somewhere. Now I find out that your compilations of this Asssembler won't work on PPC. And I'm trying to compile on PPC too. I get some message that the source can't be compiled for desired platform. How is that possible? Isn't it possible to get MADS working on PPC?

 

Except on Virtual PC ofcourse. But I mean native on PPC.

 

I hope you can help me on that... or perhaps you can confirm it is not possible on PPC to run MADS.

 

thanks again for the MADS 1.9.0 ... I have Intel Mac too so I can use it anyway. (but my Laptop is PPC, and I'd love to crosscompile on iBook G4 :D )

 

Marius

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...