Which assembler could I possibly use ?
Re: Which assembler could I possibly use ?
Looking at Mint's repository, 64tass (which has an impressive range of features and processor options), and, yes, xa65 are available. Along with lots of z80 and x86 and DNA fragment assemblers!
Neil
Neil
-
6502inside
- Posts: 101
- Joined: 03 Jan 2007
- Location: Sunny So Cal
- Contact:
Re: Which assembler could I possibly use ?
Fedora also has xa65 in the standard repos. But I just compile it myself. 
Machine room: http://www.floodgap.com/etc/machines.html
Re: Which assembler could I possibly use ?
gilhad wrote:
I downloaded and tried "make" in my Linux environment. There were lots of warnings associated with things in the Makefile and an error due to a missing file.
I took a look but had no idea how to fix any of the warnings or errors so gave up.
I won't post them here, because I don't think it's worth trying to fix. Judging by the number of source files it is a complicated project and will be too complicated for me to understand.
Re: Which assembler could I possibly use ?
BigDumbDinosaur wrote:
There is also André Fachat’s xa65 crossassembler, which may be built and run Linux (I’ve done so on SuSE Enterprise Linux).
Ran make and it compiled first time.
Tried to assemble a "known good" copy of the disassembly. Got lots of errors, strangely the lines shown were all lines which started with a ';' command character., however not all comments were flagged as errors. Wondered whether this assembler used a different character. The example code was no help.
Code: Select all
; note: operand byte is used for BRK hack
AtomOS.a65.asm:line 213: f085:Syntax error
cmp #$3A ; Is it ':', indicating label definition ?
AtomOS.a65.asm:line 987: f3ad:Syntax error
; - Entry: Old position X coordinate (#52,#53)
AtomOS.a65.asm:line 1333: f5cf:Syntax error
; - Uses: Change in X coordinate (#52,#53)
AtomOS.a65.asm:line 1339: f5cf:Label already defined error
; - Screen Resolution: X=0 to 63, Y=0 TO 47.
AtomOS.a65.asm:line 1577: f702:Label already defined error
; - Requires : #5A, #5B = X coordinate.
AtomOS.a65.asm:line 1578: f702:Syntax error
; - Entry: (#5F) = Byte address
AtomOS.a65.asm:line 1630: f750:Syntax error
; - Screen Resolution: X=0 to 127, Y=0 TO 64.
AtomOS.a65.asm:line 1666: f76b:Label already defined error
; - Requires : #5A, #5B = X coordinate
AtomOS.a65.asm:line 1667: f76b:Syntax error
; - Screen Resolution: X=0 to 127, Y=0 TO 95.
AtomOS.a65.asm:line 1693: f78a:Label already defined error
; - Requires : #5A, #5B = X coordinate
AtomOS.a65.asm:line 1694: f78a:Syntax error
; - Screen Resolution: X=0 to 127, Y=0 TO 191.
AtomOS.a65.asm:line 1720: f7a9:Label already defined errorRe: Which assembler could I possibly use ?
Maybe this will help:
From the man page https://www.floodgap.com/retrotech/xa/xa.1.html
"""
use the -XMASM compatibility mode to allow colons within comments
"""
From the man page https://www.floodgap.com/retrotech/xa/xa.1.html
"""
use the -XMASM compatibility mode to allow colons within comments
"""
Re: Which assembler could I possibly use ?
soci wrote:
Not too surprisingly I use this one:
https://tass64.sourceforge.net/
If the latest version isn't packaged yet it's easy to compile it.
https://tass64.sourceforge.net/
If the latest version isn't packaged yet it's easy to compile it.
Lots of files. Typed make and it appeared to have hung up, but I was simply too impatient and it needed a longer time to compile, which it eventually did with no errors. Online is an impressive set of instructions.
Tried to assemble "known good" version of the Acorn Rom disassemly code. Limited set of error messages all related to text strings. These were defined using .byte and I had previous edited the delimiter to be a single quote. I changed the .byte to .text and changed the quotes to double quotes. It now compiled with no errors.
I wanted to compare with the Acorn ROM binary file. The assembler supports a wide range of formats but I didn't see a way to create a small 4k image. I was able to create a 64k binary file (-f option). I tried to use "gvim" in hex mode to edit away the unwanted 60k bytes of NUL, and this worked except gvim added a linefeed as a bonus character when saving. Converted this file and the Atom ROM to text using "xxd". Both files matched using "diff" (except the linefeed).
The best so far.
Re: Which assembler could I possibly use ?
BigEd wrote:
Maybe this will help:
From the man page https://www.floodgap.com/retrotech/xa/xa.1.html
"""
use the -XMASM compatibility mode to allow colons within comments
"""
From the man page https://www.floodgap.com/retrotech/xa/xa.1.html
"""
use the -XMASM compatibility mode to allow colons within comments
"""
This will change in one of the following releases...
Last edited by fachat on Sun Jun 15, 2025 10:17 pm, edited 1 time in total.
Author of the GeckOS multitasking operating system, the usb65 stack, designer of the Micro-PET and many more 6502 content: http://6502.org/users/andre/
Re: Which assembler could I possibly use ?
BigEd wrote:
Maybe this will help:
From the man page https://www.floodgap.com/retrotech/xa/xa.1.html
"""
use the -XMASM compatibility mode to allow colons within comments
"""
From the man page https://www.floodgap.com/retrotech/xa/xa.1.html
"""
use the -XMASM compatibility mode to allow colons within comments
"""
With the above switch the code assembles with a small number of errors.
The thing to be fixed is to remove the "a" (accumulator) parameter from asl/asr/rol/ror instructions.
This assembler was happy with strings defined using .byte and was also OK with the use of single quotes.
Did the usual "xxd" to create a text file for diffing, which matched the Atom ROM text file.
Re: Which assembler could I possibly use ?
Before re-visiting the thread I was searching around and found an assembler with sources "a65v106.zip". There is no indication of who the author is. It was found on a Commodore C64 fan website (Zimmer?).
This interested me since there was only a single C source file.
It compiled first time but with quite a few warnings.
When run on the disassembly source there were errors.
One annoying issue was that it didn't like spaces in opcodes using ",x" and ",y" addressing, or sometimes assembled without warning to the wrong value.
Also annoying was that it only accepted one byte parameter per .byte statement, which was a pain to fix since the code had byte values separated with commas. Each byte had to have its own line. Also it didn't warn but assembled only the first value.
I was able to modify the source assembly so that it would assemble without errors and I finally go t a binary which matched the Atom ROM binary.
I spent quite a few hours modifying the code to remove the warnings. I changed a few types and introduced a nasty bug where an index into the symbol table array was tested for a negative value under specific circumstances. I was hoping to fix the above mentioned problems. An observation was that the C code was pretty generic and would likely easily compile on any platform having a C compiler. The symbol table inserted structs, but the use of "structs" was not used and the symbol table was a just a char array with the struct structure "manually" maintained.
This interested me since there was only a single C source file.
It compiled first time but with quite a few warnings.
When run on the disassembly source there were errors.
One annoying issue was that it didn't like spaces in opcodes using ",x" and ",y" addressing, or sometimes assembled without warning to the wrong value.
Also annoying was that it only accepted one byte parameter per .byte statement, which was a pain to fix since the code had byte values separated with commas. Each byte had to have its own line. Also it didn't warn but assembled only the first value.
I was able to modify the source assembly so that it would assemble without errors and I finally go t a binary which matched the Atom ROM binary.
I spent quite a few hours modifying the code to remove the warnings. I changed a few types and introduced a nasty bug where an index into the symbol table array was tested for a negative value under specific circumstances. I was hoping to fix the above mentioned problems. An observation was that the C code was pretty generic and would likely easily compile on any platform having a C compiler. The symbol table inserted structs, but the use of "structs" was not used and the symbol table was a just a char array with the struct structure "manually" maintained.
Re: Which assembler could I possibly use ?
I think "as65" might be the most reused project name around here!
Re: Which assembler could I possibly use ?
migry wrote:
Briefly looked at Macroassembler-AS, but I had no idea how to use Git to download the sources.
Code: Select all
git clone https://github.com/Macroassembler-AS/asl-releases.git
Code: Select all
# Debian/Ubuntu package manager and package names: tweak for your distro.
sudo apt-get install build-essential texlive texlive-lang-german
git checkout upstream
git show origin/main:gitignore > .gitignore
git show origin/main:Makefile.def > Makefile.def
# Edit Makefile.def to set install path if you wish.
make -j8 # does not build docs
make install # optional, but needed for it to find libary include filesCurt J. Sampson - github.com/0cjs
Re: Which assembler could I possibly use ?
migry wrote:
soci wrote:
Not too surprisingly I use this one:
https://tass64.sourceforge.net/
If the latest version isn't packaged yet it's easy to compile it.
https://tass64.sourceforge.net/
If the latest version isn't packaged yet it's easy to compile it.
The official release versions are here:
https://sourceforge.net/projects/tass64/files/source/
Before a new release I spend weeks on testing and fixing bug. There are always some in new code and changed parts, but that tends to take care of them.
Unfortunately development versions in the repo can have silly mistakes which get fixed the next day (or weeks) but if a snapshot is taken somewhere in between then well, bad luck.
migry wrote:
Lots of files. Typed make and it appeared to have hung up, but I was simply too impatient and it needed a longer time to compile, which it eventually did with no errors. Online is an impressive set of instructions.
migry wrote:
Tried to assemble "known good" version of the Acorn Rom disassemly code. Limited set of error messages all related to text strings. These were defined using .byte and I had previous edited the delimiter to be a single quote. I changed the .byte to .text and changed the quotes to double quotes. It now compiled with no errors.
There's no difference between the two quotes (' and ") so if one of them needs to be in a string then the other one can be used.
migry wrote:
I wanted to compare with the Acorn ROM binary file. The assembler supports a wide range of formats but I didn't see a way to create a small 4k image. I was able to create a 64k binary file (-f option). I tried to use "gvim" in hex mode to edit away the unwanted 60k bytes of NUL, and this worked except gvim added a linefeed as a bonus character when saving. Converted this file and the Atom ROM to text using "xxd". Both files matched using "diff" (except the linefeed).
Use "-b" (--nostart) instead as that creates a binary from the first used byte to the last one. It's called "nostart" because the default format is a CBM binary file for historical reasons and that has a start address word in front.
Re: Which assembler could I possibly use ?
Thank you for the information. Just FYI, I am a total noob when it comes to git.
I went back to the install dir and tried again.
This appeared to work, although nothing happened presumably as no files needed to be updated.
I got an error message "fatal: not a git repository (or any of the parent directories): .git
It is likely I haven't installed git correctly or haven't setup git correctly.
I don't want to clog this thread with unrelated git help. If anyone has suggestion, possibly could you please DM me?
TBH now I have one or two working assemblers, that is good enough to continue my "Acorn Atom" project.
I went back to the install dir and tried again.
cjs wrote:
Code: Select all
# Debian/Ubuntu package manager and package names: tweak for your distro.
sudo apt-get install build-essential texlive texlive-lang-german
cjs wrote:
Code: Select all
git checkout upstream
It is likely I haven't installed git correctly or haven't setup git correctly.
I don't want to clog this thread with unrelated git help. If anyone has suggestion, possibly could you please DM me?
TBH now I have one or two working assemblers, that is good enough to continue my "Acorn Atom" project.
Re: Which assembler could I possibly use ?
soci wrote:
Thanks for checking it out! If it was from Irmen's unofficial mirror then you were lucky this time as currently the only difference is that the version.h file is missing. Not a big deal, just the version number will be truncated.
TBH I was very impressed with the documentation. In fact it was so detailed I wasn't sure if there was a switch to solve my binary dump issue or if I had simply not looked in the right place in the documentation
Modifying the source was no issue, since it was not clear to me whether the disassembly was in a recognised 6502 format or not. Luckily it was, with some trivial exceptions.
Nevertheless there were several cases where a string was mixed with a byte or list of byte on a single line. I think when I have used ".db" in the past (I forget the processor - 8088?). it was possibly to mix text and bytes together using the '.db' directive, useful when CR and LF needed to terminate a string.
e.g.
Code: Select all
.byte 6,12,15,"ACORN ATOM",10,10,13
lda #$82
.byte "NAME"
nop
NOTE: I'm not asking for any changes, just making an observation. I have no problems putting ".text" on a separate line now I know this is required.
Re: Which assembler could I possibly use ?
64tass' .text directive can handle comma separated lists of numbers mixed in with the strings, so you can just change those lines from .byte to .text and don't need to edit them further. Here's the listing of that code snippet assembled to $F000 (you can get a listing with "-L filename.lst" or "--list=filename.lst" (without the quotes) added to the command line). The output is on the left, in hex, and the source code on the right.
P.S.
I love 64tass! Thanks so much for all of your work, Soci!
Code: Select all
; 64tass Turbo Assembler Macro V1.59.3120 listing file
; 64tass -b -L testing.lst testing.asm
; Wed Jun 18 08:06:21 2025
;Offset ;Hex ;Monitor ;Source
;****** Processing input file: testing.asm
>f000 06 0c 0f 41 43 4f 52 4e .text 6,12,15,"ACORN ATOM",10,10,13
>f008 20 41 54 4f 4d 0a 0a 0d
.f010 a9 82 lda #$82 lda #$82
>f012 4e 41 4d 45 .text "NAME"
.f016 ea nop nop
;****** End of listingI love 64tass! Thanks so much for all of your work, Soci!