pouët.net

MOS: A 6502 assembler, debugger and formatter

category: code [glöplog]
 
During COVID I built a 6502 assembler called MOS and released a VS Code plugin along with it. The plugin was always a bit flaky so it was a bit hard to get it up and running so I never really announced it publically.

Anyway, I AI slopped together a new plugin and it should be easier to get started with it now.

So, go to the minisite and read up on it but basically:

* Install the Datatrash "MOS" plugin in VS Code
* Download the MOS executable and open up one of the samples to play around with it
* ...
* Win a demoparty

Because MOS has a language server built-in the VS Code plugin has some nice features:
* Syntax highlighting
* Click on an identifier to go to the definition
* Automatic code formatting
* Run unit tests straight from the editor

There's also limited support for the VICE remote debugger so you can set breakpoints, inspect memory locations and so on.

I've never really used the assembler all that much since the challenge for me was building the thing and not actually using it, but I just wanted to put it out there.

Btw, full disclosure: the assembler itself is not AI slopped. All bugs are artisanal :)
added on the 2026-08-27 16:53:42 by sagacity sagacity
Oh btw, the awesome F#Ready contributed an Atari 800 example too, so if you insist on using an inferior machine you can still use MOS!
added on the 2026-08-27 17:00:19 by sagacity sagacity
Quote:

lda defined(ADDRESS) // a will now contain '1'
lda !defined(ADDRESS) // a will now contain '0'

there is a # missing :)
added on the 2026-08-27 17:27:00 by groepaz groepaz
If you want to load from $00 or $01 depending on whether a define is set you clearly have different goals in life than me :)
added on the 2026-08-27 20:39:08 by sagacity sagacity

login