Page 4 of 5
Re: 65c816 (opinionated) assembler showdown
Posted: Sun May 17, 2020 10:32 pm
by Dan Moos
I learned C in the 80's using command line tools. First time I used an IDE in Windows, there was no going back (and this was using the much maligned Visual C!)
Just goes to show how different people are. I can't imagine wanting to deal with the command line for such a thing. Many here wouldn't have it any other way!
Does anyone know if the source code to the Kowlaski assembler is around somewhere? The editor does have some warts, and Mr. Kowlaski's passing means they are here to stay otherwise.
Re: 65c816 (opinionated) assembler showdown
Posted: Mon May 18, 2020 12:16 am
by BigDumbDinosaur
I learned C in the 80's using command line tools. First time I used an IDE in Windows, there was no going back (and this was using the much maligned Visual C!)
Just goes to show how different people are. I can't imagine wanting to deal with the command line for such a thing. Many here wouldn't have it any other way!
Does anyone know if the source code to the Kowlaski assembler is around somewhere? The editor does have some warts, and Mr. Kowlaski's passing means they are here to stay otherwise.
The source code is available. Do a search on Kowalski.
Re: 65c816 (opinionated) assembler showdown
Posted: Mon May 18, 2020 12:46 am
by Dr Jefyll
Daryl ( 8BIT ) very kindly undertook some improvements. I think
this might be his most recent work.
Re: 65c816 (opinionated) assembler showdown
Posted: Mon May 18, 2020 1:32 am
by BigDumbDinosaur
Daryl ( 8BIT ) very kindly undertook some improvements. I think
this might be his most recent work.
The most recent revision, and the one I am currently using, is
right here. The link points to a ZIP containing the executable code.
Re: 65c816 (opinionated) assembler showdown
Posted: Wed Sep 17, 2025 9:53 pm
by Martin_H
I'm bumping this topic because I need a 65816 assembler for my hopefully soon to exist 65c265 board.
For the 6502 I used Ophis because it's fast and has features like excellent macros, anonymous labels, symbol scope (useful for control structures), modules, and multiple program sections for code and data. I also used py65 to run unit tests which made for much better code.
For the w65265qbx I used the WDC assembler and linker. It produced Motorola S record files which were useful to upload to the w65c265's via its monitor ROM. But I am not sure how popular it is given it being a Windows program with a built for 1990's Windows feeling. It includes a 65816 simulator, but I can't figure out how to get it to do anything useful.
Today I downloaded CA65 and gave it a spin. It seems okay and more likely to be popular because it's multiplatform. It appears to have the features I need, except it doesn't seem to generate S record files.
Are there any other tool chains I should consider? A simulator of some sort is a must because I like to run a build and have unit testst.
Re: 65c816 (opinionated) assembler showdown
Posted: Wed Sep 17, 2025 11:06 pm
by vbc
I'm bumping this topic because I need a 65816 assembler for my hopefully soon to exist 65c265 board.
For the 6502 I used Ophis because it's fast and has features like excellent macros, anonymous labels, symbol scope (useful for control structures), modules, and multiple program sections for code and data. I also used py65 to run unit tests which made for much better code.
For the w65265qbx I used the WDC assembler and linker. It produced Motorola S record files which were useful to upload to the w65c265's via its monitor ROM. But I am not sure how popular it is given it being a Windows program with a built for 1990's Windows feeling. It includes a 65816 simulator, but I can't figure out how to get it to do anything useful.
Today I downloaded CA65 and gave it a spin. It seems okay and more likely to be popular because it's multiplatform. It appears to have the features I need, except it doesn't seem to generate S record files.
vasm can create a number of output formats (including s-records) directly or you can create linkable object files to use with vlink (which offers flexibility through linker scripts).
You can get prebuilt versions from the vbcc65816-distribution at
http://www.compilers.de/vbcc.html or get different source snapshots from
http://sun.hasenbraten.de/vasm
Are there any other tool chains I should consider? A simulator of some sort is a must because I like to run a build and have unit testst.
For vbcc65816, I use a simulator based on lib65816 from
https://github.com/sam-falvo/lib65816. I think my modifications to build a simulator/debugger working with the simulator-target from the vbcc65816 distribution have been included in the github. I can also provide my snapshot if necessary.
Re: 65c816 (opinionated) assembler showdown
Posted: Wed Sep 17, 2025 11:32 pm
by gfoot
The assembler I use (xa) doesn't support generating s-records either but I made a Python script to convert plain binaries into the right format, so that I could use this simulator:
https://github.com/andrew-jacobs/emu816.git The author of the simulator also seems to recommend a java-based assembler, which I expect does support producing s-records.
The simulator itself is functional but basic. I extended it in a bit of a rough fashion to allow interactive debugging - e.g. breakpoints, single stepping, memory dumps. I will have to try Sam Falvo's simulator, thanks for the link.
Re: 65c816 (opinionated) assembler showdown
Posted: Wed Sep 17, 2025 11:52 pm
by GARTHWILSON
The assembler I use (xa) doesn't support generating s-records either but I made a Python script to convert plain binaries into the right format
Don't forget there's SRecord 1.65 for Linux and Windows which lets you transform/convert EPROM file types, concatenate, split, etc..
Re: 65c816 (opinionated) assembler showdown
Posted: Thu Sep 18, 2025 1:38 am
by Martin_H
@all, thanks for the pointers. I will take a look at them.
Something that annoyed me about the 8-bit assemblers is the lack of syntax standardization for modern features like anonymous labels, macros, label scope, etc. It makes sense because the original 6502 assembly syntax was developed before modern macro assemblers existed. So most of the legacy code you encounter needs a rehab. But I shouldn't complain because all of them are a massive improvement over the Atari assembler/editor cartridge and a cassette drive.
Re: 65c816 (opinionated) assembler showdown
Posted: Thu Sep 18, 2025 4:39 am
by BigDumbDinosaur
I'm bumping this topic because I need a 65816 assembler for my hopefully soon to exist 65c265 board...Are there any other tool chains I should consider? A simulator of some sort is a must because I like to run a build and have unit testst.
The current rendition of the Kowalski editor/assembler/simulator supports the 65C818—I have made extensive use of it. It can output object files as S-record, Intel hex, or pure binary. You can get it right here.
Re: 65c816 (opinionated) assembler showdown
Posted: Thu Sep 18, 2025 6:35 am
by drogon
I'm bumping this topic because I need a 65816 assembler for my hopefully soon to exist 65c265 board.
For the 6502 I used Ophis because it's fast and has features like excellent macros, anonymous labels, symbol scope (useful for control structures), modules, and multiple program sections for code and data. I also used py65 to run unit tests which made for much better code.
For the w65265qbx I used the WDC assembler and linker. It produced Motorola S record files which were useful to upload to the w65c265's via its monitor ROM. But I am not sure how popular it is given it being a Windows program with a built for 1990's Windows feeling. It includes a 65816 simulator, but I can't figure out how to get it to do anything useful.
Today I downloaded CA65 and gave it a spin. It seems okay and more likely to be popular because it's multiplatform. It appears to have the features I need, except it doesn't seem to generate S record files.
I use ca65 from the cc65 suite and to generate S recs which I only needed for the SXB board I use the utility srec_cat:
From my Makefile...:
Code: Select all
srec_cat gibl -binary -offset 0x1000 \
-O -Motorola -DISable Header -DISable Footer | head -n -1 > sxb/ram.srec
-Gordon
Re: 65c816 (opinionated) assembler showdown
Posted: Fri Sep 19, 2025 3:13 pm
by Martin_H
@Gordon, thanks for mentioning srec_cat. It turns out that ships with the WDC tools so I have a copy. Your Makefile line will work well with my build process.
Update: The srec_cat in the WDC tools seems strangely broken as it doesn't recognize those options, and the -Help function is broken. I downloaded the installer from
https://srecord.sourceforge.net/ and it works. However, I learned that the zip file distribution is missing some DLL's.
Re: 65c816 (opinionated) assembler showdown
Posted: Fri Sep 19, 2025 11:15 pm
by Martin_H
I have a working compile and link using ca65. I can also produce s records to load on real hardware. All good things.
Regarding a simulator. I'm not looking for one to use interactively. My 6502 code Makefiles had a test target that used py65 on the command line to load and run unit tests, they would write the output to a file, and diff it with a master. If the diff produces no output, I knew there was no regression for that module. I would then write unit tests for each module, link them into a program, and load on real hardware. With sufficient unit testing the program would work on real hardware with almost no debugging.
The WDC tools seem oriented towards interactive use. I have tried the Kowalski simulator, but it looks interactive as well. So, I'm looking for a 65816 Makefile friendly simulator.
Re: 65c816 (opinionated) assembler showdown
Posted: Sat Sep 20, 2025 12:36 am
by BigEd
I think you should be able to modify run65816 for your purposes - it's built on Sam Falvo's lib65816
viewtopic.php?p=23982#p23982
Re: 65c816 (opinionated) assembler showdown
Posted: Sat Sep 20, 2025 7:02 am
by gfoot
Andrew Jacobs' emu816 also works that way, non-interactively - if your program outputs some I/O (using WDM opcodes) then you could use that to determine your test results, e.g. print nothing if the test was successful or some diagnostics if it failed. I think WDM 0 prints a character and WDM $FF terminates execution.