A lightweight 8-bit VM emulator written in Rust. It simulates a basic CPU with registers, memory, and a custom instruction set. I'm making this project do develop my Rust skills and understand how some things work.
#e8Bit Emulator
6 messages · Page 1 of 1 (latest)
// WELCOME SCRIPT
MOV C 0;
INPUT A;
STORE A [C];
ADD C 1;
INPUT A;
JNZ 2; // If nothing in the input continue, else go back
// Welcome message
MOV D 72; // H
PRINTCH D -N;
MOV D 101; // e
PRINTCH D -N;
MOV D 108; // l
PRINTCH D -N;
PRINTCH D -N;
MOV D 111; // o
PRINTCH D -N;
MOV D 44; // ,
PRINTCH D -N;
MOV D 32; //
PRINTCH D -N;
// Hello,
MOV D 0;
MOV A [D];
PRINTCH A -N; // No line break
ADD D 1;
MOV B C;
SUB B D;
JNZ 20;
// Hello, (name)
HALT```
an example of a code
this is very cool
Hey! This is extremely cool. On the topic of 8-bit CPUs, I highly recommend you play through Turing Complete. It teaches you the very base of everything from a simple XOR to a full-fledged LEG Computer, with 4 byte instructions. You even make the assembly code yourself!
Thanks for the recommendations, I'm very interested in the low level of the computers, thanks!
Of course! It is a fairly easy game, but if you ever have trouble, come by on their discord server, they will answer within minutes!