Format strings

Format strings are used for dynamic texts, such as prompts

Format strings are used for prompts, but can also be used directly using the control-format control on any handle that supports output. No tailing new line is added, so it needs to be added manually if required.

Example
  538 (* 0) "cat" ~> control %stdout sni:73 "The current tag is: $*\n"
The current tag is:   538 (* 0) "cat"
  538 (* 0) "cat" ~>
                

Currently, the following variables are supported in prompts:

Variable Meaning Example output
$A
Ampersand
&
$B
Pipe
|
$C
Opening bracket
(
$E
US-ASCII Escape (0x1B) N/A
$F
Closing bracket
)
$G
Greater than
>
$H
Backspace N/A
$L
Less than
<
$Q
Equal
=
$S
Space
 
$$
Dollar sign
$
$_
New line N/A
$*
Current tag
  538 (* 0) "cat"
$:
Output handle
<none> 
$R
Clear (reset) terminal attributes N/A
$P

or

$.
Alias for
$*
  538 (* 0) "cat"
$D
Reserved for current date N/A
$T
Reserved for current time N/A
$V
Reserved for version number N/A
$N
Reserved for DOS compatibility (current drive) N/A
$+
Reserved for DOS compatibility (pushd-level) N/A
$M
Reserved for DOS compatibility (remote name of current drive) N/A
All others Reserved for future use N/A
3982 (* 0) "Format strings" ~>

Function numbers

Function numbers are used to access functions both quickly and easier on limited keyboards.

7
show
17
dir
8
transfer
18
seek
9
debug
19
hexdump
4
back
14
read
5
render
15
control
6
forward
16
write
1
quit
11
new_relation
2
12
new_metadata
3
search
13
0
hello_world
10
cls
2382 (* 0) "Function numbers" ~>

Common registers

The following lists the common register specification. Please note that this specifictaion is highly experimental.

Number Name Type Default VM v0: on call Info
0-7 user0 .. user7 user undef TBD General user registers
8-31 user8 .. user31 user undef unchanged -
32 arg system undef saved, reset Used in control calls for the arg value
33 ns system TBD saved, reset -
34 error system undef TBD -
35 context system call context saved, updated -
36 in system TBD TBD -
37 out system undef reset -
38 deep system TBD TBD Used for deep storage (heap)
39-60 - system - - Unassigned
61 io system TBD TBD -
62 rodata system TBD TBD read only data (not executable)
63 TBD system N/A TBD program text
3298 (* 0) "Common registers" ~>