Skip to content

Latest commit

 

History

History
29 lines (21 loc) · 1.46 KB

README.md

File metadata and controls

29 lines (21 loc) · 1.46 KB

rust6502

6502 attempt number 2, this time with memory safety

By default, the kernel is loaded from code/bin/kernel, and the file code/bin/example2 is executed.

To compile the kernel and executable, you need to have cc65 installed. Running make all in the code folder will generate the two files.

The kernel really does not do much, it has some test subroutines, and a subroutine that handles reading of characters from the keyboard. Hopefully I will be able to turn that into an interrupt in the future.

Example2 shows you what letter you last typed or released, so holding z, then pressing x and then releasing z will make z appear, then get replaced by x, which gets replaced by z again.

By running make bin/example you can make the other example, which is a very flashy "Hello, World!" line.

There is very little documentation on how the program works, but I'll add that in the future, maybe, probably?

The "microcode"

The processor "microcode", which in the real deal would just be on the chip itself, is generated by the codegen subproject. The way it works is essentially a rust version of floooh's chips code generator, which itself is written in rust as well.

other sources