Tidy up formatting

This commit is contained in:
n loewen 2023-07-25 17:41:26 +01:00
parent 9fe17b801f
commit 27a192bcdf
1 changed files with 27 additions and 27 deletions

View File

@ -8,7 +8,7 @@
- [ ] Consider adding a way to visualize screen memory - [ ] Consider adding a way to visualize screen memory
- [ ] Do a proper binary version... - [ ] Do a proper binary version...
## ISA ## Instruction set
0 END 0 END
1 STO lit# ; store ... mem[lit#] <- A 1 STO lit# ; store ... mem[lit#] <- A
@ -19,29 +19,29 @@
6 ADD addr ; add ... A <- A + mem[addr] ... and un/set carry flag 6 ADD addr ; add ... A <- A + mem[addr] ... and un/set carry flag
7 SUB lit# ; sub ... A <- A - lit# ... and un/set carry flag 7 SUB lit# ; sub ... A <- A - lit# ... and un/set carry flag
8 SUB addr ; sub ... A <- A - mem[addr] ... and un/set carry flag 8 SUB addr ; sub ... A <- A - mem[addr] ... and un/set carry flag
9 HOP lit# ; skip next instruction if A == lit# ... when true: IP <- PC + 2 9 HOP lit# ; hop ... skip next instruction if A == lit# ... when true: IP <- PC + 2
A HOP addr ; skip next instruction if A == addr ... when true: IP <- PC + 2 A HOP addr ; hop ... skip next instruction if A == addr ... when true: IP <- PC + 2
B JMP lit# ; ... IP <- lit# B JMP lit# ; jump ... IP <- lit#
C JMP addr ; ... IP <- addr C JMP addr ; jump ... IP <- addr
~~D CAT ---- ; Carry Flag Toggle ... CF <- !CF~~ D CCF ———— ; clear Carry Flag ... CF = 0
D CCF ———— ; Clear Carry Flag ... CF = 0 E CHP ---- ; carry hop ... skip next instruction if Carry Flag is set ... when true: IP <- PC + 2
E CHP ---- ; skip next instruction if Carry Flag is set ... when true: IP <- PC + 2
F F
### Nice features that didn't fit ### Nice features that didn't fit
- hop IF< and hop IF> - hop `IF<` and hop `IF>`
- MUL and DIV - `MUL` and `DIV`
- rotates and shifts - rotates and shifts
## Registers ## Registers
- A -- accumulator - `A` - accumulator
- IP -- instruction pointer (aka program counter) - `IP` - instruction pointer (aka program counter)
## Flags ## Flags
- CF -- carry flag - `CF` - carry flag
## Memory-mapped peripherals ## Memory-mapped peripherals