commit 15ba520

d_m  ·  2024-09-21 01:32:20 +0000 UTC
parent 9530e7b
Clarify number representations

 - relative addresses are signed
 - byte-order is big endian (#abcd = #ab #cd)

Also fixes a misspelling.
1 files changed,  +4, -2
+4, -2
 1@@ -3,7 +3,7 @@
 2 .\" Contact d_m@plastic-idolatry.com to correct errors or typos.
 3 .TH uxntal 7 "05 Aug 2024" "1.0" "Uxntal Reference Guide"
 4 .SH NAME
 5-uxntal \- assembly langauge for Varvara virtual machine
 6+uxntal \- assembly language for Varvara virtual machine
 7 .SH DESCRIPTION
 8 Uxntal is an 8-bit instruction set for programming the Varvara virtual machine.
 9 It uses the lower 5-bits to specify an opcode, and the upper 3-bits to specify
10@@ -15,7 +15,9 @@ Instructions manipulate data using two stacks: a working stack (\fBwst\fP) and a
11 
12 There are also 256 bytes of device memory, which are used to interact with the virtual machine and its devices.
13 
14-Instructions deal with unsigned 8-bit values (\fIbytes\fP) and unsigned 16-bit values (\fIshorts\fP). There are no other built-in data types.
15+Instructions deal with unsigned 8-bit values (\fIbytes\fP) and unsigned 16-bit values (\fIshorts\fP). There are no other built-in data types. Occasionally values are treated as signed, such as when loading, storing, or jumping with a relative address.
16+
17+Short values are stored on the stack in big-endian byte order: the least significant byte will be on the top of the stack. This makes \fB#abcd\fB is equivalent to \fB#ab #cd\fB.
18 
19 .SH INSTRUCTION LAYOUT
20