Page 8 of 9
Re: Which assembler could I possibly use ?
Posted: Fri Sep 05, 2025 10:23 pm
by Virtual1
Every assembler I have ever used has required that labels and symbols start at column 1, and that instructions, equates, etc., start at column 2 or later.
Clearly, FORTRAN die-hards

Re: Which assembler could I possibly use ?
Posted: Sat Sep 06, 2025 5:08 am
by BigDumbDinosaur
Incidentally, I never leave lines blank in my source files—otherwise blank lines get a semicolon, as in the above examples. The purpose of doing so is to make it clear to me that nothing is missing from the file.
If you accidentally deleted something and yet everything still builds and the automated tests pass, it can't have been all that important, right?

Maybe...maybe not. 
(I do admit that others are probably not as keen on testing as I am, and don't have the thousand or so unit tests that I have for my
personal pile of 8-bit code.)
Most of my programs are build around libraries whose code was tested and debugged long ago. I ran numerous unit tests during library development to qualify functions. Applications are reams of macro calls to library functions interspersed with code specific to the program. There’s usually no need to unit test it—logic errors will be in program-specific functions or due to macro invocations being out of order.
Which reminds me: one thing I would add to Garth's list would be to accept UTF-8 input, at least in comments...I guess the Kowalski assembler does accept Unicode, since I see you use em-dashes (\u2014) in your header comments.
I don’t enter them as Unicode—I just use Windows keypad entry with the [Alt] key to get things such as em-dashes, section markers (§), etc..
Re: Which assembler could I possibly use ?
Posted: Sat Sep 06, 2025 5:11 am
by BigDumbDinosaur
Every assembler I have ever used has required that labels and symbols start at column 1, and that instructions, equates, etc., start at column 2 or later.
Clearly, FORTRAN die-hards

