man uxntal updates

This commit is contained in:
~d6 2024-08-02 11:31:03 -04:00
parent a6e0b734d5
commit d1ac45feae
1 changed files with 82 additions and 1 deletions

View File

@ -86,8 +86,89 @@ Thus for regular instructions writing a "generic" effect (leaving sigils off val
.SS OVR .SS OVR
( x y -- x y x ) ( x y -- x y x )
.SS EQU
( x y -- x==y^ )
.SS NEQ
( x y -- x!=y^ )
.SS GTH
( x y -- x>y^ )
.SS LTH
( x y -- x<y^ )
.SS JMP
( x -- ; pc <- x )
The program counter (\fIpc\fP) is unconditionally updated. When \fIx\fP is a byte, it is treated as relative (\fBpc += x\fP) and when \fIx\fP is a short it is treated as absolute (\fBpc = x\fP).
.SS JCN
( x bool^ -- ; pc <- x if bool )
The program counter (\fIpc\fP) is updated when \fIbool\fP is non-zero. When \fIx\fP is a byte, it is treated as relative (\fBpc += x\fP) and when \fIx\fP is a short it is treated as absolute (\fBpc = x\fP).
.SS JSR
( x -- [pc+1*] )
Store the next address to execute before unconditionally updating the program counter (\fIpc\fP). This instruction is usually used to invoke subroutines, which use the \fBJMP2r\fP to return.
.SS STH
( x -- [x] )
.SS LDZ
( zp^ -- x )
Load data from a zero-page address (\fB0x0000 - 0x00ff\fP).
.SS STZ
( x zp^ -- )
Store data at a zero-page address (\fB0x0000 - 0x00ff\fP).
.SS LDR
( rel^ -- x )
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).
.SS STR
( x rel^ -- )
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).
.SS LDA
( abs* -- x )
Load data from an absolute address (\fB0x0000 - 0xffff\fP).
.SS STA
( x abs* -- )
Store data at an absolute address (\fB0x0000 - 0xffff\fP).
.SS DEI
( dev^ -- x )
Read data from a device port (\fB0x00 - 0xff\fP).
Reading from some ports may have an effect on the underlying VM; in other cases it will simply read values from device memory. See Varvara device documentation for more details.
.SS DEO
( x dev^ -- )
Write data to a device port (\fB0x00 - 0xff\fP).
Writing to some ports may have an effect on the underlying VM; in other cases it will simply write values to device memory. See Varvara device documentation for more details.
.SH SPECIAL INSTRUCTIONS .SH SPECIAL INSTRUCTIONS
These instructions do not accept all mode flags (some do not accept any).
.SS BRK .SS BRK
The break instruction is used to end a vector call and return control to the virtual machine. The break instruction is used to end a vector call and return control to the virtual machine.
@ -98,7 +179,7 @@ The "immediate jump" instructions are produced by the assembler. They interpret
\fBJMI\fP ( -- ) jump to \fIaddr\fP unconditionally \fBJMI\fP ( -- ) jump to \fIaddr\fP unconditionally
\fBJCI\fP ( bool^ -- ) jump to \fIaddr\fP if \fIbool\fP is non-zero \fBJCI\fP ( bool^ -- ) jump to \fIaddr\fP if \fIbool\fP is non-zero
\fBJSI\fP ( -- [cur*] ) jump to \fIaddr\fP saving the current address (\fIcur\fP) on the return stack \fBJSI\fP ( -- [pc*] ) jump to \fIaddr\fP saving the current address (\fIpc\fP) on the return stack
(The instruction pointer will be moved forward 2 bytes, past the relative address.) (The instruction pointer will be moved forward 2 bytes, past the relative address.)