2f6d35485a
FossilOrigin-Name: 23dffad274fb83eba6208843d7e061ef74e66448f49d736abb4f58599573437a
80 KiB
80 KiB
1 | $ | -c | - | - | Return ASCII:NUL (0). | class:macro | {n/a} | {n/a} | global | all | |||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | ' | -s | - | - | Return an empty string. | class:macro | {n/a} | {n/a} | global | all | |||
3 | ( | - | - | - | Provide a visual indication of a code group. | class:macro | {n/a} | {n/a} | sigil | all | |||
4 | ) | - | - | - | Provide a visual indication of a code group. | class:macro | {n/a} | {n/a} | sigil | all | |||
5 | * | nn-n | - | - | Multiply `n1` by `n2` and return the result. | class:primitive | #2 #6 *\n #-1 #100 * | {n/a} | global | all | |||
6 | */mod | xyz-rv | - | - | Multiply `x` by `y` and then divide by `z` and return the integer part of the quotient and remainder. | class:word | {n/a} | {n/a} | global | rre | |||
7 | + | nn-n | - | - | Add `n1` to `n2` and return the result. | class:primitive | #1 #2 + | {n/a} | global | all | |||
8 | , | n- | - | - | Store the specified value into the memory at `here` and increment `Heap` by 1. | class:word | $a , $b , $c , #0 , | {n/a} | global | all | |||
9 | - | nn-n | - | - | Subtract `n2` from `n1` and return the result. | class:primitive | #2 #1 - | {n/a} | global | all | |||
10 | ---reveal--- | - | - | - | Switch to the exposed (public) portion of a lexical namespace. | class:word | {n/a} | {n/a} | global | all | |||
11 | -eq? | nn-f | - | - | Compare two values for inequality. Returns `TRUE` if they are not equal or `FALSE` otherwise. | class:primitive | #1 #2 -eq?\n $a $b -eq? | {n/a} | global | all | |||
12 | -if | fq- | - | - | Execute the quotation if the flag is `FALSE`. | class:word | {n/a} | {n/a} | global | all | |||
13 | -if; | fq- | - | - | Execute the quotation if the flag is `FALSE`. If false, also exit the word. | class:word | {n/a} | {n/a} | global | all | |||
14 | / | nm-v | - | - | Divide `n` by `m` and return the integer part of the quotient. | class:word | {n/a} | {n/a} | global | all | |||
15 | // | - | - | - | Ignore any tokens remaining on the current line. Works with files and the interactive "listener". | class:word | {n/a} | {n/a} | global | rre | |||
16 | /mod | nm-rv | - | - | Divide `n` by `m` and return the integer part of the quotient and remainder. | class:primitive | {n/a} | {n/a} | global | all | |||
17 | 0; | n-n || n- | - | - | If `n` is zero, drop `n` and exit the current word. If non-zero, leave `n` alone and allow execution to continue. | class:macro | {n/a} | {n/a} | global | all | |||
18 | ; | - | - | - | End the current definition. | class:macro | {n/a} | {n/a} | global | all | |||
19 | ?dup | n-nn || n-n | - | - | Duplicate top value on stack if not zero. If zero, do nothing. | class:word | #1 ?dup\n #0 ?dup | {n/a} | global | all | |||
20 | ASCII:ACK | -n | - | - | Constant. Refers to specific ASCII code. | class:data | {n/a} | {n/a} | ASCII | all | |||
21 | ASCII:BEL | -n | - | - | Constant. Refers to specific ASCII code. | class:data | {n/a} | {n/a} | ASCII | all | |||
22 | ASCII:BS | -n | - | - | Constant. Refers to specific ASCII code. | class:data | {n/a} | {n/a} | ASCII | all | |||
23 | ASCII:CAN | -n | - | - | Constant. Refers to specific ASCII code. | class:data | {n/a} | {n/a} | ASCII | all | |||
24 | ASCII:CR | -n | - | - | Constant. Refers to specific ASCII code. | class:data | {n/a} | {n/a} | ASCII | all | |||
25 | ASCII:DC1 | -n | - | - | Constant. Refers to specific ASCII code. | class:data | {n/a} | {n/a} | ASCII | all | |||
26 | ASCII:DC2 | -n | - | - | Constant. Refers to specific ASCII code. | class:data | {n/a} | {n/a} | ASCII | all | |||
27 | ASCII:DC3 | -n | - | - | Constant. Refers to specific ASCII code. | class:data | {n/a} | {n/a} | ASCII | all | |||
28 | ASCII:DC4 | -n | - | - | Constant. Refers to specific ASCII code. | class:data | {n/a} | {n/a} | ASCII | all | |||
29 | ASCII:DEL | -n | - | - | Constant. Refers to specific ASCII code. | class:data | {n/a} | {n/a} | ASCII | all | |||
30 | ASCII:DLE | -n | - | - | Constant. Refers to specific ASCII code. | class:data | {n/a} | {n/a} | ASCII | all | |||
31 | ASCII:EM | -n | - | - | Constant. Refers to specific ASCII code. | class:data | {n/a} | {n/a} | ASCII | all | |||
32 | ASCII:ENQ | -n | - | - | Constant. Refers to specific ASCII code. | class:data | {n/a} | {n/a} | ASCII | all | |||
33 | ASCII:EOT | -n | - | - | Constant. Refers to specific ASCII code. | class:data | {n/a} | {n/a} | ASCII | all | |||
34 | ASCII:ESC | -n | - | - | Constant. Refers to specific ASCII code. | class:data | {n/a} | {n/a} | ASCII | all | |||
35 | ASCII:ETB | -n | - | - | Constant. Refers to specific ASCII code. | class:data | {n/a} | {n/a} | ASCII | all | |||
36 | ASCII:ETX | -n | - | - | Constant. Refers to specific ASCII code. | class:data | {n/a} | {n/a} | ASCII | all | |||
37 | ASCII:FF | -n | - | - | Constant. Refers to specific ASCII code. | class:data | {n/a} | {n/a} | ASCII | all | |||
38 | ASCII:FS | -n | - | - | Constant. Refers to specific ASCII code. | class:data | {n/a} | {n/a} | ASCII | all | |||
39 | ASCII:GS | -n | - | - | Constant. Refers to specific ASCII code. | class:data | {n/a} | {n/a} | ASCII | all | |||
40 | ASCII:HT | -n | - | - | Constant. Refers to specific ASCII code. | class:data | {n/a} | {n/a} | ASCII | all | |||
41 | ASCII:LF | -n | - | - | Constant. Refers to specific ASCII code. | class:data | {n/a} | {n/a} | ASCII | all | |||
42 | ASCII:NAK | -n | - | - | Constant. Refers to specific ASCII code. | class:data | {n/a} | {n/a} | ASCII | all | |||
43 | ASCII:NUL | -n | - | - | Constant. Refers to specific ASCII code. | class:data | {n/a} | {n/a} | ASCII | all | |||
44 | ASCII:RS | -n | - | - | Constant. Refers to specific ASCII code. | class:data | {n/a} | {n/a} | ASCII | all | |||
45 | ASCII:SI | -n | - | - | Constant. Refers to specific ASCII code. | class:data | {n/a} | {n/a} | ASCII | all | |||
46 | ASCII:SO | -n | - | - | Constant. Refers to specific ASCII code. | class:data | {n/a} | {n/a} | ASCII | all | |||
47 | ASCII:SOH | -n | - | - | Constant. Refers to specific ASCII code. | class:data | {n/a} | {n/a} | ASCII | all | |||
48 | ASCII:SPACE | -n | - | - | Constant. Refers to specific ASCII code. | class:data | {n/a} | {n/a} | ASCII | all | |||
49 | ASCII:STX | -n | - | - | Constant. Refers to specific ASCII code. | class:data | {n/a} | {n/a} | ASCII | all | |||
50 | ASCII:SUB | -n | - | - | Constant. Refers to specific ASCII code. | class:data | {n/a} | {n/a} | ASCII | all | |||
51 | ASCII:SYN | -n | - | - | Constant. Refers to specific ASCII code. | class:data | {n/a} | {n/a} | ASCII | all | |||
52 | ASCII:US | -n | - | - | Constant. Refers to specific ASCII code. | class:data | {n/a} | {n/a} | ASCII | all | |||
53 | ASCII:VT | -n | - | - | Constant. Refers to specific ASCII code. | class:data | {n/a} | {n/a} | ASCII | all | |||
54 | BUILD | -n | - | - | Constant. Return a build identifier. Use along with version to identify an image. | class:data | {n/a} | {n/a} | global | all | |||
55 | Base | -a | - | - | Variable. Holds the current numeric base. Base must be in the range of 2-16. | class:data | {n/a} | {n/a} | global | all | |||
56 | Compiler | -a | - | - | Variable. Holds the compiler state. If TRUE, the compiler is active. If FALSE, it is not. | class:data | {n/a} | {n/a} | global | all | |||
57 | DEVICE:BLOCKS | -n | - | - | Return device ID for block support. | class:data | {n/a} | {n/a} | DEVICE | rre | |||
58 | DEVICE:CLOCK | -n | - | - | Return device ID for clock words. | class:data | {n/a} | {n/a} | DEVICE | rre | |||
59 | DEVICE:ERROR | -n | - | - | Return device ID for error handlers. | class:data | {n/a} | {n/a} | DEVICE | rre | |||
60 | DEVICE:FFI | -n | - | - | Return device ID for foreign function interface. | class:data | {n/a} | {n/a} | DEVICE | rre | |||
61 | DEVICE:FILES | -n | - | - | Return device ID for filesystem access. | class:data | {n/a} | {n/a} | DEVICE | rre | |||
62 | DEVICE:FLOATS | -n | - | - | Return device ID for floating point. | class:data | {n/a} | {n/a} | DEVICE | rre | |||
63 | DEVICE:IMAGE | -n | - | - | Return device ID for image writer. | class:data | {n/a} | {n/a} | DEVICE | rre | |||
64 | DEVICE:IOCTL | -n | - | - | Return device ID for Unix IOCTL interface. | class:data | {n/a} | {n/a} | DEVICE | rre | |||
65 | DEVICE:KEYBOARD | -n | - | - | Return device ID for Keyboard input. | class:data | {n/a} | {n/a} | DEVICE | rre | |||
66 | DEVICE:MALLOC | -n | - | - | Return device ID for memory allocator. | class:data | {n/a} | {n/a} | DEVICE | rre | |||
67 | DEVICE:MULTICORE | -n | - | - | Return device ID for multicore support. | class:data | {n/a} | {n/a} | DEVICE | rre | |||
68 | DEVICE:OUTPUT | -n | - | - | Return device ID for Output device. | class:data | {n/a} | {n/a} | DEVICE | rre | |||
69 | DEVICE:RESERVED11 | -n | - | - | Reserved device ID. | class:data | {n/a} | {n/a} | DEVICE | rre | |||
70 | DEVICE:RESERVED12 | -n | - | - | Reserved device ID. | class:data | {n/a} | {n/a} | DEVICE | rre | |||
71 | DEVICE:RESERVED13 | -n | - | - | Reserved device ID. | class:data | {n/a} | {n/a} | DEVICE | rre | |||
72 | DEVICE:RESERVED6 | -n | - | - | Reserved device ID. | class:data | {n/a} | {n/a} | DEVICE | rre | |||
73 | DEVICE:RNG | -n | - | - | Return device ID for random number generator. | class:data | {n/a} | {n/a} | DEVICE | rre | |||
74 | DEVICE:SCRIPTING | -n | - | - | Return device ID for scripting support. | class:data | {n/a} | {n/a} | DEVICE | rre | |||
75 | DEVICE:SOCKET | -n | - | - | Return device ID for sockets. | class:data | {n/a} | {n/a} | DEVICE | rre | |||
76 | DEVICE:UNSIGNED | -n | - | - | Return device ID for unsigned maths. | class:data | {n/a} | {n/a} | DEVICE | rre | |||
77 | Dictionary | -a | - | - | Variable. Holds a pointer to the most recent dictionary header. | class:data | {n/a} | {n/a} | global | all | |||
78 | END | - | - | - | Used to denote the end of a linked list. The last cons will have the cdr point to this address. | class:word | {n/a} | {n/a} | rre | all | |||
79 | EOM | -a | - | - | Constant. Returns the last addressable memory address. | class:word | {n/a} | {n/a} | global | all | |||
80 | FALSE | -n | - | - | Returns `0`, the value used to indicate a FALSE result. | class:word | {n/a} | {n/a} | global | all | |||
81 | FREE | -n | - | - | Returns the number of cells available to your application. This is the amount of memory, less the already consumed portion and buffers mapped for Retro's internal use. | class:word | {n/a} | {n/a} | global | all | |||
82 | HOME | -s | - | - | Hold the path to the users home directory. Defined as a floating buffer above `here`. | class:word | {n/a} | {n/a} | global | rre | |||
83 | Heap | -a | - | - | Variable. Holds the address of the next available cell. | class:data | {n/a} | {n/a} | global | all | |||
84 | I | -n | - | - | Access the loop index for the current loop. (For loops made using `indexed-times`) | class:word | {n/a} | {n/a} | global | all | |||
85 | Ignoring | -a | - | - | Variable. When TRUE, ignore input to end of line. | class:data | {n/a} | {n/a} | global | all | |||
86 | J | -n | - | - | Access the parent loop index for the current loop. (For loops made using `indexed-times`) | class:word | {n/a} | {n/a} | global | all | |||
87 | K | -n | - | - | Access the grandparent loop index for the current loop. (For loops made using `indexed-times`) | class:word | {n/a} | {n/a} | global | all | |||
88 | RewriteUnderscores | -a | - | - | Variable. When set to `TRUE`, Retro will replace underscores in strings with spaces. When `FALSE`, Retro does not. | class:data | {n/a} | {n/a} | global | all | |||
89 | STRINGS | -a | - | - | Return the address of the start of the temporary string pool. This can be altered by changing the values of `TempStrings` and `TempStringMax`. | class:word | {n/a} | {n/a} | global | all | |||
90 | ScopeList | -a | - | - | Variable. This holds some information used by `{{` and `}}`. | class:data | {n/a} | {n/a} | global | all | |||
91 | TIB | -a | - | - | Constant. Returns a pointer to the text input buffer. | class:data | {n/a} | {n/a} | global | rre | |||
92 | TRUE | -n | - | - | Returns `-1`, the value used to indicate a TRUE result. | class:word | {n/a} | {n/a} | global | all | |||
93 | TempStringMax | -a | - | - | Variable. Holds the maximum length of a temporary string. | class:data | {n/a} | {n/a} | global | all | |||
94 | TempStrings | -a | - | - | Variable. Holds the number of temporary strings. | class:data | {n/a} | {n/a} | global | all | |||
95 | Version | -a | - | - | Variable. This stores the version number. | class:data | {n/a} | {n/a} | global | all | |||
96 | [ | - | - | - | Begin a quotation. | class:macro | {n/a} | {n/a} | global | all | |||
97 | ] | - | - | - | End a quotation. | class:macro | {n/a} | {n/a} | global | all | |||
98 | a:-eq? | aa-f | - | - | Compare all values in the array. Return `FALSE` if all values are equal or `TRUE` otherwise. This assumes the array contains only numeric values. | class:word | {n/a} | {n/a} | a | all | |||
99 | a:append | aa-a | - | - | Return a new array consisting of the values in a1 followed by the values in a2. | class:word | {n/a} | {n/a} | a | all | |||
100 | a:begins-with? | aa-f | - | - | Return `TRUE` if a1 begins with a2 or `FALSE` otherwise. | class:word | {n/a} | {n/a} | a | all | |||
101 | a:chop | a-a | - | - | Return a new array containing all but the last value in the source array. | class:word | {n/a} | {n/a} | a | all | |||
102 | a:contains/string? | sa-f | - | - | Return `TRUE` if the string value is in the array or `FALSE` otherwise. | class:word | {n/a} | {n/a} | a | all | |||
103 | a:contains? | na-f | - | - | Return `TRUE` if the value is in the array or `FALSE` otherwise. | class:word | {n/a} | {n/a} | a | all | |||
104 | a:copy | aa- | - | - | Copy an array (a1) to a destination (a2). | class:word | {n/a} | {n/a} | a | all | |||
105 | a:counted-results | q-a | - | - | Run a quote and construct a new array from the returned values. The quote should return the values and the number of values to put into the array. | class:word | {n/a} | {n/a} | a | all | |||
106 | a:dup | a-b | - | - | Make a copy of an array. Return the address of the copy. | class:word | {n/a} | {n/a} | a | all | |||
107 | a:ends-with? | aa-f | - | - | Return `TRUE` if a1 ends with a2 or `FALSE` otherwise. | class:word | {n/a} | {n/a} | a | all | |||
108 | a:eq? | aa-f | - | - | Compare all values in the array. Return `TRUE` if all values are equal or `FALSE` otherwise. This assumes the array contains only numeric values. | class:word | {n/a} | {n/a} | a | all | |||
109 | a:fetch | an-n | - | - | Fetch the value stored at the specified index in the specified array. | class:word | { #0 #1 #3 } #2 a:fetch | {n/a} | a | all | |||
110 | a:filter | aq-b | - | - | For each item in the initial array, run the specified quote. If the quote returns `TRUE`, copy the item into a new array. If `FALSE`, discard it. Returns a pointer to the new array. | class:word | {n/a} | {n/a} | a | all | |||
111 | a:first | a-n | - | - | Return the first value in the array. | class:word | {n/a} | {n/a} | a | all | |||
112 | a:for-each | aq- | - | - | Execute the quote once for each item in the array. | class:word | {n/a} | {n/a} | a | all | |||
113 | a:from-string | s-a | - | - | Create a new array with the characters in the source string. | class:word | {n/a} | {n/a} | a | all | |||
114 | a:hash | a-n | - | - | Calculate a hash value for a given array. | class:word | {n/a} | {n/a} | a | all | |||
115 | a:index | an-n | - | - | Return the location of the first instance of the specified value in the array. | class:word | {n/a} | {n/a} | a | all | |||
116 | a:index/string | as-n | - | - | Return the location of the first instance of the specified string in the array. | class:word | {n/a} | {n/a} | a | all | |||
117 | a:indices | av-a | - | - | Return a new array with the indices the specified value was found at in the original array. | class:word | {n/a} | {n/a} | a | all | |||
118 | a:indices/string | as-a | - | - | Return a new array with the indices of the specified string in the original array. | class:word | {n/a} | {n/a} | a | all | |||
119 | a:last | a-n | - | - | Return the last value in the array. | class:word | {n/a} | {n/a} | a | all | |||
120 | a:left | an-a | - | - | Return a new array containing the first `n` values from the source array. | class:word | {n/a} | {n/a} | a | all | |||
121 | a:length | a-n | - | - | Return the length of a array. | class:word | {n/a} | {n/a} | a | all | |||
122 | a:make | q-a | - | - | Execute quote. Return a new array containing the values the quote leaves on the stack. This is identical to doing `a:counted-results | class:word | {n/a} | {n/a} | a | all | |||
123 | a:map | aq-b | - | - | Execute quote once for each item in the array. Constructs a new array from the value returned by the quote. | class:word | {n/a} | {n/a} | a | all | |||
124 | a:middle | afl-a | - | - | Extract a new array from the middle of the specified array. This will take the values starting at `f` and extend to the `l` last value. | class:word | {n/a} | {n/a} | a | all | |||
125 | a:prepend | aa-a | - | - | Return a new array consisting of the values in a2 followed by the values in a1. | class:word | {n/a} | {n/a} | a | all | |||
126 | a:reduce | pnq-n | - | - | Takes an array, a starting value, and a quote. This will apply the quote to each item in the array; the quote should consume two values and return one. | class:word | {n/a} | {n/a} | a | all | |||
127 | a:reverse | a-b | - | - | Reverse the order of items in a array. This will return a new array. | class:word | {n/a} | {n/a} | a | all | |||
128 | a:right | an-a | - | - | Return a new array containing the specified number of values from the right side of the array. | class:word | {n/a} | {n/a} | a | all | |||
129 | a:store | van- | - | - | Store a value into the array at the specified index. | class:word | #3 { #0 #1 #2 } #1 a:store | {n/a} | a | all | |||
130 | a:temp | a-a | - | - | Make a copy of the array in a rotating set of temporary buffers. | class:word | {n/a} | {n/a} | a | all | |||
131 | a:th | an-b | - | - | Return the actual address of the `n`th item in the array. | class:word | {n/a} | {n/a} | a | all | |||
132 | a:to-string | a-s | - | - | Create a new string from the provided array of character values. This string will be stored in the temporal string buffers. | class:word | { $h $e $l $l $o } a:to-string s:put nl | {n/a} | a | all | |||
133 | abort | - | - | - | Abort execution. | class:macro | {n/a} | {n/a} | global | rre | |||
134 | again | - | - | - | Close an unconditional loop. Branches back to the prior `repeat`. | class:macro | {n/a} | {n/a} | global | all | |||
135 | allot | n- | - | - | Allocate the specified number of cells from the `Heap`. | class:word | 'Buffer d:create #100 allot | {n/a} | global | all | |||
136 | and | nm-o | - | - | Perform a bitwise AND operation between the two provided values. | class:primitive | {n/a} | {n/a} | global | all | |||
137 | b:fetch | a-n | - | - | Fetch the 8-bit value stored at the specified address. Addressing for this is in 8-bit units. | class:word | {n/a) | {n/a} | global | all | |||
138 | b:fetch-next | a-an | - | - | Fetch the value stored at the specified address. Returns the next address and the value. | class:word | {n/a} | {n/a} | b | all | |||
139 | b:store | na- | - | - | Store an 8-bit value into the specified address. Addressing for this is in 8-bit units. | class:word | {n/a} | {n/a} | global | all | |||
140 | b:store-next | na-a | - | - | Store a value into the specified address and return the next address. | class:word | {n/a} | {n/a} | b | all | |||
141 | b:to-byte-address | a-a | - | - | Translate a physical address to a byte address. | class:word | {n/a} | {n/a} | global | all | |||
142 | banner | - | - | - | Display a welcome message on startup. | class:word | {n/a} | {n/a} | global | rre | {n/a} | ||
143 | bi | xqq-? | - | - | Execute q1 against x, then execute q2 against a copy of x. | class:word | #100 [ #10 * ] [ #10 - ] bi | {n/a} | global | all | |||
144 | bi* | xyqq-? | - | - | Execute q1 against x and q2 against y. | class:word | #10 #20 [ #2 * ] [ #10 / ] bi* | {n/a} | global | all | |||
145 | bi@ | xyq-? | - | - | Execute q against x, then execute q against y. | class:word | #10 #20 [ #3 * ] bi@ | {n/a} | global | all | |||
146 | binary | - | - | - | Set `Base` to binary. | class:word | {n/a} | {n/a} | a | all | |||
147 | block:read | na- | - | - | Read 1024 cells from block n in the block storage into memory at address a. | class:word | {n/a} | {n/a} | block | rre | |||
148 | block:set-file | s- | - | - | Set the file name of the block storage device. | class:word | {n/a} | {n/a} | block | rre | |||
149 | block:write | na- | - | - | Save the 1024 cells at address a to block n in the block storage. | class:word | {n/a} | {n/a} | block | rre | |||
150 | buffer:add | n- | - | - | Append a value to the current buffer. | class:word | {n/a} | {n/a} | buffer | all | |||
151 | buffer:empty | - | - | - | Reset the current buffer to an empty state. | class:word | {n/a} | {n/a} | buffer | all | |||
152 | buffer:end | -a | - | - | Return a pointer to the current end of the active buffer. | class:word | {n/a} | {n/a} | buffer | all | |||
153 | buffer:get | -n | - | - | Remove the last value from the current buffer. | class:word | {n/a} | {n/a} | buffer | all | |||
154 | buffer:preserve | q- | - | - | Save and restore the current buffer before and after executing the specified quote. | class:word | {n/a} | {n/a} | buffer | all | |||
155 | buffer:set | a- | - | - | Assign a new buffer as the current one. | class:word | {n/a} | {n/a} | buffer | all | |||
156 | buffer:size | -n | - | - | Return the number of cells in the buffer. | class:word | {n/a} | {n/a} | buffer | all | |||
157 | buffer:start | -a | - | - | Return the start address of the current buffer. | class:word | {n/a} | {n/a} | buffer | all | |||
158 | bye | - | - | - | Exit Retro. | class:word | {n/a} | {n/a} | global | all | |||
159 | c:-consonant? | c-f | - | - | Return TRUE if character is a not consonant or FALSE otherwise. | class:word | {n/a} | {n/a} | c | all | |||
160 | c:-digit? | c-f | - | - | Return TRUE if character is a not numeric digit or FALSE otherwise. | class:word | {n/a} | {n/a} | c | all | |||
161 | c:-lowercase? | c-f | - | - | Return TRUE if character is not lowercase or FALSE otherwise. | class:word | {n/a} | {n/a} | c | all | |||
162 | c:-uppercase? | c-f | - | - | Return TRUE if character is not uppercase or FALSE otherwise. | class:word | {n/a} | {n/a} | c | all | |||
163 | c:-visible? | c-f | - | - | Return TRUE if character is not printable or FALSE otherwise. | class:word | {n/a} | {n/a} | c | all | |||
164 | c:-vowel? | c-f | - | - | Return TRUE if character is not a vowel or FALSE otherwise. | class:word | {n/a} | {n/a} | c | all | |||
165 | c:-whitespace? | c-f | - | - | Return TRUE if character is not whitespace, or FALSE otherwise. | class:word | {n/a} | {n/a} | c | all | |||
166 | c:consonant? | c-f | - | - | Return TRUE if character is a consonant or FALSE otherwise. | class:word | {n/a} | {n/a} | c | all | |||
167 | c:digit? | c-f | - | - | Return TRUE if character is a numeric digit or FALSE otherwise. | class:word | {n/a} | {n/a} | c | all | |||
168 | c:get | -c | - | - | Vectored. Read a single keypress. | class:word | {n/a} | {n/a} | global | rre | |||
169 | c:letter? | c-f | - | - | Return TRUE if character is an ASCII letter or FALSE otherwise. | class:word | {n/a} | {n/a} | c | all | |||
170 | c:lowercase? | c-f | - | - | Return TRUE if character is lowercase or FALSE otherwise. | class:word | {n/a} | {n/a} | c | all | |||
171 | c:put | c- | - | - | Vectored. Display a single character. | class:word | {n/a} | {n/a} | global | all | |||
172 | c:to-lower | c-c | - | - | Convert character to lowercase equivalent. | class:word | {n/a} | {n/a} | c | all | |||
173 | c:to-number | c-n | - | - | Convert an ASCII digit character into the corresponding decimal value | class:word | {n/a} | {n/a} | global | all | |||
174 | c:to-string | c-s | - | - | Convert character into a string. | class:word | {n/a} | {n/a} | c | all | |||
175 | c:to-upper | c-c | - | - | Convert character to uppercase equivalent. | class:word | {n/a} | {n/a} | c | all | |||
176 | c:toggle-case | c-c | - | - | Convert an ASCII character to the opposite case. | class:word | {n/a} | {n/a} | c | all | |||
177 | c:uppercase? | c-f | - | - | Return TRUE if character is uppercase or FALSE otherwise. | class:word | {n/a} | {n/a} | c | all | |||
178 | c:visible? | c-f | - | - | Return TRUE if character is printable or FALSE otherwise. | class:word | {n/a} | {n/a} | c | all | |||
179 | c:vowel? | c-f | - | - | Return TRUE if character is a vowel or FALSE otherwise. | class:word | {n/a} | {n/a} | c | all | |||
180 | c:whitespace? | c-f | - | - | Return TRUE if character is whitespace, or FALSE otherwise. | class:word | {n/a} | {n/a} | c | all | |||
181 | call | a- | - | - | Call a function. | class:primitive | {n/a} | {n/a} | global | all | |||
182 | car | a-a | - | - | Return a pointer to the car of cons a. | class:word | {n/a} | {n/a} | global | all | |||
183 | car! | na- | - | - | Store n into the car of cons a. | class:word | {n/a} | {n/a} | global | all | |||
184 | car@ | a-n | - | - | Return the contents of the car of cons a. | class:word | {n/a} | {n/a} | global | all | |||
185 | case | nmq- || nmq-n | - | - | If `n` is equal to `m`, drop both and execute the specified quote before exiting the calling word. If not equal, leave `n` on the stack and let execution continue. | class:word | {n/a} | {n/a} | global | all | |||
186 | cdr | a-a | - | - | Return a pointer to the cdr of cons a. | class:word | {n/a} | {n/a} | global | all | |||
187 | cdr! | na- | - | - | Store n into the cdr of cons a. | class:word | {n/a} | {n/a} | global | all | |||
188 | cdr@ | a-n | - | - | Return the contents of the cdr of cons a. | class:word | {n/a} | {n/a} | global | all | |||
189 | choose | fqq- | - | - | Execute q1 if the flag is true (-1) or q2 if the flag is false (0). Only these flags are valid when using `choose`; passing other values as flags will result in memory corruption. | class:word | {n/a} | {n/a} | global | all | |||
190 | class:data | n- || n-n | - | - | Class handler for data structures. | Keep the address or value on the stack. | Compile the value or address as a literal into the current definition. | class:word | {n/a} | {n/a} | class | all | |
191 | class:macro | a- | - | - | Class handler for compiler macros (immediate words) | Execute the function at the provided address. | Execute the function at the provided address. | class:word | {n/a} | {n/a} | class | all | |
192 | class:primitive | a- | - | - | Class handler for primitive words (words which map to Nga instructions) | Execute the function. | Compile the machine code in the definiton into the current definition. | class:word | {n/a} | {n/a} | class | all | |
193 | class:word | a- | - | - | Class handler for normal words. | Execute the function at the provided address. | Compile a call to the specified address into the current definition. | class:word | {n/a} | {n/a} | class | all | |
194 | clear | - | - | - | Clear the display. | class:word | {n/a} | {n/a} | global | rre | |||
195 | clock:day | -n | - | - | Return the current day. | class:word | {n/a} | {n/a} | clock | iOS, rre | |||
196 | clock:hour | -n | - | - | Return the current hour. This will be in the range of 0-23, inclusive. | class:word | {n/a} | {n/a} | clock | iOS, rre | |||
197 | clock:minute | -n | - | - | Return the current minute. This will be in the range of 0-59, inclusive. | class:word | {n/a} | {n/a} | clock | iOS, rre | |||
198 | clock:month | -n | - | - | Return the current month. This will be in the range of 1-12, inclusive. | class:word | {n/a} | {n/a} | clock | iOS, rre | |||
199 | clock:operation | ...n- | - | - | Trigger a clock operation. This is not intended to be used directly. | class:word | {n/a} | {n/a} | clock | rre | |||
200 | clock:second | -n | - | - | Return the current second. This will be in the range of 0-59, inclusive. | class:word | {n/a} | {n/a} | clock | iOS, rre | |||
201 | clock:timestamp | -n | - | - | Return a host specific timestamp. In the standard system, this is a 32-bit Unix timestamp, but this is not required. | class:word | {n/a} | {n/a} | clock | rre | |||
202 | clock:utc:day | -n | - | - | Return the current day in UTC. | class:word | {n/a} | {n/a} | clock | iOS, rre | |||
203 | clock:utc:hour | -n | - | - | Return the current hour in UTC. | class:word | {n/a} | {n/a} | clock | iOS, rre | |||
204 | clock:utc:minute | -n | - | - | Return the current minute in UTC. | class:word | {n/a} | {n/a} | clock | iOS, rre | |||
205 | clock:utc:month | -n | - | - | Return the current month in UTC. | class:word | {n/a} | {n/a} | clock | iOS, rre | |||
206 | clock:utc:second | -n | - | - | Return the current second in UTC. | class:word | {n/a} | {n/a} | clock | iOS, rre | |||
207 | clock:utc:year | -n | - | - | Return the current year in UTC. | class:word | {n/a} | {n/a} | clock | iOS, rre | |||
208 | clock:year | -n | - | - | Return the current year. | class:word | {n/a} | {n/a} | clock | iOS, rre | |||
209 | comma | n- | - | - | Store the specified value into the memory at `here` and increment `Heap` by 1. Identical to `,`, this is provided for compatibility with the RetroForth on ilo and napia. | class:word | $a , $b , $c , #0 , | {n/a} | global | all | |||
210 | compile:call | a- | - | - | Compile a call to the specified address into the current definition. | class:word | {n/a} | {n/a} | compile | all | |||
211 | compile:jump | a- | - | - | Compile a jump to the specified address into the current definition. | class:word | {n/a} | {n/a} | compile | all | |||
212 | compile:lit | n- | - | - | Compile the code to push a number to the stack into the current definition. | class:word | {n/a} | {n/a} | compile | all | |||
213 | compile:ret | - | - | - | Compile a return instruction into the current definition. | class:word | {n/a} | {n/a} | compile | all | |||
214 | compiling? | -f | - | - | Return `TRUE` if compiler is on or `FALSE` otherwise. | class:word | {n/a} | {n/a} | global | all | |||
215 | cons | xy-a | - | - | Create a new cons cell with a car of x and a cdr of y. | class:word | {n/a} | {n/a} | global | all | |||
216 | const | ns- | - | - | Create a constant returning the specified value. | class:word | {n/a} | {n/a} | global | all | |||
217 | copy | sdl- | - | - | Copy `l` cells from memory at `s` to the memory at `d`. These should not overlap. | class:word | {n/a} | {n/a} | global | all | |||
218 | core:init | n- | - | - | Clear the internal state of core `n`. This should be done prior to use of `core:start`, which activates processing on the core. | class:word | {n/a} | {n/a} | core | rre | |||
219 | core:pause | n- | - | - | Suspend processing on core `n`. | class:word | {n/a} | {n/a} | core | rre | |||
220 | core:pause-current | - | - | - | Suspend processing on the current core. | class:word | {n/a} | {n/a} | core | rre | |||
221 | core:read/reg | n-v | - | - | Read a value from register `n` on the current core. | class:word | {n/a} | {n/a} | core | rre | |||
222 | core:resume | n- | - | - | Resume processing on core `n` after a `core:pause` or `core:pause-current`. | class:word | {n/a} | {n/a} | core | rre | |||
223 | core:start | an- | - | - | Set the IP of core `n` to address `a` and begin processing on core `n`. | class:word | {n/a} | {n/a} | core | rre | |||
224 | core:write/reg | vn- | - | - | Write a value to register number `n` on the current core. | class:word | {n/a} | {n/a} | core | rre | |||
225 | curry | nq-q | - | - | Bind a value to a function and return a new quote that calls the bound action. | class:word | {n/a} | {n/a} | global | all | |||
226 | d | n- | - | - | Inline a numeric value to the current assembly segment. | class:word | {n/a} | {n/a} | global | all | |||
227 | d:Hash-Function | - | - | - | Variable. Holds a pointer tho the function for calculating dictionary hashes. | class:data | {n/a} | {n/a} | d | all | |||
228 | d:add-header | saa- | - | - | Vectored. Create a header. Provide a string (s) for the name, a pointer to the class handler (a1) and a pointer to the word definition (a2) Generally this won't be used directly. | class:word | {n/a} | {n/a} | d | all | |||
229 | d:class | d-a | - | - | Given a dictionary header, return the class field. | class:word | {n/a} | {n/a} | d | all | |||
230 | d:create | s- | - | - | Hook. Create a new dictionary header named the specified string. The new header will point to `here` and have a class of `class:data`. | class:word | {n/a} | {n/a} | d | all | |||
231 | d:for-each | q- | - | - | Execute the specified quote once for each header in the dictionary. Before running the quote, this also pushes a pointer to the header onto the stack. | class:word | {n/a} | {n/a} | d | all | |||
232 | d:hash | d-a | - | - | Given a dictionary header, return the hash field. | class:word | {n/a} | {n/a} | d | all | |||
233 | d:last | -d | - | - | Return the most recent dictionary header. | class:word | {n/a} | {n/a} | d | all | |||
234 | d:last.class | -a | - | - | Return a pointer to the class field of the most recent dictionary header. | class:word | {n/a} | {n/a} | d | all | |||
235 | d:last.name | -s | - | - | Return a pointer to the name field of the most recent dictionary header. | class:word | {n/a} | {n/a} | d | all | |||
236 | d:last.xt | -a | - | - | Return a pointer to the xt field of the most recent dictionary header. | class:word | {n/a} | {n/a} | d | all | |||
237 | d:link | d-a | - | - | Given a dictionary header, return the link field. | class:word | {n/a} | {n/a} | d | all | |||
238 | d:lookup | s-d | - | - | Lookup the specified name in the dictionary and return a pointer to its dictionary header. This returns zero if the word is not found. This also sets an internal variable ('which' in retro.muri) to the header address. | class:word | {n/a} | {n/a} | d | all | |||
239 | d:lookup-xt | a-d | - | - | Lookup the specified address in the dictionary and return a pointer to its dictionary header. This returns zero if the word is not found. | class:word | {n/a} | {n/a} | d | all | |||
240 | d:name | d-s | - | - | Given a dictionary header, return the name field. | class:word | {n/a} | {n/a} | d | all | |||
241 | d:rehash | - | - | - | Update the hashes for all visible words in the dictionary. | class:word | {n/a} | {n/a} | d | all | |||
242 | d:set-source | ss- | - | - | Set the `d:source` field of the header for the named word (s2) to string (s1). The string will not be duplicated. | class:word | {n/a} | {n/a} | d | rre | |||
243 | d:source | d-a | - | - | Given a dictionary header, return the source field. | class:word | {n/a} | {n/a} | d | all | |||
244 | d:use-hashes | - | - | - | Change dictionary search to use hashed name comparions. | class:word | {n/a} | {n/a} | d | all | |||
245 | d:use-strings | - | - | - | Change dictionary search to use full name comparions. | class:word | {n/a} | {n/a} | d | all | |||
246 | d:words | - | - | - | Display a list of all named items in the `Dictionary`. | class:word | {n/a} | {n/a} | d | rre | |||
247 | d:words-beginning-with | s- | - | - | Display a list of all named items in the `Dictionary` that begin with the provided substring. | class:word | {n/a} | {n/a} | d | rre | |||
248 | d:words-with | s- | - | - | Display a list of all named items in the `Dictionary` that contain the provided substring. | class:word | {n/a} | {n/a} | d | rre | |||
249 | d:xt | d-a | - | - | Given a dictionary header, return the xt field. | class:word | {n/a} | {n/a} | d | all | |||
250 | data | - | - | - | Change the class of the most recently defined word to `class:data`. | class:word | {n/a} | {n/a} | global | all | |||
251 | decimal | - | - | - | Set `Base` to decimal. | class:word | {n/a} | {n/a} | a | all | |||
252 | depth | -n | - | - | Return the number of items on the stack. | class:word | {n/a} | {n/a} | global | all | |||
253 | dip | nq-n | - | - | Temporarily remove n from the stack, execute the quotation, and then restore n to the stack. | class:word | {n/a} | {n/a} | global | all | |||
254 | does | q- | - | - | Attach an action to the most recently created word. This is used in a manner similar to CREATE/DOES> in traditional Forth. | class:word | {n/a} | {n/a} | global | all | |||
255 | double:const | nns- | - | - | Create a constant returning the specified double cell value. | class:word | {n/a} | {n/a} | double | rre | |||
256 | double:dip | mnq-mn | - | - | Temporarily remove m and n from the stack, execute the quotation, and then restore m and n to the stack. | class:word | {n/a} | {n/a} | global | all | |||
257 | double:fetch | a-n | - | - | Fetch the double cell values stored in the double cell variable at a. | class:word | {n/a} | {n/a} | double | rre | |||
258 | double:sip | mnq(?n-?)-mn | - | - | Run quote. After execution completes, put a copy of m and n back on top of the stack. | class:word | {n/a} | {n/a} | global | all | |||
259 | double:store | nna- | - | - | Store the double cell values on the stack in the double cell variable at a. | class:word | {n/a} | {n/a} | double | rre | |||
260 | double:swap | nnmm-mmnn | - | - | Swap double cell value on stack. | class:word | {n/a} | {n/a} | double | rre | |||
261 | double:var | nns- | - | - | Create a variable for holding the specified double cell value. | class:word | {n/a} | {n/a} | double | rre | |||
262 | drop | n- | - | - | Discard the top value on the stack. | class:primitive | {n/a} | {n/a} | global | all | |||
263 | drop-pair | nn- | - | - | Remove top two items on the stack. | class:word | {n/a} | {n/a} | global | all | |||
264 | dump-stack | - | - | - | Display the items on the data stack. | class:word | {n/a} | {n/a} | global | all | |||
265 | dup | n-nn | - | - | Duplicate the top item on the stack. | class:primitive | {n/a} | {n/a} | global | all | |||
266 | dup-pair | nm-nmnm | - | - | Duplicate the top two items on the stack. | class:word | {n/a} | {n/a} | global | all | |||
267 | e:-INF | -e | - | - | Constant. Negative infinity. For encoded floating-point values. | class:word | {n/a} | {n/a} | e | rre | {n/a} | ||
268 | e:-inf? | e-f | - | - | Is encoded value negative infinity? | class:word | {n/a} | {n/a} | e | rre | {n/a} | ||
269 | e:INF | -e | - | - | Constant. Infinity. For encoded floating-point values. | class:word | {n/a} | {n/a} | e | rre | {n/a} | ||
270 | e:MAX | -e | - | - | Constant. Maximum value. For encoded floating-point values. | class:word | {n/a} | {n/a} | e | rre | |||
271 | e:MIN | -e | - | - | Constant. Minimum value. For encoded floating-point values. | class:word | {n/a} | {n/a} | e | rre | {n/a} | ||
272 | e:NAN | -e | - | - | Constant. Not a Number. For encoded floating-point values. | class:word | {n/a} | {n/a} | e | rre | {n/a} | ||
273 | e:clip | e-E | - | - | Constrain the encoded value to the allowable range. | class:word | {n/a} | {n/a} | e | rre | |||
274 | e:inf? | e-f | - | - | Is encoded value infinity? | class:word | {n/a} | {n/a} | e | rre | {n/a} | ||
275 | e:max? | e-f | - | - | Is encoded value at the maximum? | class:word | {n/a} | {n/a} | e | rre | {n/a} | ||
276 | e:min? | e-f | - | - | Is encoded value at the minimum? | class:word | {n/a} | {n/a} | e | rre | {n/a} | ||
277 | e:n? | e-f | - | - | Return `TRUE` if the encoded value is a valid number, or `FALSE` otherwise. | class:word | {n/a} | {n/a} | e | rre | |||
278 | e:nan? | e-f | - | - | Is encoded value a Nan? | class:word | {n/a} | {n/a} | e | rre | {n/a} | ||
279 | e:put | e- | - | - | Display an encoded number. | class:word | {n/a} | {n/a} | e | rre | |||
280 | e:to-f | e- | - | -n | Decode an encoded floating-point value. | class:word | {n/a} | {n/a} | e | rre | |||
281 | e:zero? | e-f | - | - | Return `TRUE` if the value is zero, or `FALSE` otherwise. | class:word | {n/a} | {n/a} | e | rre | |||
282 | eq? | nn-f | - | - | Compare two values for equality. Returns `TRUE` if they are equal or `FALSE` otherwise. | class:primitive | #1 #2 eq?\n $a $b eq? | {n/a} | global | all | |||
283 | err:dso | - | - | - | Error handler for data stack overflow | class:word | {n/a} | {n/a} | err | all | |||
284 | err:dsu | - | - | - | Error handler for data stack underflow. | class:word | {n/a} | {n/a} | err | all | |||
285 | err:notfound | - | - | - | Vectored. Error handler. Called when a word is not found by `interpret`. | class:word | {n/a} | {n/a} | err | all | |||
286 | err:set-defaults | - | - | - | Set the default error handlers for various conditions. | class:word | {n/a} | {n/a} | err | all | |||
287 | err:set-handler | an- | - | - | Set error handler for error code N. | class:word | {n/a} | {n/a} | err | all | |||
288 | f:* | - | - | FF-F | Multiply two floating-point numbers, returning the result. | class:word | .3.1415 .22 f:* | {n/a} | f | rre | |||
289 | f:+ | - | - | FF-F | Add two floating-point numbers, returning the result. | class:word | .3.1 .22 f:+ | {n/a} | f | rre | |||
290 | f:- | - | - | FF-F | Subtract F2 from F1 returning the result. | class:word | .22.3 .0.12 f:- | {n/a} | f | rre | |||
291 | f:-INF | - | - | -n | Return a value corresponding to negative infinity | class:word | {n/a} | {n/a} | f | rre | |||
292 | f:-eq? | -f | - | FF- | Compare two floating-point values for inequality. Returns `TRUE` if they are not equal or `FALSE` otherwise. | class:word | {n/a} | {n/a} | f | rre | |||
293 | f:-inf? | -f | - | F- | Return `TRUE` if floating-point value is -INF or `FALSE` otherwise. | class:word | {n/a} | {n/a} | f | rre | |||
294 | f:/ | - | - | FF-F | Divide floating-point value F1 by F2. | class:word | {n/a} | {n/a} | f | rre | |||
295 | f:E | - | - | -F | Return the floating-point value for Euler's number. | class:word | {n/a} | {n/a} | f | rre | |||
296 | f:E1 | - | - | -f | Hook. Return a constant used as the scaling factor for the e: words. | class:word | {n/a} | {n/a} | f | rre | {n/a} | ||
297 | f:INF | - | - | -n | Return a value corresponding to positive infinity | class:word | {n/a} | {n/a} | f | rre | |||
298 | f:NAN | - | - | -n | Return a value corresponding to NaN | class:word | {n/a} | {n/a} | f | rre | |||
299 | f:PI | - | - | -F | Return the floating-point value for PI. | class:word | {n/a} | {n/a} | f | rre | |||
300 | f:abs | - | - | F-F | Return the absolute value for a floating-point value. | class:word | {n/a} | {n/a} | f | rre | |||
301 | f:acos | - | - | F-F | Return the arc cosine of a floating-point number. | class:word | {n/a} | {n/a} | f | rre | |||
302 | f:adepth | -n | - | - | Return the number of items on the alternate floating-point stack. | class:word | {n/a} | {n/a} | f | rre | |||
303 | f:asin | - | - | F-F | Return the arc sine of a floating-point number. | class:word | {n/a} | {n/a} | f | rre | |||
304 | f:atan | - | - | F-F | Return the arc tangent of a floating-point number. | class:word | {n/a} | {n/a} | f | rre | |||
305 | f:between? | -f | - | nlu- | Return TRUE if number is between the lower (l) and upper (u) bounds. If not, return FALSE. This is inclusive of the limits. | class:word | .3 .1 .100 f:between?\n .100 .200 .300 f:between? | {n/a} | f | rre | |||
306 | f:case | q- | - | nm-n | If `n` is equal to `m`, drop both and execute the specified quote before exiting the calling word. If not equal, leave `n` on the stack and let execution continue. | class:word | {n/a} | {n/a} | f | rre | |||
307 | f:ceiling | - | - | F-F | Return the smallest integral value greater than or equal to the specified value. | class:word | {n/a} | {n/a} | f | rre | |||
308 | f:cos | - | - | F-F | Return the cosine of a floating-point number. | class:word | {n/a} | {n/a} | f | rre | |||
309 | f:dec | - | - | n-m | Decrement n by one. | class:word | .100 f:dec | {n/a} | f | rre | |||
310 | f:depth | -n | - | - | Return the number of items on the floating-point stack. | class:word | {n/a} | {n/a} | f | rre | |||
311 | f:drop | - | - | F- | Discard the top item on the floating-point stack. | class:word | {n/a} | {n/a} | f | rre | |||
312 | f:drop-pair | - | - | FF- | Remove top two items on the stack. | class:word | {n/a} | {n/a} | f | rre | |||
313 | f:dump-astack | - | - | - | Display the items on the alternate floating-point stack. | class:word | {n/a} | {n/a} | f | rre | |||
314 | f:dump-stack | - | - | - | Display the items on the floating-point stack. | class:word | {n/a} | {n/a} | f | rre | |||
315 | f:dup | - | - | F-FF | Duplicate the top item on the floating-point stack. | class:word | {n/a} | {n/a} | f | rre | |||
316 | f:dup-pair | - | - | nm-nmnm | Duplicate the top two items on the stack. | class:word | {n/a} | {n/a} | f | rre | |||
317 | f:eq? | -f | - | FF- | Compare two floating-point values for equality. Returns `TRUE` if they are equal or `FALSE` otherwise. | class:word | {n/a} | {n/a} | f | rre | |||
318 | f:fetch | a- | - | -n | Fetch a stored floating-point value. | class:word | {n/a} | {n/a} | f | rre | |||
319 | f:floor | - | - | F-F | Perform a mathematical floor operation on the floating-point value. | class:word | {n/a} | {n/a} | f | rre | |||
320 | f:gt? | -f | - | FF- | Compare two floating-point values for greater than. | class:word | {n/a} | {n/a} | f | rre | |||
321 | f:inc | - | - | n-m | Increment n by one. | class:word | .100 f:inc | {n/a} | f | rre | |||
322 | f:inf? | -f | - | F- | Return `TRUE` if floating-point value is INF or `FALSE` otherwise. | class:word | {n/a} | {n/a} | f | rre | |||
323 | f:limit | - | - | nlu-m | Return n if it is within the lower (l) and upper (u) bounds. If outside the bounds, return the closes boundary value. | class:word | .-10 .5 .8 f:limit\n .10 .1 .15 f:limit | {n/a} | f | rre | |||
324 | f:log | - | - | FF-F | Return log(F1) for base F2 for floating-point values. | class:word | {n/a} | {n/a} | f | rre | |||
325 | f:lt? | -f | - | FF- | Compare two floating-point values for less than. | class:word | {n/a} | {n/a} | f | rre | |||
326 | f:max | - | - | mn-o | Return the greater of two values. | class:word | .1 .7 f:max\n .-8 .-10 f:max | {n/a} | f | rre | |||
327 | f:min | - | - | mn-o | Return the lesser of two values. | class:word | .1 .7 f:min\n .-8 .-10 f:min | {n/a} | f | rre | |||
328 | f:nan? | -f | - | F- | Return `TRUE` if floating-point value is NaN or `FALSE` otherwise. | class:word | {n/a} | {n/a} | f | rre | |||
329 | f:negate | - | - | F-F | Invert the sign of the floating-point value. | class:word | .3.1415 f:negate | {n/a} | f | rre | |||
330 | f:negative? | -f | - | F- | Return `TRUE` if floating-point value is negative or `FALSE` if not. | class:word | {n/a} | {n/a} | f | rre | |||
331 | f:nip | - | - | NM-M | Remove the second item from the stack. | class:word | {n/a} | {n/a} | f | rre | |||
332 | f:over | - | - | FG-FGF | Put a copy of the second floating-point value over the top one. | class:word | {n/a} | {n/a} | f | rre | |||
333 | f:pop | - | - | -F | Pop a floating-point value from the alternate stack. | class:word | {n/a} | {n/a} | f | rre | |||
334 | f:positive? | -f | - | F- | Return `TRUE` if floating-point value is positive or `FALSE` otherwise. | class:word | {n/a} | {n/a} | f | rre | |||
335 | f:power | - | - | FF-F | Return F1^F2 for floating-point values. | class:word | {n/a} | {n/a} | f | rre | |||
336 | f:push | - | - | F- | Push a floating-point value to an alternative stack. | class:word | {n/a} | {n/a} | f | rre | |||
337 | f:put | - | - | F- | Display a floating-point number. | class:word | {n/a} | {n/a} | global | rre | |||
338 | f:rot | - | - | abc-bca | Rotate the top three values. | class:word | {n/a} | {n/a} | f | rre | |||
339 | f:round | - | - | f-f | Round a floating-point value. | class:word | {n/a} | {n/a} | f | rre | |||
340 | f:sign | -n | - | F- | Return 1 if the floating-point value is positive or -1 if it is negative. | class:word | .3.1415 f:sign | {n/a} | f | rre | |||
341 | f:signed-sqrt | - | - | F-F | Return the square root of a floating-point number. | class:word | {n/a} | {n/a} | f | rre | |||
342 | f:signed-square | - | - | f-f | Return the square of a floating-point number. | class:word | {n/a} | {n/a} | f | rre | |||
343 | f:sin | - | - | F-F | Return the sine of a floating-point number. | class:word | {n/a} | {n/a} | f | rre | |||
344 | f:sqrt | - | - | F-F | Return the square root of a floating-point number. | class:word | {n/a} | {n/a} | f | rre | |||
345 | f:square | - | - | f-f | Return the square of a floating-point number. | class:word | {n/a} | {n/a} | f | rre | |||
346 | f:store | a- | - | n- | Store a floating-point value to the specified memory location. | class:word | {n/a} | {n/a} | f | rre | |||
347 | f:swap | - | - | FG-GF | Exchange the top and second items on the floating-point stack. | class:word | {n/a} | {n/a} | f | rre | |||
348 | f:tan | - | - | F-F | Return the tangent of a floating-point number. | class:word | {n/a} | {n/a} | f | rre | |||
349 | f:to-e | -e | - | n- | Encode the floating-point value to an integer. | class:word | {n/a} | {n/a} | f | rre | |||
350 | f:to-number | -n | - | F- | Convert a floating-point value into a number. | class:word | {n/a} | {n/a} | f | rre | |||
351 | f:to-string | -s | - | F- | Convert a floating-point value into a string. | class:word | {n/a} | {n/a} | f | rre | |||
352 | f:tuck | - | - | FG-GFG | Tuck a copy of the top floating-point value under the second one. | class:word | {n/a} | {n/a} | f | rre | |||
353 | fetch | a-n | - | - | Fetch the value stored at the specified address. | class:primitive | &Version fetch | {n/a} | global | all | |||
354 | fetch-next | a-an | - | - | Fetch the value stored at the specified address. Returns the next address and the value. | class:word | {n/a} | {n/a} | global | all | |||
355 | ffi:invoke | n- | - | - | Invoke an FFI function. Set the stack as needed, and pass the FFI handle to this. | class:wrd | {n/a} | {n/a} | ffi | rre | |||
356 | ffi:map-sym | sn-n | - | - | Map in a symbol from a shared library or object file. Returns an FFI handle. | class:word | {n/a} | {n/a} | ffi | rre | |||
357 | ffi:open | s-n | - | - | Open a shared library or object file. | class:word | {n/a} | {n/a} | ffi | rre | |||
358 | ffi:operation | n-? | - | - | Trigger an i/o operation using the FFI device. | class:word | {n/a} | {n/a} | ffi | rre | |||
359 | file:A | -n | - | - | Constant for opening a file in APPEND mode. | class:data | {n/a} | {n/a} | file | rre | |||
360 | file:R | -n | - | - | Constant for opening a file in READ mode. | class:data | {n/a} | {n/a} | file | rre | |||
361 | file:R+ | -n | - | - | Constant for opening a file in READ & WRITE mode. | class:data | {n/a} | {n/a} | file | rre | |||
362 | file:W | -n | - | - | Constant for opening a file in WRITE mode. | class:data | {n/a} | {n/a} | file | rre | |||
363 | file:close | h- | - | - | Given a file handle, close the file. | class:word | {n/a} | {n/a} | file | rre | |||
364 | file:delete | s- | - | - | Delete the named file. | class:word | {n/a} | {n/a} | file | rre | |||
365 | file:exists? | s-f | - | - | Given a file name, return `TRUE` if it exists or `FALSE` if it does not. | class:word | {n/a} | {n/a} | file | rre | |||
366 | file:flush | h- | - | - | Given a file handle, flush any pending writes to disk. | class:word | {n/a} | {n/a} | file | rre | |||
367 | file:for-each-line | sq- | - | - | Given a file name, open it and run the quote once for each line in the file. | class:word | {n/a} | {n/a} | file | rre | |||
368 | file:open | sm-h | - | - | Open a named file (s) with the given mode (m). Returns a handle identifying the file. | class:word | '/etc/motd file:R file:open | {n/a} | file | rre | |||
369 | file:open-for-append | s-nn | - | - | Open a file for reading & writing. Returns the size (NOS) and a file ID (TOS) | class:word | {n/a} | {n/a} | file | rre | |||
370 | file:open-for-reading | s-nn | - | - | Open a file for reading. Returns the size (NOS) and a file ID (TOS) | class:word | {n/a} | {n/a} | file | rre | |||
371 | file:open-for-writing | s-n | - | - | Open a file for writing. Returns the file ID | class:word | {n/a} | {n/a} | file | rre | |||
372 | file:operation | ...n- | - | - | Trigger a file I/O operation. This is not intended to be used directly. | class:word | {n/a} | {n/a} | file | rre | |||
373 | file:read | h-c | - | - | Given a file handle, read and return the next byte in it. | class:word | {n/a} | {n/a} | file | rre | |||
374 | file:read/bytes | pnf- | - | - | Given a pointer, a count, and a file handle, read and store the requested number of bytes into memory, starting at the specified address. | class:word | {n/a} | {n/a} | file | rre | |||
375 | file:read/c | h-c | - | - | Given a file handle, read and return the next character in it. If compiled with UTF32 support this will read and convert UTF8. | class:word | {n/a} | {n/a} | file | rre | |||
376 | file:seek | nh- | - | - | Move the current offset into a file to the specified one. | class:word | {n/a} | {n/a} | file | rre | |||
377 | file:size | h-n | - | - | Given a file handle, return the size of the file (in bytes). | class:word | {n/a} | {n/a} | file | rre | |||
378 | file:slurp | as- | - | - | Given an address and a file name, read the file contents into memory starting at the address. | class:word | {n/a} | {n/a} | file | rre | |||
379 | file:spew | ss- | - | - | Given a string (s1) and a file name (s2), write the string into the file, replacing any existing content. | class:word | {n/a} | {n/a} | file | rre | |||
380 | file:tell | h-n | - | - | Given a file handle, return the current offset in the file. | class:word | {n/a} | {n/a} | file | rre | |||
381 | file:write | ch- | - | - | Write a byte to the file represented by the handle. | class:word | {n/a} | {n/a} | file | rre | |||
382 | file:write/bytes | pnf- | - | - | Write n bytes to the file represented by the handle. Bytes are taken from memory, starting at the provided address. | class:word | {n/a} | {n/a} | file | rre | |||
383 | file:write/c | ch- | - | - | Write a character to the file represented by the handle. If built with UTF32 support, this will translate the character back to a UTF8 sequence before writing. | class:word | {n/a} | {n/a} | file | rre | |||
384 | fll:append/value | pv- | - | - | Append a cons cell to a list. | class:word | {n/a} | {n/a} | rre | all | |||
385 | fll:create | v-p | - | - | Create a new list wit the given value as the car of the first node. | class:word | {n/a} | {n/a} | rre | all | |||
386 | fll:del | pn- | - | - | Remove the specified cons from a list. | class:word | {n/a} | {n/a} | rre | all | |||
387 | fll:drop | p- | - | - | Remove the last cons from a list. | class:word | {n/a} | {n/a} | rre | all | |||
388 | fll:for-each | pq- | - | - | Run a quotation against each value in a list. | class:word | {n/a} | {n/a} | rre | all | |||
389 | fll:inject | pnv- | - | - | Insert a new cons (v) into the list (p), at the specified index (n). | class:word | {n/a} | {n/a} | rre | all | |||
390 | fll:length | p-n | - | - | Return the length of a list. | class:word | {n/a} | {n/a} | rre | all | |||
391 | fll:put | p- | - | - | Display the (as numbers) values in a list. | class:word | {n/a} | {n/a} | rre | all | |||
392 | fll:to-end | p-p | - | - | Given a pointer to a list, return a pointer to the last cons cell. | class:word | {n/a} | {n/a} | rre | all | |||
393 | fll:to-index | pn-p | - | - | Given a node number, return a pointer to the cons cell in the list. | class:word | {n/a} | {n/a} | rre | all | |||
394 | float:operation | ...n- | - | - | Trigger a floating-point operation. This is not intended to be used directly. | class:word | {n/a} | {n/a} | float | rre | |||
395 | forever | q- | - | - | Run quotation in an endless loop. | class:word | {n/a} | {n/a} | a | all | |||
396 | gc | a- | - | - | Save value of `Heap`, run the function provided, then restore `Heap`. | class:word | {n/a} | {n/a} | global | all | |||
397 | gopher:get | asns-n | - | - | Takes an address, a server, a port, and a selector. Fetch the resource and store it at address. Return the number of bytes received. | class:word | here 'forthworks.com #70 '/ gopher:get\n here s:put | {n/a} | gopher | ios | |||
398 | gt? | nn-f | - | - | Compare n1 and n2. Return `TRUE` if n1 is greater than n2, or `FALSE` otherwise. | class:primitive | {n/a} | {n/a} | global | all | |||
399 | gteq? | nn-f | - | - | Compare n1 and n2. Return `TRUE` if n1 is greater than or equal to n2, or `FALSE` otherwise. | class:word | {n/a} | {n/a} | global | all | |||
400 | h:fetch | a-n | - | - | Fetch the 16-bit value stored at the specified address. Addressing for this is in 8-bit units. | class:word | {n/a) | {n/a} | global | all | |||
401 | h:fetch-next | a-an | - | - | Fetch the value stored at the specified address. Returns the next address and the value. | class:word | {n/a} | {n/a} | h | all | |||
402 | h:store | na- | - | - | Store an 16-bit value into the specified address. Addressing for this is in 8-bit units. | class:word | {n/a} | {n/a} | global | all | |||
403 | h:store-next | na-a | - | - | Store a value into the specified address and return the next address. | class:word | {n/a} | {n/a} | h | all | |||
404 | here | -a | - | - | Return the next free address in memory. | class:word | {n/a} | {n/a} | global | all | |||
405 | hex | - | - | - | Set `Base` to hexadecimal. | class:word | {n/a} | {n/a} | a | all | |||
406 | hook | - | - | - | Add a hook point into the current word. This should only be used as the first word in a definition. | class:macro | :foo hook ; | :bar hook (default_action: n:square n:put nl ; | global | global | |||
407 | i | s- | - | - | Assemble the instructions specified by the string into the current assembly scope. | class:word | {n/a} | {n/a} | global | all | |||
408 | if | fq- | - | - | Execute the quote if the flag is `TRUE`. | class:word | {n/a} | {n/a} | global | all | |||
409 | if; | fq- | - | - | Execute the quotation if the flag is `TRUE`. If true, also exit the word. | class:word | {n/a} | {n/a} | global | all | |||
410 | image:save | s- | - | - | Save the current system to a new image file. | class:word | {n/a} | {n/a} | image | rre | |||
411 | immediate | - | - | - | Change the class of the most recently defined word to `class:macro`. | class:word | {n/a} | {n/a} | global | all | |||
412 | include | s- | - | - | Run the code in the specified file. | class:word | {n/a} | {n/a} | global | rre | |||
413 | indexed-times | nq- | - | - | Run a quote the specified number of times, tracking the loop index in `I`. This is less efficient than `times`, so if the index is not needed, this should be avoided. | class:word | {n/a} | {n/a} | global | all | |||
414 | interpret | s- | - | - | Vectored. Interpret a single input token. | class:word | '#100 interpret\n 'words interpret | {n/a} | global | all | |||
415 | io:core | ...n- | - | - | Trigger an I/O operation involving multicore support. Unix system call. | class:word | {n/a} | {n/a} | io | rre | |||
416 | io:enumerate | -n | - | - | Return the number of I/O devices. | class:word | {n/a} | {n/a} | io | all | |||
417 | io:invoke | n- | - | - | Invoke an interaction with an I/O device. | class:word | {n/a} | {n/a} | io | all | |||
418 | io:query | n-mN | - | - | Ask an I/O device to identify itself. Returns a version (m) and device ID (N). | class:word | {n/a} | {n/a} | io | all | |||
419 | io:scan-for | n-m | - | - | Scan the I/O devices for a device with a specified ID. Returns the device number, or -1 if not found. | class:word | {n/a} | {n/a} | io | all | |||
420 | io:unix-syscall | ...n- | - | - | Trigger a Unix system call. This is not intended to be used directly. | class:word | {n/a} | {n/a} | io | rre | |||
421 | library:.CONFIG | -s | - | - | Data. Return a template for a library file name in `~/.config/retroforth/library`. | class:data | {n/a} | {n/a} | global | rre | |||
422 | library:.config | s-s | - | - | Find the users home directory and construct a filename for a library in the `~/.config/retroforth/library` directory. | class:word | {n/a} | {n/a} | global | rre | |||
423 | library:CWD | -s | - | - | Data. Return a template for a library file name in `./library`. | class:data | {n/a} | {n/a} | global | rre | |||
424 | library:contains? | s-f | - | - | Check to see if a library exists. | class:word | {n/a} | {n/a} | global | rre | |||
425 | library:cwd | s-s | - | - | Construct a filename for a library in the `~/library` directory. | class:word | {n/a} | {n/a} | global | rre | |||
426 | library:filename | s-s | - | - | Given a library name, construct the actual filename to load. | class:word | {n/a} | {n/a} | global | rre | |||
427 | listen | - | - | - | Run interactive "listener" (a REPL). | class:word | {n/a} | {n/a} | global | rre | |||
428 | lt? | nn-f | - | - | Compare n1 and n2. Return `TRUE` if n1 is less than n2, or `FALSE` otherwise. | class:primitive | {n/a} | {n/a} | global | all | |||
429 | lteq? | nn-f | - | - | Compare n1 and n2. Return `TRUE` if n1 is less than or equal to n2, or `FALSE` otherwise. | class:word | {n/a} | {n/a} | global | all | |||
430 | mem:alloc | n-nn | - | - | Use malloc to allocate memory. Returns a double cell pointer to this memory. | class:word | {n/a} | {n/a} | mem | rre | |||
431 | mem:cell+ | nnn-n | - | - | Return address of next cell. Uses a double cell pointer on the stack. | class:word | {n/a} | {n/a} | mem | rre | |||
432 | mem:fetch | nn-n | - | - | Fetch value from malloc'd memory region. Address is a double cell value. | class:word | {n/a} | {n/a} | mem | rre | |||
433 | mem:fetch-double | nn-n | - | - | Fetch a double cell value from a malloc memory region. | class:word | {n/a} | {n/a} | mem | rre | |||
434 | mem:free | nn- | - | - | Fre a malloc'd region of memory. Pass a double cell pointer to the memory to free. | class:word | {n/a} | {n/a} | mem | rre | |||
435 | mem:resize | mmn- | - | - | Resize a malloc'd memory area. | class:word | {n/a} | {n/a} | mem | rre | |||
436 | mem:store | xnn- | - | - | Store a value into a malloc'd memory region. Uses a double cell pointer for the address. | class:word | {n/a} | {n/a} | mem | rre | |||
437 | mem:store-double | xxnn- | - | - | Store a double value into a malloc'd memory region. Uses a double cell pointer for the address. | class:word | {n/a} | {n/a} | mem | rre | |||
438 | mod | nm-o | - | - | Divide `n` by `m` and return the remainder. | class:word | {n/a} | {n/a} | global | all | |||
439 | n:-zero? | n-f | - | - | Return `TRUE` if number is not zero, or `FALSE` otherwise. | class:word | {n/a} | {n/a} | n | all | |||
440 | n:MAX | -n | - | - | Return the maximum value that will fit in a cell. | class:word | {n/a} | {n/a} | n | all | |||
441 | n:MIN | -n | - | - | Return the minimum value that will fit in a cell. | class:word | {n/a} | {n/a} | n | all | |||
442 | n:abs | n-n | - | - | Return the absolute value of a number. | class:word | #10 n:abs\n #-10 n:abs\n | {n/a} | n | all | |||
443 | n:add | nn-n | - | - | Add `n1` to `n2` and return the result. | class:primitive | #1 #2 + | {n/a} | global | all | |||
444 | n:between? | nlu-f | - | - | Return TRUE if number is between the lower (l) and upper (u) bounds. If not, return FALSE. This is inclusive of the limits. | class:word | #3 #1 #100 n:between?\n $q $a $b n:between? | {n/a} | n | all | |||
445 | n:dec | n-m | - | - | Decrement n by one. | class:word | #100 n:dec | {n/a} | n | all | |||
446 | n:div | nm-v | - | - | Divide `n` by `m` and return the integer part of the quotient. | class:word | {n/a} | {n/a} | global | all | |||
447 | n:divmod | nm-rv | - | - | Divide `n` by `m` and return the integer part of the quotient and remainder. | class:primitive | {n/a} | {n/a} | global | all | |||
448 | n:even? | n-f | - | - | Return `TRUE` if number is even, or `FALSE` if not. | class:word | #12 n:even?\n #11 n:even? | {n/a} | n | all | |||
449 | n:inc | n-m | - | - | Increment n by one. | class:word | #100 n:inc | {n/a} | n | all | |||
450 | n:limit | nlu-m | - | - | Return n if it is within the lower (l) and upper (u) bounds. If outside the bounds, return the closes boundary value. | class:word | #-10 #5 #8 n:limit\n #10 #1 #15 n:limit | {n/a} | n | all | |||
451 | n:max | mn-o | - | - | Return the greater of two values. | class:word | #1 #7 n:max\n #-8 #-10 n:max | {n/a} | n | all | |||
452 | n:min | mn-o | - | - | Return the lesser of two values. | class:word | #1 #7 n:min\n #-8 #-10 n:min | {n/a} | n | all | |||
453 | n:mod | nm-o | - | - | Divide `n` by `m` and return the remainder. | class:word | {n/a} | {n/a} | global | all | |||
454 | n:mul | nn-n | - | - | Multiply `n1` by `n2` and return the result. | class:primitive | #2 #6 *\n #-1 #100 * | {n/a} | global | all | |||
455 | n:negate | n-n | - | - | Invert the sign of a number. | class:word | #10 n:negate\n #-10 n:negate | {n/a} | n | rre | |||
456 | n:negative? | n-f | - | - | Return `TRUE` if number is negative, or `FALSE` if not. | class:word | {n/a} | {n/a} | n | all | |||
457 | n:odd? | n-f | - | - | Return `TRUE` if number is odd, or `FALSE` if not. | class:word | {n/a} | {n/a} | n | all | |||
458 | n:positive? | n-f | - | - | Return `TRUE` if number is positive, or `FALSE` if not. | class:word | {n/a} | {n/a} | n | all | |||
459 | n:pow | bp-n | - | - | Return base (b) to power (p). | class:word | {n/a} | {n/a} | n | all | |||
460 | n:put | n- | - | - | Display a number. | class:word | {n/a} | {n/a} | global | all | |||
461 | n:random | -n | - | - | Return a random number. | class:word | n:random n:put | {n/a} | n | rre | |||
462 | n:sqrt | n-m | - | - | Return the square root of a number. | class:word | {n/a} | {n/a} | n | all | |||
463 | n:square | n-m | - | - | Return the square of a number. | class:word | {n/a} | {n/a} | n | all | |||
464 | n:strictly-positive? | n-f | - | - | Return TRUE if number is greater than zero or FALSE if it is zero or less. | class:word | {n/a} | {n/a} | n | all | |||
465 | n:sub | nn-n | - | - | Subtract `n2` from `n1` and return the result. | class:primitive | #2 #1 - | {n/a} | global | all | |||
466 | n:to-float | n- | - | -F | Convert a number into a floating-point value. | class:word | {n/a} | {n/a} | n | rre | |||
467 | n:to-string | n-s | - | - | Convert a number into a string. | class:word | {n/a} | {n/a} | n | all | |||
468 | n:zero? | n-f | - | - | Return `TRUE` if number is zero, or `FALSE` otherwise. | class:word | {n/a} | {n/a} | n | all | |||
469 | nip | nm-m | - | - | Remove the second item from the stack. | class:word | {n/a} | {n/a} | global | all | |||
470 | nl | - | - | - | Display a newline. | class:word | {n/a} | {n/a} | global | all | |||
471 | not | n-m | - | - | Perform a logical NOT operation. | class:word | {n/a} | {n/a} | global | all | |||
472 | octal | - | - | - | Set `Base` to octal. | class:word | {n/a} | {n/a} | a | all | |||
473 | or | mn-o | - | - | Perform a bitwise OR between the provided values. | class:primitive | {n/a} | {n/a} | global | all | |||
474 | over | nm-nmn | - | - | Put a copy of n over m. | class:word | {n/a} | {n/a} | global | all | |||
475 | pack | nnnn-n | - | - | Pack four 8-bit values into a 32-bit value. | class:word | {n/a} | {n/a} | global | all | |||
476 | parse-until | q-s | - | - | Read input from stdin (via `c:get`) until the returned character is matched by the quote. Returns a string. | class:word | :read-until-period (-s)\n [ $. eq? ] parse-until ; | {n/a} | all | rre | |||
477 | pb:get | a- | - | - | Copy a string from the pasteboard to the specified address. | class:word | {n/a} | {n/a} | pb | iOS | {n/a} | ||
478 | pb:length | -n | - | - | Return the length of the string on the pasteboard. | class:word | {n/a} | pb | pb | iOS | |||
479 | pb:set | s- | - | - | Copy a string to the pasteboard. | class:word | {n/a} | {n/a} | pb | iOS | |||
480 | pop | -n | n- | - | Move a value from the return stack to the data stack. | class:macro | {n/a} | {n/a} | global | all | |||
481 | primitive | - | - | - | Change the class of the most recently defined word to `class:primitive`. | class:word | {n/a} | {n/a} | global | all | |||
482 | push | n- | -n | - | Move a value from the data stack to the return stack. | class:macro | {n/a} | {n/a} | global | all | |||
483 | r | s- | - | - | Lookup a reference by name and inline its pointer to the current assembly segment. | class:word | {n/a} | {n/a} | global | all | |||
484 | reclass | a- | - | - | Change the class handler of the most recently defined word to the specified one. | class:word | {n/a} | {n/a} | global | all | |||
485 | reorder | ...ss-? | - | - | Restructure the order of items on the stack. | class:word | {n/a} | {n/a} | global | all | |||
486 | repeat | - | - | - | Begin an unconditional loop. | class:macro | {n/a} | {n/a} | global | all | |||
487 | reset | ...- | - | - | Remove all items from the stack. | class:word | {n/a} | {n/a} | global | all | |||
488 | rot | abc-bca | - | - | Rotate the top three values. | class:word | {n/a} | {n/a} | global | all | |||
489 | s, | s- | - | - | Compile the code needed to push a string pointer to the stack and inline the string data into the current definition. | class:word | {n/a} | {n/a} | global | all | |||
490 | s:ASCII-LETTERS | -s | - | - | Constant. Returns a string of the ASCII letters (upper and lower case) | class:data | {n/a} | {n/a} | s | all | |||
491 | s:ASCII-LOWERCASE | -s | - | - | Constant. Returns a string of the ASCII letters in lowercase | class:data | {n/a} | {n/a} | s | all | |||
492 | s:ASCII-UPPERCASE | -s | - | - | Constant. Returns a string of the ASCII letters in uppercase | class:data | {n/a} | {n/a} | s | all | |||
493 | s:DIGITS | -s | - | - | Constant. Return a string of characters recognized as numeric digits. | class:data | {n/a} | {n/a} | s | all | |||
494 | s:PUNCTUATION | -s | - | - | Constant. Return a string of characters recognized as punctuation. | class:data | {n/a} | {n/a} | s | all | |||
495 | s:WHITESPACE | -s | - | - | Constant. Returns a string of characters recognized as whitespace. | class:data | {n/a} | {n/a} | s | all | |||
496 | s:append | ss-s | - | - | Return a new string consisting of s1 followed by s2. | class:word | {n/a} | {n/a} | s | all | |||
497 | s:begins-with? | ss-f | - | - | Return `TRUE` if s1 begins with s2 or `FALSE` otherwise. | class:word | {n/a} | {n/a} | s | all | |||
498 | s:case | sSq- || sSq-s | - | - | If the `s` matches `S`, discard `s` and run the quote before exiting the caller. If they do not match, discard the quote and leave `s` on the stack. | class:word | {n/a} | {n/a} | s | all | |||
499 | s:chop | s-s | - | - | Remove the last character from a string. Returns a new string. | class:word | {n/a} | {n/a} | s | all | |||
500 | s:const | ss- | - | - | Create a constant named s2, returning a pointer to s1. This will use `s:keep` to preserve the original string. | class:word | {n/a} | {n/a} | s | all | |||
501 | s:contains/char? | sc-f | - | - | Return `TRUE` if the character is present in the string or `FALSE` otherwise. | class:word | {n/a} | {n/a} | s | all | |||
502 | s:contains/string? | ss-f | - | - | Return `TRUE` if the second string is present in the first string or `FALSE` otherwise. | class:word | {n/a} | {n/a} | s | all | |||
503 | s:copy | sa- | - | - | Copy a string (s) to a destination (a). This will include the terminator character when copying. | class:word | {n/a} | {n/a} | s | all | |||
504 | s:dedup | s-s | - | - | Return a deduplicated version of the string. | class:word | {n/a} | {n/a} | s | rre | |||
505 | s:dedup.data | -a | - | - | Variable. Holds a pointer to the deduplication list. | class:word | {n/a} | {n/a} | s | rre | |||
506 | s:dedup.defined? | s-f | - | - | Check to see if a string is in the deduplication list. | class:word | {n/a} | {n/a} | s | rre | |||
507 | s:dedup.find | s-s | - | - | Return a pointer to a deduplicated copy of a string. If the string is not in the deduplication list, this will cause errors. | class:word | {n/a} | {n/a} | s | rre | |||
508 | s:dedup.register | s- | - | - | Add a string to the deduplication list. | class:word | {n/a} | {n/a} | s | rre | |||
509 | s:empty | -s | - | - | Return an empty string. | class:word | {n/a} | {n/a} | s | all | |||
510 | s:ends-with? | ss-f | - | - | Return `TRUE` if s1 ends with s2 or `FALSE` otherwise. | class:word | {n/a} | {n/a} | s | all | |||
511 | s:eq? | ss-f | - | - | Compare two strings for equality. Return `TRUE` if identical or `FALSE` if not. | class:word | 'hello 'again s:eq?\n 'test 'test s:eq? | {n/a} | s | all | |||
512 | s:evaluate | s-? | - | -? | Evaluate string as if it was typed into the interpreter. | class:word | {n/a} | {n/a} | s | all | |||
513 | s:fetch | sn-n | - | - | Fetch the character value stored at the specified index in the string. | class:word | 'abcdef #2 s:fetch | {n/a} | s | all | |||
514 | s:filter | sq-s | - | - | Execute the quote once for each value in the string. If the quote returns `TRUE`, append the value into a new string. If `FALSE` the value will be discarded. | class:word | {n/a} | {n/a} | s | all | |||
515 | s:for-each | sq- | - | - | Execute the quote once for each value in the string. | class:word | {n/a} | {n/a} | s | all | |||
516 | s:format | ...s-s | - | - | Construct a new string using the template passed and items from the stack. | class:word | {n/a} | {n/a} | s | all | |||
517 | s:get | -s | - | - | Read input from standard in (via `c:get`) until a CR or LF is encountered. Returns a string. | class:word | {n/a} | {n/a} | all | rre | |||
518 | s:get-word | -s | - | - | Read input from standard in (via `c:get`) until a whitespace is encountered. Returns a string. | class:word | {n/a} | {n/a} | all | rre | |||
519 | s:hash | s-n | - | - | Calculate a hash value for a string. This uses the djb2 algorithm. | class:word | {n/a} | {n/a} | s | all | |||
520 | s:index/char | sc-n | - | - | Return the location of the first instance of the specified character in the string. | class:word | {n/a} | {n/a} | s | all | |||
521 | s:index/string | ss-n | - | - | Return the location of the first instance of the specified substring (s2) in the string (s1). Returns -1 if not found. | class:word | {n/a} | {n/a} | s | all | |||
522 | s:keep | s-s | - | - | Store a string into the heap and return a pointer to the start of it. | class:word | {n/a} | {n/a} | s | all | |||
523 | s:left | sn-s | - | - | Return a new string containing the first `n` characters from the source string. | class:word | {n/a} | {n/a} | s | all | |||
524 | s:length | s-n | - | - | Return the number of characters in a string, excluding the NULL terminator. | class:word | {n/a} | {n/a} | s | all | |||
525 | s:map | sq-s | - | - | Execute the specified quote once for each character in the string. Builds a new string from the return value of the quote. The quote should return only one value. | class:word | {n/a} | {n/a} | s | all | |||
526 | s:prepend | ss-s | - | - | Return a new string consisting of s2 followed by s1. | class:word | {n/a} | {n/a} | s | all | |||
527 | s:put | s- | - | - | Display a string. | class:word | {n/a} | {n/a} | global | all | |||
528 | s:replace | sss-s | - | - | Replace the first instance of s2 in s1 with s3. | class:word | {n/a} | {n/a} | s | all | |||
529 | s:replace-all | sss-s | - | - | Replace all instances of s2 in s1 with s3. | class:word | {n/a} | {n/a} | s | all | |||
530 | s:reverse | s-s | - | - | Reverse the order of ASCII characters in a string. | class:word | {n/a} | {n/a} | s | all | |||
531 | s:right | sn-s | - | - | Return a new string containing the specified number of characters from the right side of the string. | class:word | {n/a} | {n/a} | s | all | |||
532 | s:skip | - | - | - | Internal helper function used to skip over a string in a definition. | class:word | {n/a} | {n/a} | s | all | |||
533 | s:split/char | sc-ss | - | - | Split a string on the first occurrence of the specified character. | class:word | {n/a} | {n/a} | s | all | |||
534 | s:split/string | ss-ss | - | - | Split a string on the first occurrence of the specified string. After the split, the top stack item will be the part of the string before the specified substring, and the second item will be the rest of the original string. | class:word | 'Hello_Brave_World! 'Brave s:split-on-string s:put nl s:put nl | {n/a} | s | all | |||
535 | s:store | csn- | - | - | Store a character value into the string at the specified index. | class:word | $z 'abcdef #1 s:store | {n/a} | s | all | |||
536 | s:substr | sfl-s | - | - | Extract a substring from the specified string. This will take the characters starting at `f` and extend `l` characters in length. | class:word | {n/a} | {n/a} | s | all | |||
537 | s:temp | s-s | - | - | Move a string into the temporary string buffers. | class:word | {n/a} | {n/a} | s | all | |||
538 | s:to-float | s- | - | -F | Convert a string representation into a floating-point value. | class:word | {n/a} | {n/a} | s | rre | |||
539 | s:to-lower | s-s | - | - | Convert uppercase ASCII characters in a string to lowercase. | class:word | {n/a} | {n/a} | s | all | |||
540 | s:to-number | s-n | - | - | Convert a string to a number. | class:word | {n/a} | {n/a} | s | all | |||
541 | s:to-upper | s-s | - | - | Convert lowercase ASCII characters in a string to uppercase. | class:word | {n/a} | {n/a} | s | all | |||
542 | s:tokenize | sc-a | - | - | Takes a string and a character to use as a separator. It splits the string into substrings and returns an array containing pointers to each of them. | class:word | {n/a} | {n/a} | s | all | |||
543 | s:tokenize-on-string | ss-a | - | - | Takes a string (s1) and a substring (s2) use as a separator. It splits the string into substrings and returns as array containing pointers to each of them. | class:word | {n/a} | {n/a} | s | all | |||
544 | s:trim | s-s | - | - | Trim leading and trailing whitespace from a string. | class:word | '__hello__ s:trim | {n/a} | s | all | |||
545 | s:trim-left | s-s | - | - | Trim leading whitespace from a string. | class:word | '__hello__ s:trim-left | {n/a} | s | all | |||
546 | s:trim-right | s-s | - | - | Trim trailing whitespace from a string. | class:word | '__hello__ s:trim-right | {n/a} | s | all | |||
547 | s:unique? | s-f | - | - | Alias for `s:dedup.defined?`. | class:word | {n/a} | {n/a} | s | rre | |||
548 | script:abort-include | - | - | - | Discard remaining tokens on the current line being evaluated. This only works when including a file, not at the interpreter. | class:word | {n/a} | {n/a} | sys | rre | |||
549 | script:arguments | -n | - | - | Return the number of arguments passed to the program. | class:word | {n/a} | {n/a} | sys | rre | |||
550 | script:current-file | -s | - | - | Return the filename of the file being processed by the current `include`, or `/dev/stdin` if the input source is the terminal. | class:word | {n/a} | {n/a} | sys | rre | |||
551 | script:current-line | -n | - | - | Return the current line number of the file being processed by the current `include`, or `0` if the input source is the terminal. Line numbering starts at 1. | class:macro | {n/a} | {n/a} | script | rre | |||
552 | script:current-line-text | -s | - | - | Return the text of the current line being processed by the current `include`. | class:macro | {n/a} | {n/a} | script | rre | |||
553 | script:get-argument | n-s | - | - | Given an argument number, return the argument as a string. | class:word | {n/a} | {n/a} | script | rre | |||
554 | script:ignore-to-eof | - | - | - | Discard remaining lines in the file currently being evaluated. This only works when including a file, not at the interpreter. | class:word | {n/a} | {n/a} | script | rre | |||
555 | script:ignore-to-eol | - | - | - | Discard remaining tokens in the current line. This only works when including a file, not at the interpreter. | class:word | {n/a} | {n/a} | script | rre | |||
556 | script:name | -s | - | - | Return the filename of the program being run. | class:word | {n/a} | {n/a} | script | rre | |||
557 | set-hook | aa- | - | - | Patch the hook point in a2 to point to a1. | class:word | :foo hook ;\n :bar #1 ;\n &bar &foo set-hook | {n/a} | global | all | |||
558 | shift | mn-o | - | - | Peform a bitwise shift of m by n bits. If n is positive, shift right. If negative, the shift will be to the left. | class:primitive | {n/a} | {n/a} | global | all | |||
559 | sigil:! | ns- | - | - | Store a value into a variable. | Store a value into the named variable. | Compile the code to store a value into a named variable. | class:macro | {n/a} | {n/a} | sigil | all | |
560 | sigil:# | s-n | - | - | Process token as a number. | Convert the string into a number and leave on the stack. | Convert the string into a number and compile into the current definition as a literal. | class:macro | {n/a} | {n/a} | sigil | all | |
561 | sigil:$ | s-c | - | - | Process token as an ASCII character. | Fetch first character from string. Leave on stack. | Fetch first character from the string. Compile into the current definition as literal. | class:macro | {n/a} | {n/a} | sigil | all | |
562 | sigil:& | s-a | - | - | Return a pointer to a named item. If name is not found, returns 0. | Lookup name in dictionary, return contents of the xt field on the stack. | Lookup name in dictionary, compile code to push the contents of the xt field into the current definition. | class:macro | {n/a} | {n/a} | sigil | all | |
563 | sigil:' | s-s | - | - | Process token as a string. | Move string into temporary buffer. If `RewriteUnderscores` is `TRUE`, replace all instances of _ with space. | Move string into temporary buffer. If `RewriteUnderscores` is `TRUE`, replace all instances of _ with space. Then compile the string into the current definition. | class:macro | {n/a} | {n/a} | sigil | all | |
564 | sigil:( | s- | - | - | Process token as a comment. | Discard the string. | Discard the string. | class:macro | {n/a} | {n/a} | sigil | all | |
565 | sigil:. | s- | - | -F | Interpret time: convert string to a floating-point value. Compile time: convert string to a floating-point value and compile code to push this value to the float stack. | class:macro | {n/a} | {n/a} | sigil | rre | |||
566 | sigil:: | s- | - | - | Hook. Process token as a new definition. | Create a header pointing to `here` with the provided string as the name. Sets class to `class:word`. | class:macro | {n/a} | {n/a} | sigil | all | ||
567 | sigil:@ | s-n | - | - | Fetch from a stored variable. | Fetch a value from a named variable. | Compile the code to fetch a value from a named variable into the current definition. | class:macro | {n/a} | {n/a} | sigil | all | |
568 | sigil:\ | s- | - | - | Process token as an instruction bundle. | Discard the string. | Assemble the opcodes in the string and use `,` to inline it into the current definition. | class:macro | {n/a} | {n/a} | sigil | all | |
569 | sigil:^ | s- | - | - | Process token as a function reference. | Discard the string. | Comma the XT of the word into the current definition. | class:macro | {n/a} | {n/a} | sigil | all | |
570 | sigil:` | s- | - | - | Process token as a bytecode. | Discard the string. | Convert the string to a number and use `,` to inline it into the current definition. | class:macro | {n/a} | {n/a} | sigil | all | |
571 | sigil:| | s- | - | - | POSTPONE equivalent. | Discard the string. | Convert the string to a number and use `,` to inline it into the current definition. | class:macro | {n/a} | {n/a} | sigil | all | |
572 | sip | nq(?n-?)-n | - | - | Run quote. After execution completes, put a copy of n back on top of the stack. | class:word | {n/a} | {n/a} | global | all | |||
573 | socket:accept | n-nn | - | - | Begin accepting connections. Returns a new socket and an error code. | class:word | {n/a} | {n/a} | socket | rre | |||
574 | socket:bind | sn-nn | - | - | Bind a socket to a port. The port should be a string. Returns 0 if successful or -1 otherwise and an error code. | class:word | {n/a} | {n/a} | socket | rre | |||
575 | socket:close | n- | - | - | Close a socket. | class:word | {n/a} | {n/a} | socket | rre | |||
576 | socket:configure | ss- | - | - | Configure internal settings for a host (s1) and port (s2). Use before `socket:bind`. | class:word | {n/a} | {n/a} | socket | rre | |||
577 | socket:connect | n-nn | - | - | Connect to a server. Provide a socket, this will return a status flag and an error code. | class:word | {n/a} | {n/a} | socket | rre | |||
578 | socket:create | -n | - | - | Obtain a new socket. | class:word | {n/a} | {n/a} | socket | rre | |||
579 | socket:gethostbyname | as- | - | - | Get the host IP in dotted notation. The host is specified by the string and the address is the start of the buffer for the dotted IP. | class:word | {n/a} | {n/a} | socket | rre | |||
580 | socket:listen | nn-nn | - | - | Prepare a socket for accepting incoming connections. Takes a backlog count (n1) and a socket (n2). Returns a flag (0 success, -1 failed) and an error code. | class:word | {n/a} | {n/a} | socket | rre | |||
581 | socket:operation | ...n- | - | - | Trigger a socket operation. This is not intended to be used directly. | class:word | {n/a} | {n/a} | socket | rre | |||
582 | socket:recv | ann-nn | - | - | Receive data from a socket. This will read into memory starting at address *a*, up to *n1* bytes. *n2* is the socket. Returns the number of bytes read and an error code. | class:word | {n/a} | {n/a} | socket | rre | |||
583 | socket:send | sn-nn | - | - | Send a string to a socket. This will return the number of characters sent and an error code. | class:word | {n/a} | {n/a} | socket | rre | |||
584 | sp | - | - | - | Display a space (`ASCII:SPACE`) | class:word | :spaces (n-) [ sp ] times ;\n #12 spaces | {n/a} | global | all | |||
585 | store | na- | - | - | Store a value into the specified address. | class:primitive | 'Base var\n #10 &Base store | {n/a} | global | all | |||
586 | store-next | na-a | - | - | Store a value into the specified address and return the next address. | class:word | {n/a} | {n/a} | global | all | |||
587 | swap | nm-mn | - | - | Exchange the position of the top two items on the stack | class:primitive | {n/a} | {n/a} | global | all | |||
588 | tab | - | - | - | Display a tab (`ASCII:HT`) | class:word | {n/a} | {n/a} | global | all | |||
589 | tail-recurse | - | - | - | Convert a call before the semicolon to a jump. | class:word | {n/a} | {n/a} | global | all | |||
590 | times | nq- | - | - | Run the specified quote the specified number of times. | class:word | #12 [ $- c:put ] times | {n/a} | global | all | |||
591 | tri | xqqq-? | - | - | Apply q1 against x, then q2 against a copy of x, and finally q3 against another copy of x. | class:word | {n/a} | {n/a} | global | all | |||
592 | tri* | xyzqqq-? | - | - | Apply q1 against x, q2 against y, and q3 against z. | class:word | {n/a} | {n/a} | global | all | |||
593 | tri@ | xyzq-? | - | - | Apply q against x, then against y, and finally against z. | class:word | {n/a} | {n/a} | global | all | |||
594 | tuck | nm-mnm | - | - | Put a copy of the top item on the stack under the second one. | class:word | {n/a} | {n/a} | global | all | |||
595 | ui:add-view | s- | - | - | Add view named `s` to the displayed views. | class:word | {n/a} | {n/a} | ui | retro/python | |||
596 | ui:create-view | ss- | - | - | Create a new view. `s1` is the name and `s2` is the type. | class:word | {n/a} | {n/a} | ui | retro/python | |||
597 | ui:get-action | s-a | - | - | Return the address of the Retro handler for a view's associated action. | class:word | {n/a} | {n/a} | ui | retro/python | |||
598 | ui:get-position | s-nn | - | - | Return the row and column of the named view. | class:word | {n/a} | {n/a} | ui | retro/python | |||
599 | ui:get-size | s-nn | - | - | Return the height and width of the named view. | class:word | {n/a} | {n/a} | ui | retro/python | |||
600 | ui:get-text | s-s | - | - | Get the value of the text property of the named view. | class:word | {n/a} | {n/a} | ui | retro/python | |||
601 | ui:get-title | s-s | - | - | Get the value of the title property for the named view. | class:word | {n/a} | {n/a} | ui | retro/python | |||
602 | ui:operation | ...n- | - | - | Carry out a UI operation. Used internally by the other `ui:` words. | class:word | {n/a} | {n/a} | ui | retro/python | |||
603 | ui:present | - | - | - | Display all views. | class:word | {n/a} | {n/a} | ui | retro/python | |||
604 | ui:remove-view | s- | - | - | Remove view named `s` from the displayed views. | class:word | {n/a} | {n/a} | ui | retro/python | |||
605 | ui:set-action | as- | - | - | Set the action handler for a view to the specified Retro word address. | class:word | {n/a} | {n/a} | ui | retro/python | |||
606 | ui:set-position | nns- | - | - | Move view `s` to row `n1` and column `n2`. | class:word | {n/a} | {n/a} | ui | retro/python | |||
607 | ui:set-size | nns- | - | - | Set view `s` to height `n1` and width `n2`. | class:word | {n/a} | {n/a} | ui | retro/python | |||
608 | ui:set-text | ss- | - | - | Set the text property of view `s2` to `s1`. | class:word | {n/a} | {n/a} | ui | retro/python | |||
609 | ui:set-title | ss- | - | - | Set the title property of view `s2` to `s1`. | class:word | {n/a} | {n/a} | ui | retro/python | |||
610 | unhook | a- | - | - | Reset the hook point in a1 to the default definition. | class:word | :foo hook #1 ;\n :bar #2 ;\n &bar &foo set-hook\n &foo unhook | {n/a} | global | all | |||
611 | unix:chdir | s- | - | - | Change the current working directory to the specified one. | class:word | '/etc unix:chdir | {n/a} | unix | rre | |||
612 | unix:count-files-in-cwd | -n | - | - | Return the number of files (and subdirectories) in the current working directory | class:word | {n/a} | {n/a} | unix | rre | |||
613 | unix:exec0 | s- | - | - | Execute a process by running the application specified by s. | class:word | {n/a} | {n/a} | unix | rre | |||
614 | unix:exec1 | ss- | - | - | Execute a process by running the application specified by s1. Pass s2 as an argument. | class:word | {n/a} | {n/a} | unix | rre | |||
615 | unix:exec2 | sss- | - | - | Execute a process by running the application specified by s1. Pass s2 and s3 as arguments. | class:word | {n/a} | {n/a} | unix | rre | |||
616 | unix:exec3 | ssss- | - | - | Execute a process by running the application specified by s1. Pass s2, s3, and s4 as arguments. | class:word | {n/a} | {n/a} | unix | rre | |||
617 | unix:execute | s- | - | - | Runs another application and return after execution is completed. This does not invoke the shell like `unix:system` and does not support globbing. | class:word | 'ls_-lh_/etc unix:system | {n/a} | unix | rre | |||
618 | unix:exit | n- | - | - | Exit the current process, returning the specified return code. | class:word | {n/a} | {n/a} | unix | rre | |||
619 | unix:for-each-file | q- | - | - | Run a quote once for each file or subdirectory in the current directory. The quote will receive the file name as a string and should consume this and return nothing on the stack. | class:word | {n/a} | {n/a} | unix | rre | |||
620 | unix:fork | -n | - | - | Fork the current process. Returns a PID. | class:word | {n/a} | {n/a} | unix | rre | |||
621 | unix:get-cwd | -s | - | - | Return the current working directory | class:word | {n/a} | {n/a} | unix | rre | |||
622 | unix:getenv | sa- | - | - | Get an environment variable. Provide the name and an address to store it in. | class:word | 'SHELL s:empty [ unix:getenv ] sip s:put nl | {n/a} | unix | rre | |||
623 | unix:getpid | -n | - | - | Return the PID of the current process. | class:word | {n/a} | {n/a} | unix | rre | |||
624 | unix:kill | nn- | - | - | Terminates a process. Takes a process and a signal to send. | class:word | {n/a} | {n/a} | unix | rre | |||
625 | unix:pclose | n- | - | - | Close a pipe. | class:word | {n/a} | {n/a} | unix | rre | |||
626 | unix:pipe | s- | - | - | Takes a string with a Unix command line and run it in a pipe, returning a new string with the first line of the output from the pipe. | class:word | 'ls_-l unix:pipe s:put nl | {n/a} | unix | rre | |||
627 | unix:popen | sn-n | - | - | Open a pipe. Takes a command to run, and a file mode (`file:R` or `file:W`; `file:R+` may work on some systems). Returns a file ID usable with words in the `file:` namespace. | class:word | {n/a} | {n/a} | unix | rre | |||
628 | unix:putenv | s- | - | - | Takes a string in the form `name=value` and sets an environment variable named `name` to `value`. | class:word | 'EDITOR=vi unix:putenv | {n/a} | unix | rre | |||
629 | unix:sleep | n- | - | - | Sleep for the specified number of seconds. | class:word | {n/a} | {n/a} | unix | rre | |||
630 | unix:slurp-pipe | as-n | - | - | Open a pipe. Read all output from the pipe (until ASCII:NULL) and store in the specified buffer. Return the number of bytes read. | class:word | {n/a} | {n/a} | unix | rre | |||
631 | unix:system | s- | - | - | Runs another application using the system shell and returns after execution is completed. | class:word | 'ls_-lh_/etc unix:system | {n/a} | unix | rre | |||
632 | unix:wait | -n | - | - | Waits for a child process to complete. This maps to the wait() system call. | class:word | {n/a} | {n/a} | unix | rre | |||
633 | unpack | n-nnnn | - | - | Unpack a 32-bit value into four 8-bit values. | class:word | {n/a} | {n/a} | global | all | |||
634 | unsigned:* | nn-n | - | - | Multiply `n1` by `n2` and return the result. | class:word | #2 #6 unsigned:*\n #-1 #100 unsigned:* | {n/a} | unsigned | all | |||
635 | unsigned:*/mod | xyz-rv | - | - | Multiply `x` by `y` and then divide by `z` and return the integer part of the quotient and remainder. | class:word | {n/a} | {n/a} | global | rre | |||
636 | unsigned:+ | nn-n | - | - | Add `n1` to `n2` and return the result. | class:word | #1 #2 unsigned:+ | {n/a} | unsigned | all | |||
637 | unsigned:- | nn-n | - | - | Subtract `n2` from `n1` and return the result. | class:word | #2 #1 unsigned:- | {n/a} | unsigned | all | |||
638 | unsigned:-eq? | nn-f | - | - | Compare two values for inequality. Returns `TRUE` if they are not equal or `FALSE` otherwise. | class:word | #1 #2 unsigned:-eq?\n $a $b unsigned:-eq? | {n/a} | unsigned | all | |||
639 | unsigned:/mod | nm-rv | - | - | Divide `n` by `m` and return the integer part of the quotient and remainder. | class:word | {n/a} | {n/a} | unsigned | all | |||
640 | unsigned:eq? | nn-f | - | - | Compare two values for equality. Returns `TRUE` if they are equal or `FALSE` otherwise. | class:word | #1 #2 unsigned:eq?\n $a $b unsigned:eq? | {n/a} | unsigned | all | |||
641 | unsigned:gt? | nn-f | - | - | Compare n1 and n2. Return `TRUE` if n1 is greater than n2, or `FALSE` otherwise. | class:word | {n/a} | {n/a} | unsigned | all | |||
642 | unsigned:lt? | nn-f | - | - | Compare n1 and n2. Return `TRUE` if n1 is less than n2, or `FALSE` otherwise. | class:word | {n/a} | {n/a} | unsigned | all | |||
643 | unsigned:shift | mn-o | - | - | Peform a bitwise shift of m by n bits. If n is positive, shift right. If negative, the shift will be to the left. | class:word | {n/a} | {n/a} | unsigned | all | |||
644 | until | q(-f)- | - | - | Execute quote repeatedly while the quote returns a value of `FALSE`. The quote should return a flag of either `TRUE` or `FALSE`, though `until` will treat any non-zero value as `TRUE`. | class:word | #10 [ dup n:put nl n:dec dup n:zero? ] until | {n/a} | global | all | |||
645 | v:dec | a- | - | - | Decrement the value stored at the specified address by 1. | class:word | {n/a} | {n/a} | v | all | |||
646 | v:dec-by | na- | - | - | Decrement the value stored at the specified address by the specified value. | class:word | {n/a} | {n/a} | v | all | |||
647 | v:inc | a- | - | - | Increment the value stored at the specified address by 1. | class:word | {n/a} | {n/a} | v | all | |||
648 | v:inc-by | na- | - | - | Increment the value stored at the specified address by the specified value. | class:word | {n/a} | {n/a} | v | all | |||
649 | v:limit | alu- | - | - | Fetch the value stored at the address, then run `n:limit` against it, using the specified lower and upper bounds. Then store the resulting value back to the original address. | class:word | {n/a} | {n/a} | v | all | |||
650 | v:off | a- | - | - | Set a variable to 0. | class:word | {n/a} | {n/a} | v | all | |||
651 | v:on | a- | - | - | Set a variable to -1. | class:word | {n/a} | {n/a} | v | all | |||
652 | v:preserve | aq- | - | - | Make a copy of the value at the address, then run the quote. Once the quote completes, restore the address to the specified value. | class:word | {n/a} | {n/a} | v | all | |||
653 | v:update | aq- | - | - | Fetch a value from the specified address, then run the quotation with this value on the stack. Afterwards, store the returned value at the original address. | class:word | {n/a} | {n/a} | v | all | |||
654 | var | s- | - | - | Create a variable. The variable is initialized to 0. | class:word | 'Base var | {n/a} | global | all | |||
655 | var-n | ns- | - | - | Create a variable with the specified initial value. | class:word | #10 'Base var-n\n | {n/a} | global | all | |||
656 | var-s | ss- | - | - | Create a variable with the specified initial value. | class:word | 'Test 'Word var-s\n | {n/a} | global | all | |||
657 | w:fetch | a-n | - | - | Fetch the 32-bit value stored at the specified address. Addressing for this is in 8-bit units. The address must be aligned on a four byte boundary. | class:word | {n/a) | {n/a} | global | all | |||
658 | w:fetch-next | a-an | - | - | Fetch the value stored at the specified address. Returns the next address and the value. | class:word | {n/a} | {n/a} | w | all | |||
659 | w:store | na- | - | - | Store an 32-bit value into the specified address. Addressing for this is in 8-bit units. The address must be aligned on a four byte boundary. | class:word | {n/a} | {n/a} | global | all | |||
660 | w:store-next | na-a | - | - | Store a value into the specified address and return the next address. | class:word | {n/a} | {n/a} | w | all | |||
661 | while | q(-f)- | - | - | Execute quote repeatedly while the quote returns a `TRUE` value. The quote should return a flag of either `TRUE` or `FALSE`, though `while` will treat any non-zero value as `TRUE`. | class:word | #10 [ dup n:put nl n:dec dup n:-zero? ] while | {n/a} | global | all | |||
662 | xor | mn-o | - | - | Perform a bitwise XOR operation. | class:primitive | {n/a} | {n/a} | global | all | |||
663 | { | - | - | - | Begin an array. This is intended to make creating arrays a bit cleaner than using a quotation and `a:counted-results`. | class:word | {n/a} | {n/a} | global | all | |||
664 | {{ | - | - | - | Begin a lexically scoped area. | class:word | {n/a} | {n/a} | global | all | |||
665 | } | -a | - | - | Complete an array begun by `{`. Returns a pointer to the data. | class:word | {n/a} | {n/a} | global | all | |||
666 | }} | - | - | - | End a lexically scoped area. This will hide any headers between `{{` and `---reveal---`, leaving only headers between `---reveal---` and the `}}` visible. | class:word | {n/a} | {n/a} | global | all |