From 126efb84f4c636801d5b3b74642f8a1fac28d789 Mon Sep 17 00:00:00 2001 From: d_m Date: Fri, 20 Sep 2024 21:29:43 -0400 Subject: [PATCH] Clarify number representations - relative addresses are signed - byte-order is big endian (#abcd = #ab #cd) Also fixes a misspelling. --- doc/man/uxntal.7 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/man/uxntal.7 b/doc/man/uxntal.7 index 25804c8..f76947b 100644 --- a/doc/man/uxntal.7 +++ b/doc/man/uxntal.7 @@ -3,7 +3,7 @@ .\" Contact d_m@plastic-idolatry.com to correct errors or typos. .TH uxntal 7 "05 Aug 2024" "1.0" "Uxntal Reference Guide" .SH NAME -uxntal \- assembly langauge for Varvara virtual machine +uxntal \- assembly language for Varvara virtual machine .SH DESCRIPTION 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 @@ -15,7 +15,9 @@ Instructions manipulate data using two stacks: a working stack (\fBwst\fP) and a There are also 256 bytes of device memory, which are used to interact with the virtual machine and its devices. -Instructions deal with unsigned 8-bit values (\fIbytes\fP) and unsigned 16-bit values (\fIshorts\fP). There are no other built-in data types. +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. + +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. .SH INSTRUCTION LAYOUT