Dunno that you can blame FORTRAN for that, although the very first 6502 assembler I used, the MOS Technology reference assembler that was written in FORTRAN and run on the IBM S360 dinosaur, enforced the labels-at-column-1 requirement. Assemblers prior to the advent of FORTRAN already had that requirement.
Re: Which assembler could I possibly use ?
Posted: Sat Sep 06, 2025 9:10 am
by GlennSmith
Hi all,
I recently wrote my own assembler, in PLASMA, to be included in the self-hosting compiler environment. (PLASMA allows you to include assembler routines in the high-level source code)
I initially thought that insisting that labels start in column 1 would make coding easier. Once I really got into the complexities of detecting and handling labels I found-out that it didn't really matter. Anything that isn't a valid opcode mnemonic (thanks Daryl '8-BIT') is treated as a potential label (and discarded if it isn't referenced anywhere).
Re: Which assembler could I possibly use ?
Posted: Sat Sep 06, 2025 2:57 pm
by cjs
Clearly, FORTRAN die-hards ;)
Naw, not really. If they were, the label would be truncated after column 5, and statements could not start before column 7. Also, you wouldn't be able to use labels starting with `C` because that would be a comment line instead. (And I guess all labels would be purely numeric.)
I don’t enter them as Unicode—I just use Windows keypad entry with the [Alt] key to get things such as em-dashes, section markers (§), etc..
Well, whether you want to or not, you
are apparently entering them as Unicode in modern versions of Windows, because that's what's going in your file. (The number you type may not be the Unicode code point number, but then again, when you type the letter 'a' you are not typing a Unicode code point number, either.)
Re: Which assembler could I possibly use ?
Posted: Sat Sep 13, 2025 10:33 pm
by jimmydmusic
I use Ophis
I have always written my programs for various SBC 6502 projects with Kowalski 6502 and then run the assembler and burn the ROMs.
Unfortunately Kowalski works worse and worse with wine, on my new Linux system it just hangs and crashes.
Which assembler would you recommend - possibly for Linux - if I have only used Kowalski 6502 so far?
Thank You.
Re: Which assembler could I possibly use ?
Posted: Thu Sep 18, 2025 5:20 am
by jgharston
Over the years, as65 hasn't let me down in this respect - but like everything it just takes a little while to get right.
Does the
-i option actually work in as65? I've been fighting with it for six and a half hours so far, and it simply REFUSES to work.
This is my command line:
C:\Apps\Programming\as65\as65 -i -x -w125 -lMini65.lst -oMini65.bin Mini65.asm
It just spews out page after page after page after page of "Invalid mnemonic":
307: AND #15
"Mini65.asm",307 : Invalid mnemonic.
309: PHP
"Mini65.asm",309 : Invalid mnemonic.
310: SED
"Mini65.asm",310 : Invalid mnemonic.
-i is listed in the documentation as "ignore case in mnemonics".
v1.42, which is the latest version on Frank's website.
Re: Which assembler could I possibly use ?
Posted: Fri Oct 03, 2025 11:31 pm
by jgharston
I've been going through my 6502 projects with the intention of making them easier for other people to build with assemblers other people use. A lot of my code has been written with the BBC BASIC assembler to take advantage of being able to use BASIC features, but a lot of my code doesn't need that, and can be assembled with a plain assembler.
Some of the code has if/else/endif blocks so needs that functionality. Some needs something like a command-line -DEFINE option, but that can often be avoided by having a "launch" file that then includes the main code.
I've got several assemblers:
as65
vasm65
cc65
beebasm
but it's a fight trying to get code into a state where it is minimally simple to convert to different assembler syntax. byte vs db vs .byte, if vs .if, equ vs =, $hex &hex 0xhex, -ignorecase options don't, everything must be lower case (don't mind everything upper case, that's my habit), sometimes always label: sometimes always label, sometimes label: or label depending on context or the phase of the moon, argh!!!!
I've got some bits of code I've put together that manages to automate converting between some formats. What advice would people recommend for a most-common-case target?
Here are some samples:
https://mdfs.net/Info/Comp/6502/Code/ansi.src
https://mdfs.net/Info/Comp/6502/Code/input.asm
https://mdfs.net/Info/Comp/6502/Code/Ha ... s2kbd1.asm
https://mdfs.net/Software/Tube/6502/Mini65.asm
https://mdfs.net/Info/Comp/ProgTips/GST ... rans65.asm
Re: Which assembler could I possibly use ?
Posted: Sat Oct 04, 2025 12:13 am
by BigDumbDinosaur
I've been going through my 6502 projects with the intention of making them easier for other people to build with assemblers other people use...
Anything that was written to work with the Beeb assembler is going to be a problem for anyone who is using a syntactically-compliant assembler, e.g., the WDC assembler or the Kowalski assembler when the .opt caseinsensistive,swapbin options are used. I guess whomever wrote the Beeb assembler hadn’t read the MOS Technology assembly language standard.
CMP #&22:BEQ gsinit1 ... what the heck is that?
Every assembler I’ve used to date would choke on it.
Re: Which assembler could I possibly use ?
Posted: Sat Oct 04, 2025 3:04 am
by BigEd
Beebasm has been a leap forward as it’s multi platform.
Any assembler which is stable or maintained and has a reasonably large and preferably supportive user base is a good choice.
For me, the acorn community and beebasm fits the bill. It’s not the only one which does that of course - a person might be closer to the apple or the commodore communities. Or Atari, which for some reason I tend to forget!
There’s certainly no universal choice.
Re: Which assembler could I possibly use ?
Posted: Fri Oct 24, 2025 8:01 am
by cjs
I guess whomever wrote the Beeb assembler hadn’t read the MOS Technology assembly language standard. :evil: CMP #&22:BEQ gsinit1 ... what the heck is that? :? Every assembler I’ve used to date would choke on it.
That's an interesting view. And you think that whatever 6502 assembler they used to write BBC BASIC also used '&' instead of '$' for hex? I wonder what assembler that would have been. And you're quite sure that using '$' for hex in the embedded assembler wouldn't have interfered with string indirection ('$a = "hello"') and embedding BASIC variable and function names (such as 'STRING$(...)') in assembly code?
Beebasm has been a leap forward as it’s multi platform.
Was it really that early? The first commit in the repo says "BeebASM v0.01 - first released Dec 20 2007" which would, to provide but one example, put it a good decade or more after the first C version of ASL, which was multi-platform in both senses of the word that come to my mind ("runs on multiple operating systems" or "supports multiple CPUs").
Re: Which assembler could I possibly use ?
Posted: Fri Oct 24, 2025 9:40 am
by BigEd
Fair point, anything written in reasonably simple C should be portable and multi-platform.
I suppose I'm thinking of modern times, especially for people who like an IDE... but most of all, BeebAsm gives you the additional features of something very like an assembler embedded in Basic. Like having a preprocessor and macros, but even more so (because a programming language)
Re: Which assembler could I possibly use ?
Posted: Fri Oct 24, 2025 1:46 pm
by barrym95838
Re: Which assembler could I possibly use ?
Posted: Fri Nov 28, 2025 6:09 pm
by electricdawn
I really like vasm. It works very well for me and you don't have to run a linker if you don't want to. And it's still being updated.
http://sun.hasenbraten.de/vasm/
Re: Which assembler could I possibly use ?
Posted: Sun Nov 30, 2025 6:40 am
by BigDumbDinosaur
vsam is mostly the work of Dr. Volker Barthelmann, also the author of the vbc ANSI C compiler. vasm is tailored for use as the vcc back end that generates what ultimately becomes the executable binary—the linker, obviously, is part of the compilation workflow.
That said, I use the Kowalski editor/assembler/simulator. Just about all 65C816-compatible assemblers require the use of pseudo-ops to tell the assembler when a 65C816 immediate-mode operand is eight or 16 bits. I find that to be an annoyance, disruptive when I’m on a coding roll, and a good source of insidious bugs. In the Kowalski assembler, a 16-bit immediate-mode operand is indicated with !#, e.g., LDA !#$1234, which is a lot more convenient, and also is more obvious when reading the source.
The only real negative with the Kowalski package is it only runs on MS Windows.