add links, improve things a bit more
This commit is contained in:
parent
2d0db6fe6f
commit
28f27e7fcf
33
uxntal.1
33
uxntal.1
|
@ -49,7 +49,7 @@ Unlike other opcodes, \fB0x00\fP is contextual. Its meaning depends on the \fImo
|
||||||
0x40 \fBJMI\fP 0xc0 \fBLITr\fP
|
0x40 \fBJMI\fP 0xc0 \fBLITr\fP
|
||||||
0x60 \fBJSI\fP 0xe0 \fBLIT2r\fP
|
0x60 \fBJSI\fP 0xe0 \fBLIT2r\fP
|
||||||
|
|
||||||
.SH REGULAR INSTRUCTIONS
|
.SH STACK EFFECTS
|
||||||
|
|
||||||
Regular instructions have a single stack effect which is modified in a predictable way by any additional modes.
|
Regular instructions have a single stack effect which is modified in a predictable way by any additional modes.
|
||||||
|
|
||||||
|
@ -70,9 +70,15 @@ In \fIreturn\fP mode the stacks are reversed. Effects on \fBwst\fP will instead
|
||||||
|
|
||||||
In \fIkeep\fP mode all the values on the left-hand side of the stack effect will also appear on the right-hand side before the outputs. For example, \fBSWP\fP is \fB(x y -- y x)\fP but \fBSWPk\fP is \fB(x y -- x y y x)\fP.
|
In \fIkeep\fP mode all the values on the left-hand side of the stack effect will also appear on the right-hand side before the outputs. For example, \fBSWP\fP is \fB(x y -- y x)\fP but \fBSWPk\fP is \fB(x y -- x y y x)\fP.
|
||||||
|
|
||||||
|
.SH REGULAR INSTRUCTIONS
|
||||||
|
|
||||||
|
.BR
|
||||||
|
|
||||||
.SS INC
|
.SS INC
|
||||||
( x -- x+1 )
|
( x -- x+1 )
|
||||||
|
|
||||||
|
Overflow will be truncated, so \fB#ff INC\fP will evaluate to \fB0x00\fP.
|
||||||
|
|
||||||
.SS POP
|
.SS POP
|
||||||
( x -- )
|
( x -- )
|
||||||
|
|
||||||
|
@ -134,12 +140,12 @@ Store the next address to execute before unconditionally updating the program co
|
||||||
.SS LDZ
|
.SS LDZ
|
||||||
( zp^ -- x )
|
( zp^ -- x )
|
||||||
|
|
||||||
Load data from a zero-page address (\fB0x0000 - 0x00ff\fP).
|
Load data from a zero-page address (\fB0x00 - 0xff\fP).
|
||||||
|
|
||||||
.SS STZ
|
.SS STZ
|
||||||
( x zp^ -- )
|
( x zp^ -- )
|
||||||
|
|
||||||
Store data at a zero-page address (\fB0x0000 - 0x00ff\fP).
|
Store data at a zero-page address (\fB0x00 - 0xff\fP).
|
||||||
|
|
||||||
.SS LDR
|
.SS LDR
|
||||||
( rel^ -- x )
|
( rel^ -- x )
|
||||||
|
@ -223,11 +229,9 @@ Right shifts are unsigned (they introduce zero bits); there are no signed shifts
|
||||||
|
|
||||||
Since the largest values (\fIshort\fP) are 16-bit, one nibble (\fB0x0 - 0xf\fP) is sufficient to express all useful left or right shifts.
|
Since the largest values (\fIshort\fP) are 16-bit, one nibble (\fB0x0 - 0xf\fP) is sufficient to express all useful left or right shifts.
|
||||||
|
|
||||||
Right: \fB#ff #03 SFT\fP evaluates to \fB0x1f\fP.
|
Right: \fB#ff #03 SFT\fP evaluates to \fB0x1f\fP
|
||||||
|
Left: \fB#ff #20 SFT\fP evaluates to \fB0xfc\fP
|
||||||
Left: \fB#ff #20 SFT\fP evaluates to \fB0xfc\fP.
|
Both: \fB#ff #23 SFT\fP evaluates to \fB0x7c\fP
|
||||||
|
|
||||||
Both: \fB#ff #23 SFT\fP evaluates to \fB0x7c\fP.
|
|
||||||
|
|
||||||
.SH SPECIAL INSTRUCTIONS
|
.SH SPECIAL INSTRUCTIONS
|
||||||
|
|
||||||
|
@ -264,3 +268,16 @@ The "literal" instructions are used to push new data onto the stacks. They inter
|
||||||
|
|
||||||
(The instruction pointer will be moved forward 1-2 bytes, past the literal data.)
|
(The instruction pointer will be moved forward 1-2 bytes, past the literal data.)
|
||||||
|
|
||||||
|
Literal values can be updated dynamically using store:
|
||||||
|
|
||||||
|
#abcd ;x STA2
|
||||||
|
( later on... )
|
||||||
|
LIT2 [ @x $2 ]
|
||||||
|
|
||||||
|
.SH SEE ALSO
|
||||||
|
|
||||||
|
https://wiki.xxiivv.com/site/uxntal_opcodes.html \fIUxntal Opcodes\fP
|
||||||
|
https://wiki.xxiivv.com/site/uxntal_syntax.html \fIUxntal Syntax\fP
|
||||||
|
https://wiki.xxiivv.com/site/uxntal_modes.html \fIUxntal Modes\fP
|
||||||
|
https://wiki.xxiivv.com/site/uxntal_immediate.html \fIImmediate opcodes\fP
|
||||||
|
https://wiki.xxiivv.com/site/varvara.html \fIVarvara\fP
|
||||||
|
|
Loading…
Reference in New Issue