~rabbits/public-inbox

Clarify number representations v1 PROPOSED

d6: 1
 Clarify number representations

 1 files changed, 4 insertions(+), 2 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~rabbits/public-inbox/patches/55134/mbox | git am -3
Learn more about email & git

[PATCH] Clarify number representations Export this patch

From: d_m <d_m@plastic-idolatry.com>

 - 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 25804c82..f76947ba 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

-- 
2.39.5