Update assembler/usage
+11
-1
@@ -18,7 +18,17 @@ This document provides a comprehensive reference for the DSA (Damn Simple Archit
|
||||
- general purpose: `rg0-rgf`
|
||||
- be careful when using `rgf` for storing data as some pseduo-instructions may implicitly overwrite this register.
|
||||
- special registers:
|
||||
- ``
|
||||
- `acc` - the accumulator. useful for storing the results of calculations, especially in iterators where a temporary register may be needed.
|
||||
- `spr` - stack pointer. once you've written the stack location to this, you likely won't need to worry about it, as push/pop pseduo-instructions abstract over this.
|
||||
- `bpr` - base pointer for the stack.
|
||||
- `ret` - return address register. if you're writing a function, it is good practice to store return addresses here.
|
||||
start functions with `pop ret` and end them with `jmp 4, ret` for a seamless call/return flow, assuming the function was called like `push pcx; jmp function`
|
||||
- `idr` - **(privilleged)** holds the address of interrupt descriptor table
|
||||
- `mmr` - **(privilleged)** holds the address of hardware memory map table
|
||||
- `zero` - **(read only)** literally just zero.
|
||||
- `pcx` - **(read only)** program counter, useful for function return addresses.
|
||||
- `noreg` **(placeholder)** this indicates the absence of a register argument. has the same effect as leaving an operand blank.
|
||||
|
||||
## Hardware Instructions
|
||||
|
||||
### Data Movement Instructions
|
||||
|
||||
Reference in New Issue
Block a user