Page 2 of 3
Re: Help me pick an assembler!
Posted: Fri Apr 15, 2022 1:13 pm
by Sheep64
- Preprocessor directives like #include, #define, #ifdef, etc
It is possible to invoke a C pre-processor separately, for example, to use your favorite assembler with C style directives. The laziest way to do this is cc -E
Re: Help me pick an assembler!
Posted: Sat May 07, 2022 6:47 am
by fachat
Maybe I'm late but there still is xa65. Includes preprocessor statements. Lacks macros but those can be defined with #define.
Anonymous labels are there in my dev branch, maybe you can help me convince Cameron Kaiser to include them
Oh, and xa comes with ubuntu Linux
André
Re: Help me pick an assembler!
Posted: Sat May 07, 2022 6:49 am
by fachat
Having said that, in my personal style I'm still using #ifdef, but not defining constants with the preprocessor anymore. I'm using normal labels instead and have the benefit of scoping (yes xa has scopes defined with .( and .) )
Re: Help me pick an assembler!
Posted: Sat May 07, 2022 9:02 am
by gfoot
I've liked using xa. Local labels were very effective and allowed me to easily define modules with public and private symbols, as well as short range jump targets without needing unique names. It was also easy to export a symbol table for my OS so that programs loaded later from SD card could be built against it.
I need to try ca65 sometime though as I'm sure it can also do all of this too. It's on my bucket list.
Re: Help me pick an assembler!
Posted: Sat May 07, 2022 2:16 pm
by fachat
I think only xa65 and ca65 have the capability to produce relocatable o65 files. I.e. relocatable once on load. I know it's an edge case ...
Re: Help me pick an assembler!
Posted: Wed Jun 08, 2022 6:35 pm
by vbc
I've been using ACME to write code for a 6502 board, and as the project grows I'm running into more issues with how ACME works (such as very odd behavior when separating the project into different files). I'm trying to look at all the assemblers out there but I just feel like I'm missing something.
Hoping for the following:
- Support for 65C02 and 65816
- Runs on/can be compiled on Linux
- Uses as standard syntax as possible
- Preprocessor directives like #include, #define, #ifdef, etc
- Anonymous labels (i.e. +/-). After using this in ACME I don't think I can do without it.
- The option to generate an output binary that includes a block of address space assembled to. I.e. for an EEPROM, I have code at $8000 and vectors at $FFFA..$FFFF and the output is a 32K binary.
Every assembler I come across is lacking one of these, but I'm sure they exist, so... what are y'all using

FYI, Frank just added support for 65816 to vasm. You may want to have a look at the latest daily snapshot at
http://sun.hasenbraten.de/vasm
Re: Help me pick an assembler!
Posted: Wed Jun 08, 2022 7:46 pm
by GARTHWILSON
Are you sure? '816' is not found anywhere on your linked page.
Re: Help me pick an assembler!
Posted: Wed Jun 08, 2022 8:37 pm
by vbc
Are you sure? '816' is not found anywhere on your linked page.
Yes. The support has just been added some days ago. It is not yet included in the release versions and the web page has not been updated, but the daily source snapshot does contain the code.
Re: Help me pick an assembler!
Posted: Thu Jun 09, 2022 8:40 am
by handyandy
Re: Help me pick an assembler!
Posted: Thu Jan 11, 2024 10:35 pm
by 6502user
Hi.
Can you help me also, please?
I'm starting to compile some code with the CCA65's CA65. When I compile it without MAcros, all is working ok. But if I use macros the macros don't be compiled (but the process don't give error.
Re: Help me pick an assembler!
Posted: Fri Jan 12, 2024 2:56 am
by BigDumbDinosaur
Hi.
Can you help me also, please?
I'm starting to compile some code with the CCA65's CA65. When I compile it without MAcros, all is working ok. But if I use macros the macros don't be compiled (but the process don't give error.
Are you compiling C code, or are you assembling? Compiling and assembling are two different things.
Re: Help me pick an assembler!
Posted: Fri Jan 12, 2024 4:07 am
by Proxy
can you post some example code and the commands you use to assemble?
Re: Help me pick an assembler!
Posted: Fri Jan 12, 2024 8:24 am
by BigEd
A listing output from a small example would be helpful too.
Re: Help me pick an assembler!
Posted: Fri Jan 12, 2024 9:56 am
by drogon
Hi.
Can you help me also, please?
I'm starting to compile some code with the CCA65's CA65. When I compile it without MAcros, all is working ok. But if I use macros the macros don't be compiled (but the process don't give error.
You need to generate a listing file and have a look there. Use the -l flag like:
-l file.l on the command-line with the rest of the ca65 command.
Then you should see the macro expansion - however note that ca66 will only show the bytes gnerated and not the actual assembler macro expansion..
Here is an example of a macro definition:
Code: Select all
.macro waitBaud
.local loop
ldy sBaud
loop: dey
bne loop
.endmacro
and what it looks like in the code:
so just one line of the macro name.
And this is what it looks like in the listing file:
Code: Select all
00005Br 1 ; Delay 1 bit time
00005Br 1
00005Br 1 A4 rr 88 D0 waitBaud
00005Fr 1 FD
The
rr just means a relocatable value but if you were to disassemble that it would look like:
(and here you can see the relocatable value is $EA - not really important here)
Hope that helps.
-Gordon
Re: Help me pick an assembler!
Posted: Fri Jan 12, 2024 8:57 pm
by 6502user
You need .....
Here is an example of a macro definition: .....and what it looks like in the code:.....
Hope that helps. Gordon
Hi.
That helped me. Thanks.