Which assembler could I possibly use ?
Re: Which assembler could I possibly use ?
BigDumbDinosaur wrote:
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.
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: Which assembler could I possibly use ?
cjs wrote:
BigDumbDinosaur wrote:
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.
Maybe...maybe not.
Quote:
(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.
Quote:
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..
x86? We ain't got no x86. We don't NEED no stinking x86!
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: Which assembler could I possibly use ?
Virtual1 wrote:
BigDumbDinosaur wrote:
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.
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.
x86? We ain't got no x86. We don't NEED no stinking x86!
-
GlennSmith
- Posts: 162
- Joined: 26 Dec 2002
- Location: Occitanie, France
Re: Which assembler could I possibly use ?
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).
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).
Glenn-in-France
Re: Which assembler could I possibly use ?
Virtual1 wrote:
Clearly, FORTRAN die-hards ;)
BigDumbDinosaur wrote:
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..
Curt J. Sampson - github.com/0cjs
-
jimmydmusic
- Posts: 9
- Joined: 09 Sep 2025
Re: Which assembler could I possibly use ?
I use Ophis
vespacla wrote:
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.
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 ?
drogon wrote:
Over the years, as65 hasn't let me down in this respect - but like everything it just takes a little while to get right.
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.
--
JGH - http://mdfs.net
JGH - http://mdfs.net
Re: Which assembler could I possibly use ?
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
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
--
JGH - http://mdfs.net
JGH - http://mdfs.net
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: Which assembler could I possibly use ?
jgharston wrote:
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.
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: Which assembler could I possibly use ?
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.
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 ?
BigDumbDinosaur wrote:
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.
BigEd wrote:
Beebasm has been a leap forward as it’s multi platform.
Curt J. Sampson - github.com/0cjs
Re: Which assembler could I possibly use ?
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)
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)
- barrym95838
- Posts: 2056
- Joined: 30 Jun 2013
- Location: Sacramento, CA, USA
Re: Which assembler could I possibly use ?
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)
Mike B. (about me) (learning how to github)
-
electricdawn
- Posts: 34
- Joined: 23 Nov 2025
Re: Which assembler could I possibly use ?
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/
http://sun.hasenbraten.de/vasm/
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: Which assembler could I possibly use ?
electricdawn wrote:
I really like vasm.
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.
x86? We ain't got no x86. We don't NEED no stinking x86!