more cleanup
This commit is contained in:
parent
d1ac45feae
commit
d1dd621ba0
13
uxntal.1
13
uxntal.1
|
@ -8,18 +8,19 @@ Uxntal is an 8-bit instruction set for programming the Varvara virtual machine.
|
||||||
It uses the lower 5-bits to specify an opcode, and the upper 3-bits to specify
|
It uses the lower 5-bits to specify an opcode, and the upper 3-bits to specify
|
||||||
optional modes.
|
optional modes.
|
||||||
|
|
||||||
ROMs consist of a 16-bit address space of bytes. Any byte can be interpreted as either data or an instruction. A 2-byte instruction pointer determines the address of the next instruction to decode and run.
|
ROMs consist of a 16-bit address space of bytes. Any byte can be interpreted as either data or an instruction. A 2-byte program counter (\fIpc\fP) determines the address of the next instruction to decode and run.
|
||||||
|
|
||||||
Instructions manipulate data using two stacks: a working stack (\fBwst\fP) and a return stack (\fBrst\fP). Each stack consists of 256 bytes, and in the case of overflow or underflow the stack pointer will wrap (the stacks are circular).
|
Instructions manipulate data using two stacks: a working stack (\fBwst\fP) and a return stack (\fBrst\fP). Each stack consists of 256 bytes, and in the case of overflow or underflow the stack pointer will wrap (the stacks are circular).
|
||||||
|
|
||||||
|
There are also 256 bytes of device memory, which are used to interact with the virtual machine and its devices.
|
||||||
|
|
||||||
.SH INSTRUCTION LAYOUT
|
.SH INSTRUCTION LAYOUT
|
||||||
|
|
||||||
0x01 -
|
0x01 ----
|
||||||
0x02 \\
|
0x02 \\
|
||||||
0x04 +- \fIopcode\fP
|
0x04 +- \fIopcode\fP
|
||||||
0x08 /
|
0x08 /
|
||||||
0x10 -
|
0x10 ----
|
||||||
|
|
||||||
0x20 ---- 2: \fIshort\fP mode
|
0x20 ---- 2: \fIshort\fP mode
|
||||||
0x40 ---- r: \fIreturn\fP mode
|
0x40 ---- r: \fIreturn\fP mode
|
||||||
0x80 ---- k: \fIkeep\fP mode
|
0x80 ---- k: \fIkeep\fP mode
|
||||||
|
@ -131,7 +132,7 @@ Store data at a zero-page address (\fB0x0000 - 0x00ff\fP).
|
||||||
|
|
||||||
Load data from a relative address (\fBpc + x\fP).
|
Load data from a relative address (\fBpc + x\fP).
|
||||||
|
|
||||||
Note that unlike \fBLDZk\fP and \fBLDAk\fP the \fBLDRk\fP instruction is not very useful, since a relative address is usually only meaningful when run from a particular address (i.e. for a particular \fBpc\fP value).
|
Note that unlike \fBLDZk\fP and \fBLDAk\fP the \fBLDRk\fP instruction is not very useful, since a relative address is usually only meaningful when run from a particular address (i.e. for a particular \fIpc\fP value).
|
||||||
|
|
||||||
|
|
||||||
.SS STR
|
.SS STR
|
||||||
|
@ -139,7 +140,7 @@ Note that unlike \fBLDZk\fP and \fBLDAk\fP the \fBLDRk\fP instruction is not ver
|
||||||
|
|
||||||
Store data at a relative address (\fBpc + x\fP).
|
Store data at a relative address (\fBpc + x\fP).
|
||||||
|
|
||||||
Note that unlike \fBSTZk\fP and \fBSTAk\fP the \fBSTRk\fP instruction is not very useful, since a relative address is usually only meaningful when run from a particular address (i.e. for a particular \fBpc\fP value).
|
Note that unlike \fBSTZk\fP and \fBSTAk\fP the \fBSTRk\fP instruction is not very useful, since a relative address is usually only meaningful when run from a particular address (i.e. for a particular \fIpc\fP value).
|
||||||
|
|
||||||
.SS LDA
|
.SS LDA
|
||||||
( abs* -- x )
|
( abs* -- x )
|
||||||
|
|
Loading…
Reference in New Issue