Krolyxon
Commit c362025

Branches

Tags

Refs →

bench51README.md

53 lines · 1.3 KB

8-Bit CPU Emulator

CPU Architecture

Supported Instructions

Instruction Syntax
MOV mov reg, imm
ADD add r1, r2
SUB sub r1, r2
JMP jmp addr
JZ jz addr
JNZ jnz addr
HLT (Halt) hlt

Registers

Register Size Description
A 8-bit General
B 8-bit General
C 8-bit General
D 8-bit General
PC 16-bit Program Counter
SP 16-bit Stack pointer (unused for now)

Flags

Flag Description
Z Zero Flag
C Carry/Borrow

Usage

cargo run -- --f <examples/filename.asc>

Todo