README formatting
This commit is contained in:
parent
856bcf40f5
commit
c5d745608e
34
README.md
34
README.md
@ -13,23 +13,23 @@ The T400 is an 8-bit stack machine operating at 1Hz (due to ABMs only running on
|
||||
### Instructions
|
||||
Any words encountered that aren't instructions are pushed to the stack. This makes very compact simple program code.
|
||||
|
||||
| ins | function | mnemonic |
|
||||
|--------|----------------------------------------------|---------------|
|
||||
| 255 | push program counter | ppc |
|
||||
| 254 | swap TOS | swp |
|
||||
| 253 | read memory from TOS | read |
|
||||
| 252 | write to memory from TOS | write |
|
||||
| 251 | add TOS | add |
|
||||
| 250 | suptract TOS | sub |
|
||||
| 249 | jump to TOS | jmp |
|
||||
| 248 | skip if TOS = zero | sez |
|
||||
| 247 | jump if TOS = zero | jez |
|
||||
| 246 | jump to subroutine, push pc to retstack | jsr |
|
||||
| 245 | return from subroutine, PC = top of retstack | ret |
|
||||
| 244 | duplicate TOS | dup |
|
||||
| 243 | drop TOS | drop |
|
||||
| 242 | halt processor | hlt |
|
||||
| 241 | pre-read address at TOS | prd |
|
||||
| ins | function | mnemonic |
|
||||
|-------|-----------------------------------------------|---------------|
|
||||
| 255 | push program counter | ppc |
|
||||
| 254 | swap TOS | swp |
|
||||
| 253 | read memory from TOS | read |
|
||||
| 252 | write to memory from TOS | write |
|
||||
| 251 | add TOS | add |
|
||||
| 250 | suptract TOS | sub |
|
||||
| 249 | jump to TOS | jmp |
|
||||
| 248 | skip if TOS = zero | sez |
|
||||
| 247 | jump if TOS = zero | jez |
|
||||
| 246 | jump to subroutine, push pc to retstack | jsr |
|
||||
| 245 | return from subroutine, PC = top of retstack | ret |
|
||||
| 244 | duplicate TOS | dup |
|
||||
| 243 | drop TOS | drop |
|
||||
| 242 | halt processor | hlt |
|
||||
| 241 | pre-read address at TOS | prd |
|
||||
|
||||
### I/O
|
||||
The T408 uses memory-mapped I/O. This may seem like a stupid idea on a machine with 8-bit addressing but port-based I/O isn't hugely sane.
|
||||
|
Loading…
Reference in New Issue
Block a user