+ Data: nn-n Addr: - Float: - Add `n1` to `n2` and return the result. Class: class:primitive | Namespace: global | Interface Layer: all Example #1: #1 #2 + ---reveal--- Data: - Addr: - Float: - Switch to the exposed (public) portion of a lexical namespace. Class: class:word | Namespace: global | Interface Layer: all ; Data: - Addr: - Float: - End the current definition. Class: class:macro | Namespace: global | Interface Layer: all ASCII:BS Data: -n Addr: - Float: - Constant. Refers to specific ASCII code. Class: class:data | Namespace: ASCII | Interface Layer: all ASCII:CR Data: -n Addr: - Float: - Constant. Refers to specific ASCII code. Class: class:data | Namespace: ASCII | Interface Layer: all ASCII:DEL Data: -n Addr: - Float: - Constant. Refers to specific ASCII code. Class: class:data | Namespace: ASCII | Interface Layer: all ASCII:ESC Data: -n Addr: - Float: - Constant. Refers to specific ASCII code. Class: class:data | Namespace: ASCII | Interface Layer: all ASCII:HT Data: -n Addr: - Float: - Constant. Refers to specific ASCII code. Class: class:data | Namespace: ASCII | Interface Layer: all ASCII:LF Data: -n Addr: - Float: - Constant. Refers to specific ASCII code. Class: class:data | Namespace: ASCII | Interface Layer: all ASCII:SPACE Data: -n Addr: - Float: - Constant. Refers to specific ASCII code. Class: class:data | Namespace: ASCII | Interface Layer: all ASCII:VT Data: -n Addr: - Float: - Constant. Refers to specific ASCII code. Class: class:data | Namespace: ASCII | Interface Layer: all TIB Data: -a Addr: - Float: - Constant. Returns a pointer to the text input buffer. Class: class:data | Namespace: global | Interface Layer: rre [ Data: - Addr: - Float: - Begin a quotation. Class: class:macro | Namespace: global | Interface Layer: all ] Data: - Addr: - Float: - End a quotation. Class: class:macro | Namespace: global | Interface Layer: all a:contains? Data: na-f Addr: - Float: - Return `TRUE` if the value is in the array or `FALSE` otherwise. Class: class:word | Namespace: a | Interface Layer: all a:for-each Data: aq- Addr: - Float: - Execute the quote once for each item in the array. Class: class:word | Namespace: a | Interface Layer: all again Data: - Addr: - Float: - Close an unconditional loop. Branches back to the prior `repeat`. Class: class:macro | Namespace: global | Interface Layer: all buffer:add Data: n- Addr: - Float: - Append a value to the current buffer. Class: class:word | Namespace: buffer | Interface Layer: all buffer:end Data: -a Addr: - Float: - Return a pointer to the current end of the active buffer. Class: class:word | Namespace: buffer | Interface Layer: all buffer:get Data: -n Addr: - Float: - Remove the last value from the current buffer. Class: class:word | Namespace: buffer | Interface Layer: all buffer:preserve Data: q- Addr: - Float: - Save and restore the current buffer before and after executing the specified quote. Class: class:word | Namespace: buffer | Interface Layer: all buffer:set Data: a- Addr: - Float: - Assign a new buffer as the current one. Class: class:word | Namespace: buffer | Interface Layer: all buffer:start Data: -a Addr: - Float: - Return the start address of the current buffer. Class: class:word | Namespace: buffer | Interface Layer: all c:get Data: -c Addr: - Float: - Vectored. Read a single keypress. Class: class:word | Namespace: global | Interface Layer: rre choose Data: fqq- Addr: - Float: - 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: class:word | Namespace: global | Interface Layer: all d:lookup Data: s-d Addr: - Float: - 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: class:word | Namespace: d | Interface Layer: all d:words-beginning-with Data: s- Addr: - Float: - Display a list of all named items in the `Dictionary` that begin with the provided substring. Class: class:word | Namespace: d | Interface Layer: rre dip Data: nq-n Addr: - Float: - Temporarily remove n from the stack, execute the quotation, and then restore n to the stack. Class: class:word | Namespace: global | Interface Layer: all drop Data: n- Addr: - Float: - Discard the top value on the stack. Class: class:primitive | Namespace: global | Interface Layer: all drop-pair Data: nn- Addr: - Float: - Remove top two items on the stack. Class: class:word | Namespace: global | Interface Layer: all dup Data: n-nn Addr: - Float: - Duplicate the top item on the stack. Class: class:primitive | Namespace: global | Interface Layer: all eq? Data: nn-f Addr: - Float: - Compare two values for equality. Returns `TRUE` if they are equal or `FALSE` otherwise. Class: class:primitive | Namespace: global | Interface Layer: all Example #1: #1 #2 eq? $a $b eq? fetch Data: a-n Addr: - Float: - Fetch the value stored at the specified address. Class: class:primitive | Namespace: global | Interface Layer: all Example #1: &Version fetch forever Data: q- Addr: - Float: - Run quotation in an endless loop. Class: class:word | Namespace: a | Interface Layer: all hook Data: - Addr: - Float: - Add a hook point into the current word. This should only be used as the first word in a definition. Class: class:macro | Namespace: global | Interface Layer: global Example #1: :foo hook ; Example #2: :bar hook (default_action: n:square n:put nl ; if Data: fq- Addr: - Float: - Execute the quote if the flag is `TRUE`. Class: class:word | Namespace: global | Interface Layer: all lt? Data: nn-f Addr: - Float: - Compare n1 and n2. Return `TRUE` if n1 is less than n2, or `FALSE` otherwise. Class: class:primitive | Namespace: global | Interface Layer: all n:-zero? Data: n-f Addr: - Float: - Return `TRUE` if number is not zero, or `FALSE` otherwise. Class: class:word | Namespace: n | Interface Layer: all n:inc Data: n-m Addr: - Float: - Increment n by one. Class: class:word | Namespace: n | Interface Layer: all Example #1: #100 n:inc n:zero? Data: n-f Addr: - Float: - Return `TRUE` if number is zero, or `FALSE` otherwise. Class: class:word | Namespace: n | Interface Layer: all nl Data: - Addr: - Float: - Display a newline. Class: class:word | Namespace: global | Interface Layer: all repeat Data: - Addr: - Float: - Begin an unconditional loop. Class: class:macro | Namespace: global | Interface Layer: all s:chop Data: s-s Addr: - Float: - Remove the last character from a string. Returns a new string. Class: class:word | Namespace: s | Interface Layer: all s:format Data: ...s-s Addr: - Float: - Construct a new string using the template passed and items from the stack. Class: class:word | Namespace: s | Interface Layer: all s:get Data: -s Addr: - Float: - Read input from standard in (via `c:get`) until a CR or LF is encountered. Returns a string. Class: class:word | Namespace: all | Interface Layer: rre s:length Data: s-n Addr: - Float: - Return the number of characters in a string, excluding the NULL terminator. Class: class:word | Namespace: s | Interface Layer: all s:put Data: s- Addr: - Float: - Display a string. Class: class:word | Namespace: global | Interface Layer: all set-hook Data: aa- Addr: - Float: - Patch the hook point in a2 to point to a1. Class: class:word | Namespace: global | Interface Layer: all Example #1: :foo hook ; :bar #1 ; &bar &foo set-hook sip Data: nq(?n-?)-n Addr: - Float: - Run quote. After execution completes, put a copy of n back on top of the stack. Class: class:word | Namespace: global | Interface Layer: all store Data: na- Addr: - Float: - Store a value into the specified address. Class: class:primitive | Namespace: global | Interface Layer: all Example #1: 'Base var #10 &Base store unix:exit Data: n- Addr: - Float: - Exit the current process, returning the specified return code. Class: class:word | Namespace: unix | Interface Layer: rre unix:system Data: s- Addr: - Float: - Runs another application using the system shell and returns after execution is completed. Class: class:word | Namespace: unix | Interface Layer: rre Example #1: 'ls_-lh_/etc unix:system until Data: q(-f)- Addr: - Float: - 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: class:word | Namespace: global | Interface Layer: all Example #1: #10 [ dup n:put nl n:dec dup n:zero? ] until { Data: - Addr: - Float: - Begin an array. This is intended to make creating arrays a bit cleaner than using a quotation and `a:counted-results`. Class: class:word | Namespace: global | Interface Layer: all {{ Data: - Addr: - Float: - Begin a lexically scoped area. Class: class:word | Namespace: global | Interface Layer: all } Data: -a Addr: - Float: - Complete an array begun by `{`. Returns a pointer to the data. Class: class:word | Namespace: global | Interface Layer: all }} Data: - Addr: - Float: - End a lexically scoped area. This will hide any headers between `{{` and `---reveal---`, leaving only headers between `---reveal---` and the `}}` visible. Class: class:word | Namespace: global | Interface Layer: all sigil:# Data: s-n Addr: - Float: - Process token as a number. Interpret Time: Convert the string into a number and leave on the stack. Compile Time: Convert the string into a number and compile into the current definition as a literal. Class: class:macro | Namespace: sigil | Interface Layer: all sigil:& Data: s-a Addr: - Float: - Return a pointer to a named item. If name is not found, returns 0. Interpret Time: Lookup name in dictionary, return contents of the xt field on the stack. Compile Time: Lookup name in dictionary, compile code to push the contents of the xt field into the current definition. Class: class:macro | Namespace: sigil | Interface Layer: all sigil:' Data: s-s Addr: - Float: - Process token as a string. Interpret Time: Move string into temporary buffer. If `RewriteUnderscores` is `TRUE`, replace all instances of _ with space. Compile Time: Move string into temporary buffer. If `RewriteUnderscores` is `TRUE`, replace all instances of _ with space. Then compile the string into the current definition. Class: class:macro | Namespace: sigil | Interface Layer: all sigil:( Data: s- Addr: - Float: - Process token as a comment. Interpret Time: Discard the string. Compile Time: Discard the string. Class: class:macro | Namespace: sigil | Interface Layer: all sigil:: Data: s- Addr: - Float: - Hook. Process token as a new definition. Interpret Time: Create a header pointing to `here` with the provided string as the name. Sets class to `class:word`. Class: class:macro | Namespace: sigil | Interface Layer: all sigil:\ Data: s- Addr: - Float: - Process token as an instruction bundle. Interpret Time: Discard the string. Compile Time: Assemble the opcodes in the string and use `,` to inline it into the current definition. Class: class:macro | Namespace: sigil | Interface Layer: all sigil:` Data: s- Addr: - Float: - Process token as a bytecode. Interpret Time: Discard the string. Compile Time: Convert the string to a number and use `,` to inline it into the current definition. Class: class:macro | Namespace: sigil | Interface Layer: all