retroforth/words.tsv
crc 1e3de483b7 rre: add -i for interactive mode
FossilOrigin-Name: 1298ee794c8f9a90d099b39b2ef4c59f128de0ba73a7ae11f37abadc4ae24241
2017-11-15 19:57:17 +00:00

40 KiB

1*nn-n--Multiply `n1` by `n2` and return the result.class:primitive{n/a}{n/a}globalall
2+nn-n--Add `n1` to `n2` and return the result.class:primitive #1 #2 + {n/a}globalall
3,n---Store the specified value into the memory at `here` and increment `Heap` by 1.class:word{n/a}{n/a}globalall
4-nn-n--Subtract `n1` from `n2` and return the difference.class:primitive{n/a}{n/a}globalall
5---reveal------Switch to the exposed (public) portion of a lexical namespace.class:word{n/a}{n/a}globalall
6-eq?nn-f--Compare two values for inequality. Returns `TRUE` if they are not equal or `FALSE` otherwise.class:primitive{n/a}{n/a}globalall
7-iffq---Execute the quotation if the flag is `FALSE`.class:word{n/a}{n/a}globalall
8/mn-o--Divide `m` by `n` and return the result.class:word{n/a}{n/a}globalall
9/modnm-op--Divide `n` by `m` and return the result and remainder.class:primitive{n/a}{n/a}globalall
100;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}globalall
11;---End the current definition.class:macro{n/a}{n/a}globalall
12?dupn-nn || n-n--Duplicate top value on stack if not zero. If zero, do nothing.class:word{n/a}{n/a}globalall
13ASCII:ACK-n--Constant. Refers to specific ASCII code.class:data{n/a}{n/a}ASCIIall
14ASCII:BEL-n--Constant. Refers to specific ASCII code.class:data{n/a}{n/a}ASCIIall
15ASCII:BS-n--Constant. Refers to specific ASCII code.class:data{n/a}{n/a}ASCIIall
16ASCII:CAN-n--Constant. Refers to specific ASCII code.class:data{n/a}{n/a}ASCIIall
17ASCII:CR-n--Constant. Refers to specific ASCII code.class:data{n/a}{n/a}ASCIIall
18ASCII:DC1-n--Constant. Refers to specific ASCII code.class:data{n/a}{n/a}ASCIIall
19ASCII:DC2-n--Constant. Refers to specific ASCII code.class:data{n/a}{n/a}ASCIIall
20ASCII:DC3-n--Constant. Refers to specific ASCII code.class:data{n/a}{n/a}ASCIIall
21ASCII:DC4-n--Constant. Refers to specific ASCII code.class:data{n/a}{n/a}ASCIIall
22ASCII:DEL-n--Constant. Refers to specific ASCII code.class:data{n/a}{n/a}ASCIIall
23ASCII:DLE-n--Constant. Refers to specific ASCII code.class:data{n/a}{n/a}ASCIIall
24ASCII:EM-n--Constant. Refers to specific ASCII code.class:data{n/a}{n/a}ASCIIall
25ASCII:ENQ-n--Constant. Refers to specific ASCII code.class:data{n/a}{n/a}ASCIIall
26ASCII:EOT-n--Constant. Refers to specific ASCII code.class:data{n/a}{n/a}ASCIIall
27ASCII:ESC-n--Constant. Refers to specific ASCII code.class:data{n/a}{n/a}ASCIIall
28ASCII:ETB-n--Constant. Refers to specific ASCII code.class:data{n/a}{n/a}ASCIIall
29ASCII:ETX-n--Constant. Refers to specific ASCII code.class:data{n/a}{n/a}ASCIIall
30ASCII:FF-n--Constant. Refers to specific ASCII code.class:data{n/a}{n/a}ASCIIall
31ASCII:FS-n--Constant. Refers to specific ASCII code.class:data{n/a}{n/a}ASCIIall
32ASCII:GS-n--Constant. Refers to specific ASCII code.class:data{n/a}{n/a}ASCIIall
33ASCII:HT-n--Constant. Refers to specific ASCII code.class:data{n/a}{n/a}ASCIIall
34ASCII:LF-n--Constant. Refers to specific ASCII code.class:data{n/a}{n/a}ASCIIall
35ASCII:NAK-n--Constant. Refers to specific ASCII code.class:data{n/a}{n/a}ASCIIall
36ASCII:NUL-n--Constant. Refers to specific ASCII code.class:data{n/a}{n/a}ASCIIall
37ASCII:RS-n--Constant. Refers to specific ASCII code.class:data{n/a}{n/a}ASCIIall
38ASCII:SI-n--Constant. Refers to specific ASCII code.class:data{n/a}{n/a}ASCIIall
39ASCII:SO-n--Constant. Refers to specific ASCII code.class:data{n/a}{n/a}ASCIIall
40ASCII:SOH-n--Constant. Refers to specific ASCII code.class:data{n/a}{n/a}ASCIIall
41ASCII:SPACE-n--Constant. Refers to specific ASCII code.class:data{n/a}{n/a}ASCIIall
42ASCII:STX-n--Constant. Refers to specific ASCII code.class:data{n/a}{n/a}ASCIIall
43ASCII:SUB-n--Constant. Refers to specific ASCII code.class:data{n/a}{n/a}ASCIIall
44ASCII:SYN-n--Constant. Refers to specific ASCII code.class:data{n/a}{n/a}ASCIIall
45ASCII:US-n--Constant. Refers to specific ASCII code.class:data{n/a}{n/a}ASCIIall
46ASCII:VT-n--Constant. Refers to specific ASCII code.class:data{n/a}{n/a}ASCIIall
47Compiler-a--Variable. Holds the compiler state. If TRUE, the compiler is active. If FALSE, it is not.class:data{n/a}{n/a}globalall
48Dictionary-a--Variable. Holds a pointer to the most recent dictionary header.class:data{n/a}{n/a}globalall
49EOM-n--Constant. Returns the last addressable memory address.class:word{n/a}{n/a}globalall
50FALSE-n--Returns `0`, the value used to indicate a FALSE result.class:word{n/a}{n/a}globalall
51FREE-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}globalall
52Heap-a--Variable. Holds the address of the next available cell.class:data{n/a}{n/a}globalall
53RewriteUnderscores-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}globalall
54STRINGS-a--Return the address of the start of the temporary string pool.class:word{n/a}{n/a}globalall
55ScopeList-a--Variable. This holds some information used by `{{` and `}}`.class:data{n/a}{n/a}globalall
56TRUE-n--Returns `-1`, the value used to indicate a TRUE result.class:word{n/a}{n/a}globalall
57TempStringMax-a--Variable. Holds the maximum length of a temporary string.class:data{n/a}{n/a}globalall
58TempStrings-a--Variable. Holds the number of temporary strings.class:data{n/a}{n/a}globalall
59Version-a--Variable. This stores the version number.class:data{n/a}{n/a}globalall
60[---Begin a quotation.class:macro{n/a}{n/a}globalall
61]---End a quotation.class:macro{n/a}{n/a}globalall
62again---Close an unconditional loop. Branches back to the prior `repeat`.class:macro{n/a}{n/a}globalall
63allotn---Allocate the specified number of cells from the `Heap`.class:word{n/a}{n/a}globalall
64andnm-o--Perform a bitwise AND operation between the two provided values.class:primitive{n/a}{n/a}globalall
65as{-f--Begin an assembly section.class:macro{n/a}{n/a}globalall
66bixqq-?--Execute q1 against x, then execute q2 against a copy of x.class:word{n/a}{n/a}globalall
67bi*xyqq-?--Execute q1 against x and q2 against y.class:word{n/a}{n/a}globalall
68bi@xyq-?--Execute q against x, then execute q against y.class:word{n/a}{n/a}globalall
69buffer:addn---Append a value to the current buffer.class:word{n/a}{n/a}bufferall
70buffer:empty---Reset the current buffer to an empty state.class:word{n/a}{n/a}bufferall
71buffer:end-a--Return a pointer to the current end of the active buffer.class:word{n/a}{n/a}bufferall
72buffer:get-n--Remove the last value from the current buffer.class:word{n/a}{n/a}bufferall
73buffer:preserveq---Save and restore the current buffer before and after executing the specified quote.class:word{n/a}{n/a}bufferall
74buffer:seta---Assign a new buffer as the current one.class:word{n/a}{n/a}bufferall
75buffer:size-n--Return the number of cells in the buffer.class:word{n/a}{n/a}bufferall
76buffer:start-a--Return the start address of the current buffer.class:word{n/a}{n/a}bufferall
77c:-consonant?c-f--Return TRUE if character is a not consonant or FALSE otherwise.class:word{n/a}{n/a}call
78c:-digit?c-f--Return TRUE if character is a not numeric digit or FALSE otherwise.class:word{n/a}{n/a}call
79c:-lowercase?c-f--Return TRUE if character is not lowercase or FALSE otherwise.class:word{n/a}{n/a}call
80c:-uppercase?c-f--Return TRUE if character is not uppercase or FALSE otherwise.class:word{n/a}{n/a}call
81c:-visible?c-f--Return TRUE if character is not printable or FALSE otherwise.class:word{n/a}{n/a}call
82c:-vowel?c-f--Return TRUE if character is not a vowel or FALSE otherwise.class:word{n/a}{n/a}call
83c:-whitespace?c-f--Return TRUE if character is not whitespace, or FALSE otherwise.class:word{n/a}{n/a}call
84c:consonant?c-f--Return TRUE if character is a consonant or FALSE otherwise.class:word{n/a}{n/a}call
85c:digit?c-f--Return TRUE if character is a numeric digit or FALSE otherwise.class:word{n/a}{n/a}call
86c:letter?c-f--Return TRUE if character is an ASCII letter or FALSE otherwise.class:word{n/a}{n/a}call
87c:lowercase?c-f--Return TRUE if character is lowercase or FALSE otherwise.class:word{n/a}{n/a}call
88c:to-lowerc-c--Convert character to lowercase equivalent.class:word{n/a}{n/a}call
89c:to-stringc-s--Convert character into a string.class:word{n/a}{n/a}call
90c:to-upperc-c--Convert character to uppercase equivalent.class:word{n/a}{n/a}call
91c:toggle-casec-c--Convert an ASCII character to the opposite case.class:word{n/a}{n/a}call
92c:uppercase?c-f--Return TRUE if character is uppercase or FALSE otherwise.class:word{n/a}{n/a}call
93c:visible?c-f--Return TRUE if character is printable or FALSE otherwise.class:word{n/a}{n/a}call
94c:vowel?c-f--Return TRUE if character is a vowel or FALSE otherwise.class:word{n/a}{n/a}call
95c:whitespace?c-f--Return TRUE if character is whitespace, or FALSE otherwise.class:word{n/a}{n/a}call
96calla---Call a function.class:primitive{n/a}{n/a}globalall
97casenmq- || 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}globalall
98choosefqq---Execute q1 if the flag is `TRUE` or q2 if it is not.class:word{n/a}{n/a}globalall
99class:datan- || 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}classall
100class:macroa---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}classall
101class:primitivea---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}classall
102class:worda---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}classall
103compile:calla---Compile a call to the specified address into the current definition.class:word{n/a}{n/a}compileall
104compile:jumpa---Compile a jump to the specified address into the current definition.class:word{n/a}{n/a}compileall
105compile:litn---Compile the code to push a number to the stack into the current definition.class:word{n/a}{n/a}compileall
106compile:ret---Compile a return instruction into the current definition.class:word{n/a}{n/a}compileall
107compiling?-f--Return `TRUE` if compiler is on or `FALSE` otherwise.class:word{n/a}{n/a}globalall
108constns---Create a constant returning the specified value.class:word{n/a}{n/a}globalall
109copysdl---Copy `l` cells from memory at `s` to the memory at `d`. These should not overlap.class:word{n/a}{n/a}globalall
110currynq-q--Bind a value to a function and return a new quote that calls the bound action.class:word{n/a}{n/a}globalall
111dn---Inline a numeric value to the current assembly segment.class:word{n/a}{n/a}globalall
112d:add-headersaa---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}dall
113d:classd-a--Given a dictionary header, return the class field.class:word{n/a}{n/a}dall
114d:creates---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}dall
115d:for-eachq---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}dall
116d:last-d--Return the most recent dictionary header.class:word{n/a}{n/a}dall
117d:last<class>-a--Return a pointer to the class field of the most recent dictionary header.class:word{n/a}{n/a}dall
118d:last<name>-s--Return a pointer to the name field of the most recent dictionary header.class:word{n/a}{n/a}dall
119d:last<xt>-a--Return a pointer to the xt field of the most recent dictionary header.class:word{n/a}{n/a}dall
120d:linkd-a--Given a dictionary header, return the link field.class:word{n/a}{n/a}dall
121d:lookups-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.class:word{n/a}{n/a}dall
122d:lookup-xta-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}dall
123d:named-s--Given a dictionary header, return the name field.class:word{n/a}{n/a}dall
124d:xtd-a--Given a dictionary header, return the xt field.class:word{n/a}{n/a}dall
125data---Change the class of the most recently defined word to `class:data`.class:word{n/a}{n/a}globalall
126depth-n--Return the number of items on the stack.class:word{n/a}{n/a}globalall
127dipnq-n--Temporarily remove n from the stack, execute the quotation, and then restore n to the stack.class:word{n/a}{n/a}globalall
128doesq---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}globalall
129dropn---Discard the top value on the stack.class:primitive{n/a}{n/a}globalall
130drop-pairnn---Remove top two items on the stack.class:word{n/a}{n/a}globalall
131dump-stack---Display the items on the data stack.class:word{n/a}{n/a}globalall
132dupn-nn--Duplicate the top item on the stack.class:primitive{n/a}{n/a}globalall
133dup-pairnm-nmnm--Duplicate the top two items on the stack.class:word{n/a}{n/a}globalall
134eq?nn-f--Compare two values for equality. Returns `TRUE` if they are equal or `FALSE` otherwise.class:primitive{n/a}{n/a}globalall
135err:notfound---Error handler. Called when a word is not found by `interpret`.class:word{n/a}{n/a}errall
136f:*--FF-FMultiply two floating point numbers, returning the result.class:word{n/a}{n/a}frre
137f:+--FF-FAdd two floating point numbers, returning the result.class:word{n/a}{n/a}frre
138f:---FF-FSubtract F2 from F1 returing the result.class:word{n/a}{n/a}frre
139f:-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}frre
140f:/--FF-FDivide floating point value F1 by F2.class:word{n/a}{n/a}frre
141f:abs--F-FReturn the absolute value for a floating point value.class:word{n/a}{n/a}frre
142f:depth-n--Return the number of items on the floating point stack.class:word{n/a}{n/a}frre
143f:drop--F-Discard the top item on the floating point stack.class:word{n/a}{n/a}frre
144f:dup--F-FFDuplicate the top item on the floating point stack.class:word{n/a}{n/a}frre
145f: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}frre
146f:floor--F-FPerform a mathmatical floor operation on the floating point value.class:word{n/a}{n/a}frre
147f:gt?-f-FF-Compare two floating point values for greater than.class:word{n/a}{n/a}frre
148f:log--FF-FReturn log(F1) for base F2 for floating point values.class:word{n/a}{n/a}frre
149f:lt?-f-FF-Compare two floating point values for less than.class:word{n/a}{n/a}frre
150f:negate--F-FInvert the sign of the floating point value.class:word{n/a}{n/a}frre
151f:negative?-f-F-Return `TRUE` if floating point value is negative or `FALSE` if not.class:word{n/a}{n/a}frre
152f:over--FG-FGFPut a copy of the second floating point value over the top one.class:word{n/a}{n/a}frre
153f:positive?-f-F-Return `TRUE` if floating point value is positive or `FALSE` otherwise.class:word{n/a}{n/a}frre
154f:power--FF-FReturn F1^F2 for floating point values.class:word{n/a}{n/a}frre
155f:swap--FG-GFExchange the top and second items on the floating point stack.class:word{n/a}{n/a}frre
156f:to-number-n-F-Convert a floating point value into a number.class:word{n/a}{n/a}frre
157f:to-string-s-F-Convert a floating point value into a string.class:word{n/a}{n/a}frre
158f:tuck--FG-GFGTuck a copy of the top floating point value under the second one.class:word{n/a}{n/a}frre
159fetcha-n--Fetch the value stored at the specified address.class:primitive{n/a}{n/a}globalall
160fetch-nexta-an--Fetch the value stored at the specified address. Returns the next address and the value.class:word{n/a}{n/a}globalall
161file:A-n--Constant for opening a file in APPEND mode.class:data{n/a}{n/a}filerre
162file:R-n--Constant for opening a file in READ mode.class:data{n/a}{n/a}filerre
163file:R+-n--Constant for opening a file in READ & WRITE mode.class:data{n/a}{n/a}filerre
164file:W-n--Constant for opening a file in WRITE mode.class:data{n/a}{n/a}filerre
165file:closeh---Given a file handle, close the file.class:word{n/a}{n/a}filerre
166file:deletes---Delete the named file.class:word{n/a}{n/a}filerre
167file:exists?s-f--Given a file name, return `TRUE` if it exists or `FALSE` if it does not.class:word{n/a}{n/a}filerre
168file:flushh---Given a file handle, flush any pending writes to disk.class:word{n/a}{n/a}filerre
169file:for-each-linesq---Given a file name, open it and run the quote once for each line in the file.class:word{n/a}{n/a}filerre
170file:opensm-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}filerre
171file:readh-c--Given a file handle, read and return the next character in it.class:word{n/a}{n/a}filerre
172file:read-linef-s--Given a file handle, read a line and return a pointer to it.class:word{n/a}{n/a}filerre
173file:seeknh---Move the current offset into a file to the specified one.class:word{n/a}{n/a}filerre
174file:sizeh-n--Given a file handle, return the size of the file (in bytes).class:word{n/a}{n/a}filerre
175file:slurpas---Given an address and a file name, read the file contents into memory starting at the address.class:word{n/a}{n/a}filerre
176file:spewss---Given a string (s1) and a file name (s2), write the string into the file, replacing any existing cotent.class:word{n/a}{n/a}filerre
177file:tellh-n--Given a file handle, return the current offset in the file.class:word{n/a}{n/a}filerre
178file:writech---Write a character to the file represented by the handle.class:word{n/a}{n/a}filerre
179getc-c--Read a single keypress.class:word{n/a}{n/a}globalrre
180gopher:getasns-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{n/a}{n/a}gopherrre
181gt?nn-f--Compare n1 and n2. Return `TRUE` if n1 is greater than n2, or `FALSE` otherwise.class:primitive{n/a}{n/a}globalall
182gteq?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}globalall
183here-a--Return the next free address in memory.class:word{n/a}{n/a}globalall
184is---Assemble the instructions specified by the string into the current assembly scope.class:word{n/a}{n/a}globalall
185iffq---Execute the quote if the flag is `TRUE`.class:word{n/a}{n/a}globalall
186immediate---Change the class of the most recently defined word to `class:macro`.class:word{n/a}{n/a}globalall
187interprets---Interpret a single input token.class:word{n/a}{n/a}globalall
188lt?nn-f--Compare n1 and n2. Return `TRUE` if n1 is less than n2, or `FALSE` otherwise.class:primitive{n/a}{n/a}globalall
189lteq?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}globalall
190modnm-o--Divide `n` by `m` and return the remainder.class:word{n/a}{n/a}globalall
191n:-zero?n-f--Return `TRUE` if number is not zero, or `FALSE` otherwise.class:word{n/a}{n/a}nall
192n:MAX-n--Return the maximum value that will fit in a cell.class:word{n/a}{n/a}nall
193n:MIN-n--Return the minimum value that will fit in a cell.class:word{n/a}{n/a}nall
194n:absn-n--Return the absolute value of a number.class:word{n/a}{n/a}nall
195n: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{n/a}{n/a}nall
196n:decn-m--Decrement n by one.class:word{n/a}{n/a}nall
197n:even?n-f--Return `TRUE` if number is even, or `FALSE` if not.class:word{n/a}{n/a}nall
198n:incn-m--Increment n by one.class:word{n/a}{n/a}nall
199n:limitnlu-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{n/a}{n/a}nall
200n:maxmn-o--Return the greater of two values.class:word{n/a}{n/a}nall
201n:minmn-o--Return the lesser of two values.class:word{n/a}{n/a}nall
202n:negaten-n--Invert the sign of a number.class:word{n/a}{n/a}nall
203n:negative?n-f--Return `TRUE` if number is negative, or `FALSE` if not.class:word{n/a}{n/a}nall
204n:odd?n-f--Return `TRUE` if number is odd, or `FALSE` if not.class:word{n/a}{n/a}nall
205n:positive?n-f--Return `TRUE` if number is positive, or `FALSE` if not.class:word{n/a}{n/a}nall
206n:powbp-n--Return base (b) to power (p).class:word{n/a}{n/a}nall
207n:sqrtn-m--Return the square root of a number.class:word{n/a}{n/a}nall
208n:squaren-m--Return the square of a number.class:word{n/a}{n/a}nall
209n: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}nall
210n:to-floatn---FConvert a number into a floating point value.class:word{n/a}{n/a}nrre
211n:to-stringn-s--Convert a number into a string.class:word{n/a}{n/a}nall
212n:zero?n-f--Return `TRUE` if number is zero, or `FALSE` otherwise.class:word{n/a}{n/a}nall
213nipnm-m--Remove the second item from the stack.class:word{n/a}{n/a}globalall
214nl---Display a newline.class:word{n/a}{n/a}globalall
215notn-m--Perform a logical NOT operation.class:word{n/a}{n/a}globalall
216ormn-o--Perform a bitwise OR between the provided values.class:primitive{n/a}{n/a}globalall
217overnm-nmn--Put a copy of n over m.class:word{n/a}{n/a}globalall
218pop-nn--Move a value from the return stack to the data stack.class:macro{n/a}{n/a}globalall
219prefix:!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}prefixall
220prefix:#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}prefixall
221prefix:$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}prefixall
222prefix:&s-a--Return a pointer to a named item.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}prefixall
223prefix:'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}prefixall
224prefix:(s---Process token as a comment.Discard the string.Discard the string.class:macro{n/a}{n/a}prefixall
225prefix:.s---FInterpret 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}prefixrre
226prefix::s---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}prefixall
227prefix:@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}prefixall
228prefix:`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}prefixall
229pushn--n-Move a value from the data stack to the return stack.class:macro{n/a}{n/a}globalall
230putcc---Display a single character.class:word{n/a}{n/a}globalall
231putf--F-Display a floating point number.class:word{n/a}{n/a}globalrre
232putnn---Display a number.class:word{n/a}{n/a}globalall
233putss---Display a string.class:word{n/a}{n/a}globalall
234rs---Lookup a reference by name and inline its pointer to the current assembly segment.class:word{n/a}{n/a}globalall
235reclassa---Change the class handler of the most recently defined word to the specified one.class:word{n/a}{n/a}globalall
236reorder...ss-?--Restructure the order of items on the stack.class:word{n/a}{n/a}globalall
237repeat---Begin an unconditional loop.class:macro{n/a}{n/a}globalall
238reset...---Remove all items from the stack.class:word{n/a}{n/a}globalall
239rotabc-bca--Rotate the top three values.class:word{n/a}{n/a}globalall
240s,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}globalall
241s:ASCII-LETTERS-s--Constant. Returns a string of the ASCII letters (upper and lower case)class:data{n/a}{n/a}sall
242s:ASCII-LOWERCASE-s--Constant. Returns a string of the ASCII letters in lowercaseclass:data{n/a}{n/a}sall
243s:ASCII-UPPERCASE-s--Constant. Returns a string of the ASCII letters in uppercaseclass:data{n/a}{n/a}sall
244s:DIGITS-s--Constant. Return a string of characters recognized as numeric digits.class:data{n/a}{n/a}sall
245s:PUNCTUATION-s--Constant. Return a string of characters recognized as punctuation.class:data{n/a}{n/a}sall
246s:WHITESPACE-s--Constant. Returns a string of characters recognized as whitespace.class:data{n/a}{n/a}sall
247s:appendss-s--Return a new string consisting of s1 followed by s2.class:word{n/a}{n/a}sall
248s:casesSq- || 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}sall
249s:chops-s--Remove the last character from a string.class:word{n/a}{n/a}sall
250s:constss---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}sall
251s:contains-char?sc-f--Return `TRUE` if the character is present in the string or `FALSE` otherwise.class:word{n/a}{n/a}sall
252s: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}sall
253s:copysa---Copy a string (s) to a destination (a). This will include the terminator character when copying.class:word{n/a}{n/a}sall
254s:empty-s--Return an empty string.class:word{n/a}{n/a}sall
255s:eq?ss-f--Compare two strings for equality. Return `TRUE` if identical or `FALSE` if not.class:word{n/a}{n/a}sall
256s:evaluates-?--Evaluate string as if it was typed into the interpreter.class:word{n/a}{n/a}sall
257s:filtersq-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}sall
258s:for-eachsq---Execute the quote once for each value in the string.class:word{n/a}{n/a}sall
259s:hashs-n--Calculate a hash value for a string. This uses the djb2 algorithim.class:word{n/a}{n/a}sall
260s:index-ofsc-n--Return the location of the first instance of the specified character in the string.class:word{n/a}{n/a}sall
261s:index-of-stringss-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}sall
262s:keeps-s--Store a string into the heap and return a pointer to the start of it.class:word{n/a}{n/a}sall
263s:leftsn-s--Return a new string containing the first `n` characters from the source string.class:word{n/a}{n/a}sall
264s:lengths-n--Return the number of characters in a string, excluding the NULL terminator.class:word{n/a}{n/a}sall
265s:mapsq-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}sall
266s:prependss-s--Return a new string consisting of s2 followed by s1.class:word{n/a}{n/a}sall
267s:replacesss-s--Replace the first instance of s2 in s1 with s3.class:word{n/a}{n/a}sall
268s:reverses-s--Reverse the order of ASCII characters in a string.class:word{n/a}{n/a}sall
269s:rightsn-s--Return a new string containing the specified number of characters from the right side of the string.class:word{n/a}{n/a}sall
270s:skip---Internal helper function used to skip over a string in a definition.class:word{n/a}{n/a}sall
271s:splitsc-ss--Split a string on the first occurrance of the specified character.class:word{n/a}{n/a}sall
272s:split-on-stringss-ss--Split a string on the first occurrance of the specified string. After the split, the top stack item will be the part of the string before the specified subsring, and the second item will be the rest of the original string.class:word 'Hello_Brave_World! 'Brave s:split-on-string puts nl puts nl{n/a}sall
273s:substrsfl-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}sall
274s:temps-s--Move a string into the temporary string buffers.class:word{n/a}{n/a}sall
275s:to-floats---FConvert a string representation into a floating point value.class:word{n/a}{n/a}srre
276s:to-lowers-s--Convert uppercase ASCII characters in a string to lowercase.class:word{n/a}{n/a}sall
277s:to-numbers-n--Convert a string to a number.class:word{n/a}{n/a}sall
278s:to-uppers-s--Convert lowercase ASCII characters in a string to uppercase.class:word{n/a}{n/a}sall
279s:tokenizesc-a--Takes a string and a character to use as a separator. It splits the string into a set of substrings and returns a set containing pointers to each of them.class:word{n/a}{n/a}{n/a}{n/a}
280s:tokenize-on-stringss-a--Takes a string (s1) and a substring (s2) use as a separator. It splits the string into a set of substrings and returns a set containing pointers to each of them.class:word{n/a}{n/a}{n/a}{n/a}
281s:trims-s--Trim leading and trailing whitespace from a string.class:word{n/a}{n/a}sall
282s:trim-lefts-s--Trim leading whitespace from a string.class:word{n/a}{n/a}sall
283s:trim-rights-s--Trim trailing whitespace from a string.class:word{n/a}{n/a}sall
284s:with-format...s-s--Construct a new string using the template passed and items from the stack.class:word{n/a}{n/a}sall
285set:contains-string?sa-f--Return `TRUE` if the string value is in the set or`FALSE` otherwise.class:word{n/a}{n/a}setall
286set:contains?na-f--Return `TRUE` if the value is in the set or `FALSE` otherwise.class:word{n/a}{n/a}setall
287set:dupa-b--Make a copy of a set. Return the address of the copy.class:word{n/a}{n/a}setall
288set:filteraq-b--For each item in the initial set, run the specified quote. If the quote returns `TRUE`, copy the item into a new set. If `FALSE`, discard it. Returns a pointer to the new set.class:word{n/a}{n/a}setall
289set:for-eachaq---Execute the quote once for each item in the set.class:word{n/a}{n/a}setall
290set:from-resultsq-a--Execute quote. Return a new set containing the values the quote leaves on the stack.class:word{n/a}{n/a}setall
291set:from-strings-a--Create a new set with the characters in the source string.class:word{n/a}{n/a}setall
292set:lengtha-n--Return the length of a set.class:word{n/a}{n/a}setall
293set:mapaq---Execute quote once for each item in the set. Constructs a new set from the value returned by the quote.class:word{n/a}{n/a}setall
294set:nthan-b--Return the actual address of the nth item in the set.class:word{n/a}{n/a}setall
295set:reducepnq-n--Takes a set, a starting value, and a quote. This will apply the quote to each item in the set; the quote should consume two values and return one.class:word{n/a}{n/a}setall
296set:reversea-b--Reverse the order of items in a set. This will return a new set.class:word{n/a}{n/a}setall
297shiftmn-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}globalall
298sipnq-n--Run quote. After execution completes, put a copy of n back on top of the stack.class:word{n/a}{n/a}globalall
299sp---Display a space (`ASCII:SPACE`)class:word{n/a}{n/a}globalall
300storena---Store a value into the specified address.class:primitive{n/a}{n/a}globalall
301store-nextna-a--Store a value into the specified address and return the next address.class:word{n/a}{n/a}globalall
302swapnm-mn--Exchange the position of the top two items on the stackclass:primitive{n/a}{n/a}globalall
303sys:argc-n--Return the number of arguments passed to the program.class:word{n/a}{n/a}sysrre
304sys:argvn-s--Given an argument number, return the argument as a string.class:word{n/a}{n/a}sysrre
305tab---Display a tab (`ASCII:HT`)class:word{n/a}{n/a}globalall
306timesnq---Run the specified quote the specified number of times.class:word{n/a}{n/a}globalall
307tors-n--Get a copy of the top item on the return stack.class:word{n/a}{n/a}globalall
308trixqqq-?--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}globalall
309tri*xyzqqq-?--Apply q1 against x, q2 against y, and q3 against z.class:word{n/a}{n/a}globalall
310tri@xyzq-?--Apply q against x, then against y, and finally against z.class:word{n/a}{n/a}globalall
311tucknm-mnm--Put a copy of the top item on the stack under the second one.class:word{n/a}{n/a}globalall
312unix:chdirs---Change the current working directory to the specified one.class:word '/etc unix:chdir{n/a}unixrre
313unix:exec0s---Execute a process by running the application specified by s.class:word{n/a}{n/a}unixrre
314unix:exec1ss---Execute a process by running the application specified by s1. Pass s2 as an argument.class:word{n/a}{n/a}unixrre
315unix:exec2sss---Execute a process by running the application specified by s1. Pass s2 and s3 as arguments.class:word{n/a}{n/a}unixrre
316unix:exec3ssss---Execute a process by running the application specified by s1. Pass s2, s3, and s4 as arguments.class:word{n/a}{n/a}unixrre
317unix:exitn---Exit the current process, returning the specified return code.class:word{n/a}{n/a}unixrre
318unix:fork-n--Fork the current process. Returns a PID.class:word{n/a}{n/a}unixrre
319unix:getenvsa---Get an environment variable. Provide the name and an address to store it in.class:word 'SHELL s:empty [ unix:getenv ] sip puts nl{n/a}unixrre
320unix:getpid-n--Return the PID of the current process.class:word{n/a}{n/a}unixrre
321unix:killnn---Terminates a process. Takes a process and a signal to send.class:word{n/a}{n/a}unixrre
322unix:pclosen---Close a pipe.class:word{n/a}{n/a}unixrre
323unix:popensn-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}unixrre
324unix:putenvs---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}unixrre
325unix:sleepn---Sleep for the specified number of seconds.class:word{n/a}{n/a}unixrre
326unix:systems---Runs another application using the system shell and returns after execution is completed.class:word 'ls_-lh_/etc unix:system{n/a}unixrre
327unix:wait-n--Waits for a child process to complete. This maps to the wait() system call.class:word{n/a}{n/a}unixrre
328unix:writesh---Write a string to the specified file handle.class:word{n/a}{n/a}unixrre
329untilq---Execute quote repeatedly while the quote returns a value of `FALSE`. The quote must return a flag of either `TRUE` or `FALSE` to be used with this.class:word{n/a}{n/a}globalall
330v:deca---Decrement the value stored at the specified address by 1.class:word{n/a}{n/a}vall
331v:dec-byna---Decrement the value stored at the specified address by the specified value.class:word{n/a}{n/a}vall
332v:inca---Increment the value stored at the specified address by 1.class:word{n/a}{n/a}vall
333v:inc-byna---Increment the value stored at the specified address by the specified value.class:word{n/a}{n/a}vall
334v:limitalu---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}vall
335v:offa---Set a variable to 0.class:word{n/a}{n/a}vall
336v:ona---Set a variable to -1.class:word{n/a}{n/a}vall
337v:preserveaq---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}vall
338v:update-usingaq---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}vall
339vars---Create a variable. The variable is initialized to 0.class:word{n/a}{n/a}globalall
340var<n>ns---Create a variable with the specified initial value.class:word{n/a}{n/a}globalall
341whileq---Execute quote repeatedly while the quote returns a value of `TRUE`. The quote must return a flag of either `TRUE` or `FALSE` to be used with this.class:word{n/a}{n/a}globalall
342words---Display a list of all named items in the `Dictionary`.class:word{n/a}{n/a}globalall
343xormn-o--Perform a bitwise XOR operation.class:primitive{n/a}{n/a}globalall
344{{---Begin a lexically scoped area.class:word{n/a}{n/a}globalall
345}asf---End an assembly sectionclass:macro{n/a}{n/a}globalall
346}}---End a lexically scoped area.class:word{n/a}{n/a}globalall
347bye---Exit RETRO.class:word{n/a}{n/a}globalrre