Jump to content
  • 0

Preferred Assembler for X16 Dev


peapod
 Share

Question

11 answers to this question

Recommended Posts

  • 0

Personally, I cut my teeth on ACME, which is a fairly simple assembler that I still feel is good for introducing yourself to assembly programming, though I personally grew out of it fairly quickly (I specifically ran into issues with ACME's macro system). ACME's biggest selling point is that it's dead simple to use for 6502 programming: You type a source file, it outputs exactly what you typed, in the exact order as the source file. It has a few niceties like macros, but you have to insert your own file header if you're planning to load an "auto-launching" program into the X16.

That having been said, my favorite assembler right now is CC65, which is a more full-featured assembler and linker, and a C compiler besides. It will put in the program header for you, and supports "segments", which is to say that you direct the compiler what section of the file certain pieces of source code should go into, and it'll obey that and group the associated blocks of stuff together. This is because it's conventional to do things like keep all of your machine language in one part of a file, and all of your static variables in another part, your runtime variables in their own part of the file, etc., etc. CC65 also has much better support for addressing complex structs (though I'll admit it could still be substantially improved).

  • Thanks 1
Link to comment
Share on other sites

  • 0

I tried acme and I really liked it. It’s definitely the easiest to pick up and feels quite flexible. I ended up settling on cc65 though. It turns out that more than once I’ve been stuck and thought “I wonder what the ROM code would do?..” and that’s been pretty valuable in itself; having another cc65 project to refer to.

 

  • Thanks 1
Link to comment
Share on other sites

  • 0

 @StephenHorn & @SlithyMatt & @izb

I did look at acme as i saw a couple of you tube videos by Brent Farris last night and his explanation for a complete newb were good,  I'll look at cc65 today to see if i can make head to tail of it.

Besides no point swimming against the current if the flow is cc65.

Thanks again gents

Edited by peapod
  • Like 2
Link to comment
Share on other sites

  • 0

I've been using ACME for a project of mine, but I agree that I'm starting to outgrow it.  As was said above, it is dead simple, so for getting started it's a great option.  I plan on diving into ca65 at some point too, but I haven't had a good reason to just yet.  I think the main hold-up is having to rewrite my macros.

  • Thanks 1
Link to comment
Share on other sites

  • 0

I've been using Kick Assembler which is a Java based assembler that is for the C64.  Since the CX16 uses the C64 ROM, it has been fully compatible so far.  It has a very nice macro language that makes things easier for beginners.

  • Like 1
Link to comment
Share on other sites

  • 0

I guess I'm the odd one out 🙂  
I'm using 64tass.  It's the cross assembler version of what used to be turbo assembler/ turbo macro pro on the C64 natively in the past. 
It has a few nice features that I make use of in the code generation backend of the Prog8 compiler.  Like automatically rewriting branch statements into a jmp when the branch offset gets too large, or vice versa, and automatically eliminating unused code blocks.  It does lack a "linker" step so can't be easily integrated with code coming from elsewhere.

Link to comment
Share on other sites

  • 0
  • Super Administrators
On 5/22/2022 at 6:41 AM, desertfish said:

I guess I'm the odd one out 🙂  
I'm using 64tass.  It's the cross assembler version of what used to be turbo assembler/ turbo macro pro on the C64 natively in the past. 
It has a few nice features that I make use of in the code generation backend of the Prog8 compiler.  Like automatically rewriting branch statements into a jmp when the branch offset gets too large, or vice versa, and automatically eliminating unused code blocks.  It does lack a "linker" step so can't be easily integrated with code coming from elsewhere.

You're not that odd. It's what I use, too. It's not just a good assembler, but the easiest one to include in your projects, since it doesn't have any extra dependencies or really require "installation". You just toss the 64tass.exe in a directory with your project, and you're good to go. 

 

Link to comment
Share on other sites

  • 0

I like cc65 for its linker. It's super easy to let the linker decide where everything goes in memory once you let go of using .org in your programs. Plus, it makes hybrid C/ASM projects very easy to do as well, since it can pass symbols between the two environments, etc.

Once I got over how to accept __fastcall__ calls from C in the assembly side, and how to pass back return values, it was off to the races. Now I can easily code my way through C and when I hit a function that needs to be done in asm, I just declare it in C with a prototpe such as: unsigned int __fastcall__ times2 (char x);
Then in assembly:

.export _times2

_times2:
  ASL ; fastcall puts the rightmost parameter in .AX
  TAY
  LDA #0
  ROL
  TAX ; put the high byte in X
  TYA ; restore the low byte into A
  RTS ; return to C

Edited by ZeroByte
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.

Guest
Answer this question...

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

 Share

×
×
  • Create New...

Important Information

Please review our Terms of Use