A webapp made with sveltekit and rust webassembly to learn, write and run m68k assembly code. Uses monaco-editor for the editor, and my WASM M68K interpreter to run the code.
Mainly made to help people approaching assembly by providing the tools necessary to write and debug code more easily.
The editor suggests you with the available instructions and the valid addressing modes for each operand, while also giving a simple description and example.
The code can be run completely or step by step, the changes to the state of the interpreter is kept in memory so that it can be undone. Breakpoints can be set to stop the execution at a specific line while running, to then proceed with stepping.
The webapp comes with a built-in documentation, both available inside the editor and as a separate page. It explains brefly how each instruction works and the addressing modes, further documentation is coming in the future.
Settings to choose from to customise the editor and the interpreter, like how to view the registers, how many steps to keep in history, themes, etc. There are also some shortcuts to ease the use of the editor, which can be changed in the settings.
Projects are stored locally on your browser, and with the app also working offline, you can create and manage them all in the webapp. Export and import to come in the future.
Once running the program there are many tools to help you understand what instructions did and debug the code.
The assembler has a few directives and features to simplify writing code.
$FF*10
) and many immediate representations.The interpreter runs at round 30mhz on the browser and 50mhz natively (on my machine). You can benchmark your own machine by running a loop, the time it took to run is shown in the bottom right of the console in the editor, the total time of each execution is shown. example code:
limit equ 10000000
move.l #limit, d0
move.l #0, d1
for:
add.l #1, d1
sub.l #1, d0
bne for
This runs 30 million instructions, make sure you set the Maximum instructions iteration, Maximum history size and Maximum visible history size to 0, as well as not having any breakpoints, this will turn off the debugging tools and run the code as fast as possible.