Page 1 of 9

Which assembler could I possibly use ?

Posted: Thu Nov 14, 2024 9:18 pm
by vespacla
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 Nov 14, 2024 10:13 pm
by cjs
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.

For just 6502 development on either Windows or Unix it's as good as any other assembler, but because it supports both platforms and will assemble code for pretty much any 8- or 16-bit CPU (and some 32-bit CPUs) you might ever imagine using, it means you don't need to change assemblers when you start exploring new things.

Re: Which assembler could I possibly use ?

Posted: Fri Nov 15, 2024 12:45 am
by GARTHWILSON
I have a list of 65xx assemblers on my site's links page, at http://wilsonminesco.com/links.html#assem .  The quantity of them makes it impossible for any one person to be familiar with more than a small percentage of them, to be able to give a complete comparison; but at least you can go "shopping."  I have written a few notes about my observations (from a distance) there.  Unfortunately the one I myself use and like, Cross-32, does not seem to be available anymore, and I would like to find out who owns the rights to it, to ask if I can distribute it, just to keep a good thing going, not particularly to make any money at it.

Re: Which assembler could I possibly use ?

Posted: Fri Nov 15, 2024 12:55 am
by BigDumbDinosaur
vespacla wrote:
Unfortunately Kowalski works worse and worse with wine, on my new Linux system it just hangs and crashes.

Which version of Kowalski are you running?

Re: Which assembler could I possibly use ?

Posted: Fri Nov 15, 2024 6:15 am
by barnacle
I favour one which is buried in one of Garth's links (damn, we need to find more inventive names for 6502 assemblers!) - as65, http://www.kingswood-consulting.co.uk/assemblers/
  • native linux executable
  • NMOS and CMOS options
  • Macro capability
  • it uses 'traditional' syntax very similar to the Avocet assembler I used forty-odd years ago
So far, my only grumble is that I can't find a way to force an absolute addressing mode when the operand address is on page zero, but it's not insurmountable. It also doesn't do relocatable modules, but I tend to write monolithic code so it's not an issue for me.

Neil

Re: Which assembler could I possibly use ?

Posted: Fri Nov 15, 2024 8:37 am
by BigEd
A few more which get a mention in Acorn contexts but are not limited to Acorn environments:
https://github.com/stardot/beebasm (a very popular choice. There's a VS plugin which some find useful)
http://sun.hasenbraten.de/vasm/
https://github.com/SteveFosdick/laxasm
https://github.com/0xC0DE6502/max65-releases

Re: Which assembler could I possibly use ?

Posted: Fri Nov 15, 2024 8:52 am
by BigEd
BTW there's a curated list on this site's reference section (6502.org is more than the forum!)
http://6502.org/tools/asm/

Re: Which assembler could I possibly use ?

Posted: Fri Nov 15, 2024 9:28 am
by drogon
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.
I use the ca65 assembler from the cc65 suite natively under Linux. It's a standard package under Devuan/Debian, and probably many others.

If you're familiar with separate compilation, assembly and linking then this may work very well for you. The assembler produces a relocatable object file that you can link with other files to produce an object file in more or less the same way that other tools work under Unix - e.g. gcc (although the command-line options are similar but different).

I've been doing it this way since I got back into the 65xx some years back now. editor, Makefiles and ca65 ... It has useful macro facilities too and will generate code for NMOS, CMOS and '816 CPUs. (Or more precisely give you errors when you use an opcode not supported on your particular target). My largest project is a bytecode VM which assembles to 16KB and is split over 30+ source files to keep everything manageable. the whole thing assembles and links in under a second on my Linux desktop.

If you want to try and want example Makefiles, etc. let me know.

-Gordon

Re: Which assembler could I possibly use ?

Posted: Fri Nov 15, 2024 3:42 pm
by cjs
I should mention that I find linking assemblers to be more of a pain than useful for 8-bit work. (I started out with a linking assembler, ASxxxx/AS6502, when I started doing cross-development on Linux a few years back.) The source and object files for 8-bit machines are so small that they both, along with the listing file, fit into the L2 cache on my fifteen-year-old laptop, and the L1 cache on any modern machine, and assembly from scratch is possibly even faster than doing a partial assembly and then a link. So there's no speed advantage there.

