peapod Posted July 15, 2020 Share Posted July 15, 2020 Hi All, Having never learned machine language of any kind, I think it's about time to start. Is there a recommended Assembler/Compiler combo/suite I should be using? regards P 1 Quote Link to comment Share on other sites More sharing options...
0 SlithyMatt Posted July 15, 2020 Share Posted July 15, 2020 cc65 is what is used to build the X16 ROM, and I have been using it for all of my projects. Works very well, and flexible enough to use for any 6502-based platform. https://github.com/cc65/cc65 1 Quote Link to comment Share on other sites More sharing options...
0 StephenHorn Posted July 15, 2020 Share Posted July 15, 2020 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). 1 Quote Link to comment Share on other sites More sharing options...
0 izb Posted July 15, 2020 Share Posted July 15, 2020 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. 1 Quote Link to comment Share on other sites More sharing options...
0 peapod Posted July 15, 2020 Author Share Posted July 15, 2020 (edited) @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 July 15, 2020 by peapod 2 Quote Link to comment Share on other sites More sharing options...
0 Jestin Posted July 17, 2020 Share Posted July 17, 2020 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. 1 Quote Link to comment Share on other sites More sharing options...
0 paradoxnj Posted May 21 Share Posted May 21 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. 1 Quote Link to comment Share on other sites More sharing options...
0 rje Posted May 21 Share Posted May 21 Since most of my X16 coding is in C using cc65, it's a given that I use cc65 for what little assembly I do. Quote Link to comment Share on other sites More sharing options...
0 desertfish Posted May 22 Share Posted May 22 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. Quote Link to comment Share on other sites More sharing options...
0 Super Administrators TomXP411 Posted May 23 Super Administrators Share Posted May 23 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. Quote Link to comment Share on other sites More sharing options...
0 geek504 Posted Wednesday at 08:32 PM Share Posted Wednesday at 08:32 PM I use xa/xa65 which is Andre Fachat's open-source 6502 cross assembler. Tiny and portable to any system. Quote Link to comment Share on other sites More sharing options...
0 ZeroByte Posted Wednesday at 09:33 PM Share Posted Wednesday at 09:33 PM (edited) 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 Wednesday at 09:33 PM by ZeroByte Quote Link to comment Share on other sites More sharing options...
Question
peapod
Hi All,
Having never learned machine language of any kind, I think it's about time to start.
Is there a recommended Assembler/Compiler combo/suite I should be using?
regards
P
Link to comment
Share on other sites
11 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.