Which assembler could I possibly use ?

Programming the 6502 microprocessor and its relatives in assembly and other languages.
User avatar
BigDumbDinosaur
Posts: 9425
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: Which assembler could I possibly use ?

Post by BigDumbDinosaur »

BigEd wrote:
BTW there's a curated list on this site's reference section (6502.org is more than the forum!)
http://6502.org/tools/asm/

I just happened to notice that the Kowalski package is not in that list.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Re: Which assembler could I possibly use ?

Post by BigEd »

Kowalski is next door, on this page. I see it's a dead link though, so I might update it to Daryl's page. (Edit: done)
Last edited by BigEd on Sun May 25, 2025 6:12 pm, edited 1 time in total.
6502inside
Posts: 101
Joined: 03 Jan 2007
Location: Sunny So Cal
Contact:

Re: Which assembler could I possibly use ?

Post by 6502inside »

There was one similar to that in COMPUTE!'s Gazette called BASSEM that also took assembly source as a BASIC program.
User avatar
barrym95838
Posts: 2056
Joined: 30 Jun 2013
Location: Sacramento, CA, USA

Re: Which assembler could I possibly use ?

Post by barrym95838 »

6502inside wrote:
There was one similar to that in COMPUTE!'s Gazette called BASSEM that also took assembly source as a BASIC program.
Yes. I have a COMPUTE! book with detailed descriptions and source for the LADS assembler. It assembles to RAM or floppy, and provides versions for Apple ][, C=64 and 8-bit Atari. It is written in 6502 assembly, but the Apple ][ and C=64 versions accept source as a BASIC program. The Atari version needed its own editor, and the Apple ][ version needed a CHRGET wedge to prevent tokenization, but the C=64 version happily gobbled up the assembly source straight from BASIC, tokens and all, IIRC.
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!

Mike B. (about me) (learning how to github)
User avatar
BigDumbDinosaur
Posts: 9425
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: Which assembler could I possibly use ?

Post by BigDumbDinosaur »

BigEd wrote:
Kowalski is next door, on this page. I see it's a dead link though, so I might update it to Daryl's page. (Edit: done)

I mentioned it not being on the assembler page because the Kowalski package has a full-featured assembler and could be used solely for building code if the programmer isn’t interested in simulation.  Also, the assemblers page is a list of assemblers and IDEs, IDE describing Kowalski.  For that reason, I’d think it would warrant a link on the assemblers page.
Last edited by BigDumbDinosaur on Sun May 25, 2025 9:07 pm, edited 1 time in total.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Re: Which assembler could I possibly use ?

Post by BigEd »

Yes, maybe so, but I don't feel I could make that change - one for Mike.
migry
Posts: 9
Joined: 20 Feb 2018

Re: Which assembler could I possibly use ?

Post by migry »

Seems like a live thread.

I am wanting to re-assemble the disassembly listing of the Acorn Atom OS ROM (modified to move the start of the video memory, where the address is hard coded).

I am running (and modifying) the Atomulator emulator in a Linux environment. I am modifying the memory map to maximise memory RAM for BASIC source code.

I was looking to find a 6502 assembler with C source code that I could compile under Linux (gcc) to assemble the disassembly. I am happy to modify the disassembly to change directives to any needed format.

I tried as6502 by "Jos Visser" (from GitHub). Source code compiles with some trivial issues to fix. It is a two pass assembler. Gives an error on "pass 1" but no indication of where the error is in the source code, doesn't print the line of source or the line number. I have added a bug request to GitHub, but no idea if the author is still around.

I tried gaia by "andi-spajk". Sources compile with no issues. Appears to be a bug that "lda ABS,Y" generates an error. Does not support maths. Does not support db/.byte and other commonly used directives.

Briefly looked at Macroassembler-AS, but I had no idea how to use Git to download the sources.

I am happy to try suggestions of other assembler. Ideally should have C source code for compilation under Linux (to generate runnable binaries).

Some example code(math needed) and directives...

Code: Select all

lda     LF8BE+1, x      ; Get LSB address from command table
bvc     LF9A2+1         ; ..<CTRL> key was pressed - execute BRK

L0052           := $0052
.org    $f000
LF000:  .byte   "PLOT", >plot, <plot
.byte  $1C, $8A, $1C, $23, $5D, $8B, $1B, $A1
.word $A000             ;
.byte   "OUT OF RANGE:", 10, 13
User avatar
gilhad
Posts: 85
Joined: 26 Jan 2024
Location: Prague; Czech Republic; Europe; Earth
Contact:

Re: Which assembler could I possibly use ?

Post by gilhad »

I downloaded Macroassembler-AS from the page (http://john.ccac.rwth-aachen.de:8000/as/) that csj linked
cjs wrote:
I very highly recommend the Macroassembler AS, also known as "ASL." It runs on both Unix (including Linux and MacOS) and Windows, is one of the more powerful assemblers out there, and is probably first in the world in terms of the number of CPUs it supports. It's also under active development.
There is text
Quote:
So let's go directly to the things available in this area:

Things that can be downloaded
so i clicked it and in section
Quote:
C Sources

Here are the C sources, the sources all current and future developments will be made on. Message files for german and english are both included, so there is no separate archive:

latest build - please use this version if possible -as bz2
I downloaded it

http://john.ccac.rwth-aachen.de:8000/ft ... ent.tar.gz

I compiled it under Gentoo Linux and it looks working ... no extra problem with compilation, but I am curently working on something else, so I did not used it, I just did run the tests successfully ..
User avatar
drogon
Posts: 1671
Joined: 14 Feb 2018
Location: Scotland
Contact:

Re: Which assembler could I possibly use ?

Post by drogon »

migry wrote:
I was looking to find a 6502 assembler with C source code that I could compile under Linux (gcc) to assemble the disassembly. I am happy to modify the disassembly to change directives to any needed format.
ca65 from the cc65 suite works well under Linux - there may even be a standard package for it in your chosen distribution too.

I use it for all my 65xx work.

-Gordon
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
User avatar
BigDumbDinosaur
Posts: 9425
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: Which assembler could I possibly use ?

Post by BigDumbDinosaur »

There is also André Fachat’s xa65 crossassembler, which may be built and run Linux (I’ve done so on SuSE Enterprise Linux).
x86?  We ain't got no x86.  We don't NEED no stinking x86!
soci
Posts: 20
Joined: 18 Nov 2019

Re: Which assembler could I possibly use ?

Post by soci »

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.
hoglet
Posts: 367
Joined: 29 Jun 2014

Re: Which assembler could I possibly use ?

Post by hoglet »

migry wrote:
Seems like a live thread.
I am wanting to re-assemble the disassembly listing of the Acorn Atom OS ROM (modified to move the start of the video memory, where the address is hard coded).
In case it's of any use to you, here's a copy of the Acorn Atom OS that can be re-assembled using ca65.
atom_mos_dissassembly.zip
(31.45 KiB) Downloaded 39 times
This disassembly was published by forum member Arlet back in 2013:
Disassembled Acorn Atom OS ROM
His original link is dead, but the content was available on archive.org.

I believe this work derives from the original "Splitting The Atom" disassembly:
https://site.acornatom.nl/atom_handleid ... /spa26.htm
(this site is quite slow at the moment, but is normally accessible)
Screenshot from 2025-06-13 08-51-57.png
Splitting the Atom - A manual for Informed Users
- Author(s): J. R. Stevenson and J. C. Rockett
- ISBN: NONE
- Publisher: Procyon

Edit: FYI, I've just uploaded a copy of Splitting the Atom to archive.org:
https://archive.org/details/splitting-the-atom

Dave
fachat
Posts: 1123
Joined: 05 Jul 2005
Location: near Heidelberg, Germany
Contact:

Re: Which assembler could I possibly use ?

Post by fachat »

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).
Not only that. It's actually included in some Linux distributions.

The current maintainer is Cameron Kaiser.

André
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/
User avatar
BigDumbDinosaur
Posts: 9425
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: Which assembler could I possibly use ?

Post by BigDumbDinosaur »

fachat wrote:
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).
Not only that. It's actually included in some Linux distributions.
Really?  That means you’re famous!  Or, maybe that should be notorious.  :D

Which distributions include it?

Quote:
The current maintainer is Cameron Kaiser.

Yep!  I think that might make you even more notorious...er...famous.

BTW, the only aspect of xa65 that I don’t care for is the necessity of using the .as, .al, .xs, and .xl pseudo-ops to tell the assembler how to assemble immediate-mode operands for the 65C816.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
User avatar
gilhad
Posts: 85
Joined: 26 Jan 2024
Location: Prague; Czech Republic; Europe; Earth
Contact:

Re: Which assembler could I possibly use ?

Post by gilhad »

BigDumbDinosaur wrote:
Which distributions include it?
For example Gentoo Linux :

dev-embedded/xa: High-speed, two-pass portable 6502 cross-assembler
Post Reply