add documentation for current addressing modes to instructions.toml
All checks were successful
per-push tests / build (push) Successful in 7m40s
per-push tests / test-utility (push) Successful in 2m29s
per-push tests / test-backend (push) Successful in 1m38s
per-push tests / test-frontend (push) Successful in 8m26s
per-push tests / timed-decomposer-parse (push) Successful in 1m37s
All checks were successful
per-push tests / build (push) Successful in 7m40s
per-push tests / test-utility (push) Successful in 2m29s
per-push tests / test-backend (push) Successful in 1m38s
per-push tests / test-frontend (push) Successful in 8m26s
per-push tests / timed-decomposer-parse (push) Successful in 1m37s
Signed-off-by: Ava Affine <ava@sunnypup.io>
This commit is contained in:
parent
3bc256dab2
commit
0e47e5658a
2 changed files with 37 additions and 0 deletions
|
|
@ -1,6 +1,41 @@
|
|||
# NOTE: keep libc out of this, thats what trap vector is for
|
||||
# NOTE: to programmers: only registers allow mutable acess
|
||||
|
||||
[[addressing_modes]]
|
||||
name = "expr"
|
||||
mutable = true
|
||||
symbol = "$expr"
|
||||
example = "inc $expr"
|
||||
description = "The expression register is used as a default output, or input by many instructions."
|
||||
|
||||
[[addressing_modes]]
|
||||
name = "operand"
|
||||
mutable = true
|
||||
symbol = "$oper<N>"
|
||||
example = "add $oper1, $oper2"
|
||||
description = "There are four operand registers N=(0, 1, 2, 3, and 4). They are for storing mutable data."
|
||||
|
||||
[[addressing_modes]]
|
||||
name = "stack"
|
||||
mutable = false
|
||||
symbol = "%N"
|
||||
example = "dupl %0, $expr"
|
||||
description = "Stack addressing mode takes an index in to the stack to read from."
|
||||
|
||||
[[addressing_modes]]
|
||||
name = "instruction"
|
||||
mutable = false
|
||||
symbol = "@N"
|
||||
example = "jmp @100"
|
||||
description = "Instruction addressing mode indexes by instruction into the program."
|
||||
|
||||
[[addressing_modes]]
|
||||
name = "numeric"
|
||||
mutable = false
|
||||
symbol = "N"
|
||||
example = "const $expr, 100"
|
||||
description = "Numeric addressing mode provides read only integer constants to instructions"
|
||||
|
||||
[[instructions]]
|
||||
name = "trap"
|
||||
args = ["index"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue