Added notes to keep track of Zombies shit ISA

This commit is contained in:
Thomas Muller 2024-03-08 23:10:08 -05:00
parent b1cea49c07
commit 6fbbb3bb49

48
notes Normal file
View file

@ -0,0 +1,48 @@
---------------
-- Opcodes --
---------------
Argless
NOP
HLT
RST
Idfk
DBG
Memory ops
MOV
PUSH
POP
Branches
JMPA
JMP
JZ
ALU stuff
CMP
INC
DEC
------------------------
-- Addressing Modes --
------------------------
reg - Register
imm - Immediate
abs - Absolute
ida - Indirect absolute
idr - Indirect register
---- Examples ----
Assembly -- Mode -- Function
---------------------------------------------------------
mov A, 5 -- reg imm -- A <- 5
mov [$23], 5 -- ida imm -- mem[mem[23]] <- 5
mov $69, A -- abs imm -- mem[69] <- A
mov 420, [A] -- imm idr -- mem[ip + 1] <- mem[A]
add $13, $32 -- ida ida -- mem[13] <- mem[13] + mem[32]
inc A, 14 -- reg imm -- A <- A + 1 | Z <- (A == 14) # Cursed zero flag