What they do do, however, is limit your options for optimisation. This may or may not be a big deal, but if you are occasionally writing programs you want to be as small as possible, avoiding the overhead of the interfaces you need for linking can be helpful. (You need to use a linking system if you're doing part of your program in other languages, such as C, but if you're using C you've already thrown optimisation out the window, anyway.)

Re: Which assembler could I possibly use ?

Posted: Fri Nov 15, 2024 4:41 pm
by vbc
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.
I am not familiar with the specifics of the Kowalski assembler, but vasm works on Linux, supports several syntax styles, many (all?) 6502 variants (apart from other cpu architectures) and a variety of absolute and linkable output formats.

Re: Which assembler could I possibly use ?

Posted: Fri Nov 15, 2024 5:34 pm
by teamtempest
Quote:
I favour one which is buried in one of Garth's links (damn, we need to find more inventive names for 6502 assemblers!) - as65, http://www.kingswood-consulting.co.uk/assemblers/

native linux executable
NMOS and CMOS options
Macro capability
it uses 'traditional' syntax very similar to the Avocet assembler I used forty-odd years ago

So far, my only grumble is that I can't find a way to force an absolute addressing mode when the operand address is on page zero, but it's not insurmountable. It also doesn't do relocatable modules, but I tend to write monolithic code so it's not an issue for me.
Since your assembler has macro capabilities, one option to "force" absolute addressing would be to create one which first laid down the correct byte for the opcode, then the 16-bit value of the expression. Something like:

Code: Select all

macro ABS_ADC ?expr
    byte  $6D
    word ?expr
endmacro
Sure, it's a bit more effort on your part, but it does exactly what you want and only when you want it. It's easier if the assembler does it for you. But while on the surface that looks like an easy task, it can be hard to properly error check. And it's a facility that is only rarely used anway, so whoever creates the assembler may consider it more effort than it's worth.

Re: Which assembler could I possibly use ?

Posted: Fri Nov 15, 2024 10:56 pm
by vespacla
Thanks for all your ideas and comments. The version of my Kowalski program is 1.2.11 - I saw somewhere that there is a newer version, but I don't think that's the problem. Using Wine with Kowalski is more the difficulty. I've already experimented with ca65, I don't have the documentation for some other assemblers. I'll have a look at your recommendations.

Re: Which assembler could I possibly use ?

Posted: Fri Nov 15, 2024 11:26 pm
by BigDumbDinosaur
vespacla wrote:
Thanks for all your ideas and comments. The version of my Kowalski program is 1.2.11 - I saw somewhere that there is a newer version, but I don't think that's the problem. Using Wine with Kowalski is more the difficulty. I've already experimented with ca65, I don't have the documentation for some other assemblers. I'll have a look at your recommendations.

Visit here to download the most recent version of the Kowalski package.  The current version is 1.4.0.6.  You may have better luck with it in WINE.

EDIT: The current version is now 1.4.0.9.

Re: Which assembler could I possibly use ?

Posted: Tue Nov 19, 2024 8:52 pm
by kenames99
barnacle wrote:
I favour one which is buried in one of Garth's links (damn, we need to find more inventive names for 6502 assemblers!) - as65, http://www.kingswood-consulting.co.uk/assemblers/
  • native linux executable
  • NMOS and CMOS options
  • Macro capability
  • it uses 'traditional' syntax very similar to the Avocet assembler I used forty-odd years ago
So far, my only grumble is that I can't find a way to force an absolute addressing mode when the operand address is on page zero, but it's not insurmountable. It also doesn't do relocatable modules, but I tend to write monolithic code so it's not an issue for me.

Neil
hi,
you by chance would still have a copy of that assemble from avocet? or know where to get it. I am only hoping. thanks.

Ken

Re: Which assembler could I possibly use ?

Posted: Wed Nov 20, 2024 5:43 am
by barnacle
I wish I had, but it's over forty years since I last used it. As I recall, it was a cross-assembler running on CP/M.

Neil