Annoyingly Small Computer

A javascript CPU-emulator with a painfully small amount of features, memory, and ROM.


The CPU's instruction set is based of the LMC instruction set, except using 8-bit hex codes, and with two new instructions.

There is one acclumator, 16 nibbles of ROM (16 indexes), and 4 nibbles of RAM (8 indexes).

Instruction set

Position Name Description
00 HLT Stop program
1[A] ADD Add address with acclumator, store to acclumator
2[A] SUB Subtract address from acclumator, store to acclumator
3[A] STO Store acclumator to RAM address (below 8)
40 ? Unused
5[A] LDA Load address (below 8) to acclumator
6[A] BR Jump to address
7[A] BRZ Jump to address if acclumator is zero
8[A] BRA Jump to acclumator
90 INP Get user input, store to acclumator
A0 OUT Show acclumator to user (via alert())
B[A] ZER Set address (below 8) to "0"
C[A] ONE Set address (below 8) to "1"
D0 ? Unused
E0 ? Unused
F0 ? Unused

The actual emulator

Comment Form is loading comments...