Jump to content

Photo

Mac OS X Leopard Cross-Assembler/Disassembler?


38 replies to this topic

#1 flashjazzcat ONLINE  

flashjazzcat

    Quadrunner

  • 14,183 posts
  • Location:United Kingdom

Posted Mon Dec 1, 2008 3:07 AM

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.

#2 spookt OFFLINE  

spookt

    Stargunner

  • 1,789 posts
  • This is SPARTA(DOS)
  • Location:Sunderland, UK

Posted Mon Dec 1, 2008 4:59 AM

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.

#3 spookt OFFLINE  

spookt

    Stargunner

  • 1,789 posts
  • This is SPARTA(DOS)
  • Location:Sunderland, UK

Posted Mon Dec 1, 2008 5:24 AM

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, Mon Dec 1, 2008 5:28 AM.


#4 flashjazzcat ONLINE  

flashjazzcat

    Quadrunner

  • Topic Starter
  • 14,183 posts
  • Location:United Kingdom

Posted Mon Dec 1, 2008 6:13 AM

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).

#5 spookt OFFLINE  

spookt

    Stargunner

  • 1,789 posts
  • This is SPARTA(DOS)
  • Location:Sunderland, UK

Posted Mon Dec 1, 2008 6:34 AM

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 - Attached File  ATasm_1.05b_OSX.zip   37.22KB   322 downloads

MADS - Attached File  mads_1.8.4_OSX.zip   154KB   349 downloads

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 - Attached File  xasm_3.0.1_OSX.zip   189.91KB   341 downloads

The XASM homepage is here. Enjoy!

Edited by spookt, Mon Dec 1, 2008 7:00 AM.


#6 flashjazzcat ONLINE  

flashjazzcat

    Quadrunner

  • Topic Starter
  • 14,183 posts
  • Location:United Kingdom

Posted Mon Dec 1, 2008 7:08 AM

Brilliant! Thank you so much for those :) Can't wait to try them later.

Anyone know of a good 6502 disassembler for OS X?


I'll second that question. I've been searching the net for one but haven't managed to find one yet. Anyone?

#7 Wrathchild OFFLINE  

Wrathchild

    River Patroller

  • 2,129 posts
  • Location:Reading, UK.

Posted Mon Dec 1, 2008 7:10 AM

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

#8 spookt OFFLINE  

spookt

    Stargunner

  • 1,789 posts
  • This is SPARTA(DOS)
  • Location:Sunderland, UK

Posted Mon Dec 1, 2008 7:19 AM

... and cc65 is available straight from fink :) (<me> Hits control-C on the Terminal window running build of cc65 from source !)

#9 Heaven/TQA OFFLINE  

Heaven/TQA

    Quadrunner

  • 11,127 posts
  • Location:Baden-Württemberg, Germany

Posted Mon Dec 1, 2008 9:52 AM

cool. cool... Tebe should put the binaries on his mads.atari8.info website...

so...finally I can get a mac... ;)

#10 spookt OFFLINE  

spookt

    Stargunner

  • 1,789 posts
  • This is SPARTA(DOS)
  • Location:Sunderland, UK

Posted Mon Dec 1, 2008 9:58 AM

so...finally I can get a mac... ;)


C'mon you know it makes sense ;) - Actually I run XP, OS X and Linux as well as my Ataris but then I am a geek :) My main machine is a Mac though.

#11 Heaven/TQA OFFLINE  

Heaven/TQA

    Quadrunner

  • 11,127 posts
  • Location:Baden-Württemberg, Germany

Posted Mon Dec 1, 2008 10:57 AM

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

#12 spookt OFFLINE  

spookt

    Stargunner

  • 1,789 posts
  • This is SPARTA(DOS)
  • Location:Sunderland, UK

Posted Mon Dec 1, 2008 11:34 AM

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, Mon Dec 1, 2008 11:34 AM.


#13 Allan OFFLINE  

Allan

    Quadrunner

  • 6,261 posts
  • Location:Wallingford, CT

Posted Mon Dec 1, 2008 11:35 AM

Damn you! I just started to get into learning Spartados X and then you throw these at me. :) Very cool and thank you. I can't wait to try out these compilers on my Mac.

Allan

#14 mellis OFFLINE  

mellis

    Moonsweeper

  • 275 posts
  • Location:Sarasota, FL

Posted Mon Dec 1, 2008 11:56 AM

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/

#15 eru OFFLINE  

eru

    Chopper Commander

  • 199 posts
  • Location:Amsterdam, The Netherlands

Posted Mon Dec 1, 2008 2:32 PM

+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, Mon Dec 1, 2008 2:33 PM.


#16 athleos OFFLINE  

athleos

    Star Raider

  • 85 posts
  • Location:Seattle, WA

Posted Mon Dec 1, 2008 8:01 PM

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

#17 Heaven/TQA OFFLINE  

Heaven/TQA

    Quadrunner

  • 11,127 posts
  • Location:Baden-Württemberg, Germany

Posted Tue Dec 2, 2008 2:34 AM

Marcin, Yoomp was written on a MAC? Jesus... ;)

#18 spookt OFFLINE  

spookt

    Stargunner

  • 1,789 posts
  • This is SPARTA(DOS)
  • Location:Sunderland, UK

Posted Tue Dec 2, 2008 2:50 AM

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.

#19 athleos OFFLINE  

athleos

    Star Raider

  • 85 posts
  • Location:Seattle, WA

Posted Tue Dec 2, 2008 11:34 AM

yes! that helps a lot! thank you very much!

#20 Marius OFFLINE  

Marius

    River Patroller

  • 4,759 posts
  • Location:Netherlands

Posted Tue Dec 29, 2009 6:18 AM

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

#21 spookt OFFLINE  

spookt

    Stargunner

  • 1,789 posts
  • This is SPARTA(DOS)
  • Location:Sunderland, UK

Posted Tue Dec 29, 2009 7:36 AM

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, Tue Dec 29, 2009 7:36 AM.


#22 Marius OFFLINE  

Marius

    River Patroller

  • 4,759 posts
  • Location:Netherlands

Posted Tue Dec 29, 2009 8:33 AM

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

#23 spookt OFFLINE  

spookt

    Stargunner

  • 1,789 posts
  • This is SPARTA(DOS)
  • Location:Sunderland, UK

Posted Wed Dec 30, 2009 5:07 PM

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

Attached File  mads.zip   188.12KB   200 downloads

#24 Heaven/TQA OFFLINE  

Heaven/TQA

    Quadrunner

  • 11,127 posts
  • Location:Baden-Württemberg, Germany

Posted Thu Dec 31, 2009 1:07 AM

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

Attached File  mads.zip   188.12KB   200 downloads


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

#25 Marius OFFLINE  

Marius

    River Patroller

  • 4,759 posts
  • Location:Netherlands

Posted Thu Dec 31, 2009 2:41 AM

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




0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users