Skip to content

rscottfree/machine-assembly-code-learning-environment

Repository files navigation

MACLE - Machine Assembly Code Learning Environment

A toy 8-bit machine emulated in JavaScript. Implements most of the 6502 instruction set plus some extras for convenience and debugging. (I created this as a way to learn 6502 as I was learning to program my Commodore 64.) Has a small kernal written in assembly to output characters to the screen, blink the cursor (using interrupts), and echo keyboard input to the screen.

See the prg/ folder for test programs and the kernal code (kernal.s). To run any of these change the fileName in the loadKernal() method in parser.js.

A primitive parser (parser.js) converts the assembly to machine code which is executed in cpu.js.

The instruction set is defined in instruction-set.js.

A memory map can be found in the console when running and also in memory-map.js.

The character set is defined in chars.js.

Uses PixiJS for rendering all the pixels.

macle-screenshot.png


Demo

https://rscottfree.github.io/machine-assembly-code-learning-environment/


Running it

Clone

npm install
npm start

Go to http://localhost:8080


Acknowledgments


References

Instructions

Stack and interrupts

Interrupts

About

A toy 8-bit computer emulator that runs 6502 machine code.

Topics

Resources

Stars

Watchers

Forks

Languages