39649651c7/doc/glossary.txt
Commiter: Charles Childers
Author: Charles Childers
Revision: 39649651c7
File Size: 32 KB
(March 02, 2010 11:21 UTC) About 2 years ago
updated vim syntax file; glossary generation script (Marc)
Showing without highlighting since it looks like a big file and may slow your browser - show with highlighting
Show/hide line numbers[31m[1m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[31m[1m Global Namespace
[31m[1m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[30m[0m[32m[1mcanvas
[30m[0m[34m[1m ( - )
[30m[0m Open or shut the 'canvas' vocabulary. Shut by default.
[30m[0m
[32m[1mdebug
[30m[0m[34m[1m ( - )
[30m[0m Open or shut the 'debug' vocabulary. Open by default.
[30m[0m
[32m[1meditor
[30m[0m[34m[1m ( - )
[30m[0m Open or shut the 'editor' vocabulary. Shut by default.
[30m[0m
[32m[1mretro
[30m[0m[34m[1m ( - )
[30m[0m Open or shut the 'retro' vocabulary. Open by default.
[30m[0m
[32m[1m))
[30m[0m[34m[1m ( - )
[30m[0m Conclude a vocab, moves the vocab word to the end of the dictionary so
that it can be visible when shut.
[30m[0m
[32m[1m((
[30m[0m[34m[1m ( - )
[30m[0m Start a vocab, by saving the last and second to last words to a set of
fields.
[30m[0m
[32m[1mvocab
[30m[0m[34m[1m ( "- )
[30m[0m Create a new vocabulary.
[30m[0m
[32m[1m.vocab
[30m[0m[34m[1m ( a- )
[30m[0m Class handler for vocabularies. Toggles the open/shut state when a
vocabulary is called.
[30m[0m
[32m[1mshut
[30m[0m[34m[1m ( a- )
[30m[0m Explicitly shut a vocabulary. Pass the address of the vocabulary.
[30m[0m Sample:
[30m[0m
[30m[0m ' editor shut
[30m[0m
[30m[0m
[32m[1mopen
[30m[0m[34m[1m ( a- )
[30m[0m Explicitly open a vocabulary. Pass the address of the vocabulary.
[30m[0m Sample:
[30m[0m
[30m[0m ' editor open
[30m[0m
[30m[0m
[31m[1m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[31m[1m Net
[31m[1m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[30m[0m[32m[1mnet.socket
[30m[0m[34m[1m ( -n )
[30m[0m Create a new socket.
[30m[0m
[32m[1mnet.bind
[30m[0m[34m[1m ( np-f )
[30m[0m Bind socket 'n' to port 'p'. Returns a flag.
[30m[0m
[32m[1mnet.listen
[30m[0m[34m[1m ( n-f )
[30m[0m Setup port to allow listening for incoming connections.
[30m[0m
[32m[1mnet.accept
[30m[0m[34m[1m ( n-f )
[30m[0m Accept a connection on socket 'n'. Returns a new socket for
reading/writing.
[30m[0m
[32m[1mnet.close
[30m[0m[34m[1m ( n-f )
[30m[0m Close a socket.
[30m[0m
[32m[1mnet.send
[30m[0m[34m[1m ( cn-f )
[30m[0m Write character 'c' to socket 'n'.
[30m[0m
[32m[1mnet.recv
[30m[0m[34m[1m ( s-c )
[30m[0m Read a character from a socket.
[30m[0m
[31m[1m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[31m[1m Canvas
[31m[1m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[30m[0m[32m[1mwhite
[30m[0m[34m[1m ( - )
[30m[0m Set the active drawing color to white.
[30m[0m
[32m[1myellow
[30m[0m[34m[1m ( - )
[30m[0m Set the active drawing color to yellow.
[30m[0m
[32m[1mmagenta
[30m[0m[34m[1m ( - )
[30m[0m Set the active drawing color to magenta.
[30m[0m
[32m[1mbrightred
[30m[0m[34m[1m ( - )
[30m[0m Set the active drawing color to bright red.
[30m[0m
[32m[1mbrightcyan
[30m[0m[34m[1m ( - )
[30m[0m Set the active drawing color to bright cyan.
[30m[0m
[32m[1mbrightgreen
[30m[0m[34m[1m ( - )
[30m[0m Set the active drawing color to bright green.
[30m[0m
[32m[1mbrightblue
[30m[0m[34m[1m ( - )
[30m[0m Set the active drawing color to bright blue.
[30m[0m
[32m[1mdarkgray
[30m[0m[34m[1m ( - )
[30m[0m Set the active drawing color to dark gray.
[30m[0m
[32m[1mgray
[30m[0m[34m[1m ( - )
[30m[0m Set the active drawing color to light gray.
[30m[0m
[32m[1mbrown
[30m[0m[34m[1m ( - )
[30m[0m Set the active drawing color to brown.
[30m[0m
[32m[1mpurple
[30m[0m[34m[1m ( - )
[30m[0m Set the active drawing color to purple.
[30m[0m
[32m[1mred
[30m[0m[34m[1m ( - )
[30m[0m Set the active drawing color to dark red.
[30m[0m
[32m[1mcyan
[30m[0m[34m[1m ( - )
[30m[0m Set the active drawing color to cyan.
[30m[0m
[32m[1mgreen
[30m[0m[34m[1m ( - )
[30m[0m Set the active drawing color to dark green.
[30m[0m
[32m[1mblue
[30m[0m[34m[1m ( - )
[30m[0m Set the active drawing color to blue.
[30m[0m
[32m[1mblack
[30m[0m[34m[1m ( - )
[30m[0m Set the active drawing color to black.
[30m[0m
[32m[1msolidCircle
[30m[0m[34m[1m ( xyr- )
[30m[0m Draw a filled circle.
[30m[0m
[32m[1mcircle
[30m[0m[34m[1m ( xyr- )
[30m[0m Draw a hollow circle.
[30m[0m
[32m[1mhline
[30m[0m[34m[1m ( xyw- )
[30m[0m Draw a horizontal line.
[30m[0m
[32m[1mvline
[30m[0m[34m[1m ( xyh- )
[30m[0m Draw a vertical line.
[30m[0m
[32m[1msolidBox
[30m[0m[34m[1m ( xyhw- )
[30m[0m Draw a solid box.
[30m[0m
[32m[1mbox
[30m[0m[34m[1m ( xyhw- )
[30m[0m Draw a hollow box.
[30m[0m
[32m[1mpixel
[30m[0m[34m[1m ( xy- )
[30m[0m Set a single pixel.
[30m[0m
[32m[1msetColor
[30m[0m[34m[1m ( n- )
[30m[0m Set the current color.
[30m[0m
[32m[1mclick?
[30m[0m[34m[1m ( -f )
[30m[0m Get mouse button status.
[30m[0m
[32m[1mmouse
[30m[0m[34m[1m ( -xy )
[30m[0m Get mouse coordinates.
[30m[0m
[31m[1m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[31m[1m Debug
[31m[1m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[30m[0m[32m[1msee
[30m[0m[34m[1m ( "- )
[30m[0m Parse for a word, and decompile it.
[30m[0m
[32m[1m:see
[30m[0m[34m[1m ( a- )
[30m[0m Decompile a word, given a starting address.
[30m[0m
[32m[1m.s
[30m[0m[34m[1m ( - )
[30m[0m Display the depth and items on the data stack.
[30m[0m
[32m[1mwords
[30m[0m[34m[1m ( - )
[30m[0m List all visible, named words.
[30m[0m
[31m[1m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[31m[1m Files
[31m[1m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[30m[0m[32m[1m:r
[30m[0m[34m[1m ( -n )
[30m[0m Mode for 'reading' files.
[30m[0m
[32m[1m:r+
[30m[0m[34m[1m ( -n )
[30m[0m Mode for 'reading' and 'writing' files.
[30m[0m
[32m[1m:w
[30m[0m[34m[1m ( -n )
[30m[0m Mode for 'writing' to a file.
[30m[0m
[32m[1m:w+
[30m[0m[34m[1m ( -n )
[30m[0m Mode for 'reading' and 'writing' to a file. Will erase contents of file
if it exists.
[30m[0m
[32m[1m:a
[30m[0m[34m[1m ( -n )
[30m[0m Mode for 'writing' to an existing file. Adds to the end of the file.
Creates the file if it does not exist.
[30m[0m
[32m[1m:a+
[30m[0m[34m[1m ( -n )
[30m[0m Mode for 'reading' and 'writing' to a file. Adds to the end of the file.
[30m[0m
[32m[1mfopen
[30m[0m[34m[1m ( $m-h )
[30m[0m Open a file ('$') with a specific mode. Returns a handle that can be
used with the other functions.
[30m[0m
[32m[1mfread
[30m[0m[34m[1m ( hc-f )
[30m[0m Read a byte from a file ('h'), storing it at address ('c'). Leaves a
flag.
[30m[0m
[32m[1mfwrite
[30m[0m[34m[1m ( ch-f )
[30m[0m Write a byte ('c') to a file ('h'). Leaves a flag.
[30m[0m
[32m[1mfclose
[30m[0m[34m[1m ( h-f )
[30m[0m Close a file. Leaves a flag.
[30m[0m
[32m[1mfpos
[30m[0m[34m[1m ( h-n )
[30m[0m Get the current offset into the file.
[30m[0m
[32m[1mfseek
[30m[0m[34m[1m ( nh-f )
[30m[0m Seek a specific offset in the file. Returns a flag.
[30m[0m
[32m[1mfsize
[30m[0m[34m[1m ( h-n )
[30m[0m Return the size of a file.
[30m[0m
[31m[1m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[31m[1m Editor
[31m[1m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[30m[0m[32m[1mset-blocks
[30m[0m[34m[1m ( n- )
[30m[0m Set the current number of blocks. Does not erase the blocks.
[30m[0m
[32m[1mea
[30m[0m[34m[1m ( - )
[30m[0m Evaluate all of the blocks.
[30m[0m
[32m[1me
[30m[0m[34m[1m ( - )
[30m[0m Evaluate the current block.
[30m[0m
[32m[1mnew
[30m[0m[34m[1m ( - )
[30m[0m Erase all of the blocks.
[30m[0m
[32m[1mi
[30m[0m[34m[1m ( n"- )
[30m[0m Parse for text and insert the text into line 'n'.
[30m[0m
[32m[1mia
[30m[0m[34m[1m ( nc"- )
[30m[0m Parse for text and insert into line 'n' starting at column 'c'.
[30m[0m
[32m[1mn
[30m[0m[34m[1m ( - )
[30m[0m Go to the next block.
[30m[0m
[32m[1mp
[30m[0m[34m[1m ( - )
[30m[0m Go to the previous block.
[30m[0m
[32m[1mx
[30m[0m[34m[1m ( - )
[30m[0m Delete the contents of the current block.
[30m[0m
[32m[1md
[30m[0m[34m[1m ( n- )
[30m[0m Erase the contents of line 'n' in the current block.
[30m[0m
[32m[1ms
[30m[0m[34m[1m ( n- )
[30m[0m Quickly select a new block.
[30m[0m
[32m[1mv
[30m[0m[34m[1m ( - )
[30m[0m View the current block.
[30m[0m
[32m[1m(ia)
[30m[0m[34m[1m ( lc"- )
[30m[0m Internal factor of 'ia'.
[30m[0m
[32m[1m(v)
[30m[0m[34m[1m ( - )
[30m[0m Internal factor of 'v'.
[30m[0m
[32m[1m(line)
[30m[0m[34m[1m ( n-a )
[30m[0m Returns the address a line in the current block starts at.
[30m[0m
[32m[1m(block)
[30m[0m[34m[1m ( -a )
[30m[0m Returns the address the current block starts at.
[30m[0m
[32m[1mblock
[30m[0m[34m[1m ( n-a )
[30m[0m Returns the address a block starts at.
[30m[0m
[32m[1mblk
[30m[0m[34m[1m ( -a )
[30m[0m Variable. Holds the number of the current block.
[30m[0m
[32m[1mline-ending
[30m[0m[34m[1m ( -a )
[30m[0m Variable. Holds the character that marks "end of line" for 'i' and 'ia'.
[30m[0m
[32m[1moffset
[30m[0m[34m[1m ( -a )
[30m[0m Variable. Holds the current start of the block buffer.
[30m[0m
[32m[1m#-blocks
[30m[0m[34m[1m ( -a )
[30m[0m Variable. Holds the number of blocks conained in the block buffer.
[30m[0m
[31m[1m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[31m[1m Retro
[31m[1m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[30m[0m[32m[1m1+
[30m[0m[34m[1m ( n-n )
[30m[0m Increase TOS by 1.
[30m[0m
[32m[1m1-
[30m[0m[34m[1m ( n-n )
[30m[0m Decrease TOS by 1.
[30m[0m
[32m[1mswap
[30m[0m[34m[1m ( xy-yx )
[30m[0m Exchange the positions of TOS and NOS.
[30m[0m
[32m[1mdrop
[30m[0m[34m[1m ( n- )
[30m[0m Remove TOS from the stack.
[30m[0m
[32m[1mand
[30m[0m[34m[1m ( xy-z )
[30m[0m Bitwise AND.
[30m[0m
[32m[1mor
[30m[0m[34m[1m ( xy-z )
[30m[0m Bitwise OR.
[30m[0m
[32m[1mxor
[30m[0m[34m[1m ( xy-z )
[30m[0m Bitwise XOR.
[30m[0m
[32m[1m@
[30m[0m[34m[1m ( a-n )
[30m[0m Fetch value from address.
[30m[0m
[32m[1m!
[30m[0m[34m[1m ( na- )
[30m[0m Store value to address.
[30m[0m
[32m[1m+
[30m[0m[34m[1m ( xy-z )
[30m[0m Add x and y, giving z.
[30m[0m
[32m[1m-
[30m[0m[34m[1m ( xy-z )
[30m[0m Subtract y from x, giving z.
[30m[0m
[32m[1m*
[30m[0m[34m[1m ( xy-z )
[30m[0m Multiply x by y, giving z.
[30m[0m
[32m[1m/mod
[30m[0m[34m[1m ( xy-rq )
[30m[0m Divide x / y, giving the result (q) and modulus (r).
[30m[0m
[32m[1m<<
[30m[0m[34m[1m ( xy-z )
[30m[0m Shift bits left.
[30m[0m
[32m[1m>>
[30m[0m[34m[1m ( xy-z )
[30m[0m Shift bits right.
[30m[0m
[32m[1mnip
[30m[0m[34m[1m ( xy-y )
[30m[0m Remove NOS, leaving TOS.
[30m[0m
[32m[1mdup
[30m[0m[34m[1m ( x-xx )
[30m[0m Duplicate TOS.
[30m[0m
[32m[1min
[30m[0m[34m[1m ( p-n )
[30m[0m Read a value from an I/O port.
[30m[0m
[32m[1mout
[30m[0m[34m[1m ( np- )
[30m[0m Write a value to an I/O port.
[30m[0m
[32m[1maccept
[30m[0m[34m[1m ( c- )
[30m[0m Read from input device until the read character is equal to c. Results
are stored in 'tib'.
[30m[0m
[32m[1mhere
[30m[0m[34m[1m ( -a )
[30m[0m Return the next available address in the heap.
[30m[0m
[32m[1m,
[30m[0m[34m[1m ( n- )
[30m[0m Copy value to 'here', and increase 'here' by 1.
[30m[0m
[32m[1m]
[30m[0m[34m[1m ( - )
[30m[0m Turn 'compiler' 'on'.
[30m[0m
[32m[1mcreate
[30m[0m[34m[1m ( "- )
[30m[0m Create a new dictionary header pointing to 'here' with a class of
'.data'
[30m[0m
[32m[1m:
[30m[0m[34m[1m ( "- )
[30m[0m 'create' a new word, set class to '.word' and call ']'.
[30m[0m
[32m[1mlater
[30m[0m[34m[1m ( RS: xy-yx )
[30m[0m Swap addresses on return stack. This is used to defer execution until a
later time, hence the name.
[30m[0m
[32m[1mcr
[30m[0m[34m[1m ( - )
[30m[0m Display a newline character.
[30m[0m
[32m[1memit
[30m[0m[34m[1m ( c- )
[30m[0m Display a character.
[30m[0m
[32m[1mtype
[30m[0m[34m[1m ( $- )
[30m[0m Display a zero-terminated string
[30m[0m
[32m[1mclear
[30m[0m[34m[1m ( - )
[30m[0m Clear the display.
[30m[0m
[32m[1mover
[30m[0m[34m[1m ( xy-xyx )
[30m[0m Get a copy of NOS.
[30m[0m
[32m[1m2drop
[30m[0m[34m[1m ( xy- )
[30m[0m Drop the top two items on stack.
[30m[0m
[32m[1mnot
[30m[0m[34m[1m ( n-n )
[30m[0m Perform a NOT operation.
[30m[0m
[32m[1mrot
[30m[0m[34m[1m ( xyz-yzx )
[30m[0m Rotate top three stack items.
[30m[0m
[32m[1m-rot
[30m[0m[34m[1m ( xyz-xzy )
[30m[0m Rotate top three stack items twice.
[30m[0m
[32m[1mtuck
[30m[0m[34m[1m ( xy-yxy )
[30m[0m Place a copy of TOS under NOS.
[30m[0m
[32m[1m2dup
[30m[0m[34m[1m ( xy-xyxy )
[30m[0m Duplicate the top two items on the stack.
[30m[0m
[32m[1mon
[30m[0m[34m[1m ( a- )
[30m[0m Set a variable to 'TRUE'.
[30m[0m
[32m[1moff
[30m[0m[34m[1m ( a- )
[30m[0m Set a variable to 'FALSE'.
[30m[0m
[32m[1m/
[30m[0m[34m[1m ( xy-q )
[30m[0m Return x / y.
[30m[0m
[32m[1mmod
[30m[0m[34m[1m ( xy-r )
[30m[0m Divide x / y and return modulus.
[30m[0m
[32m[1mneg
[30m[0m[34m[1m ( n-n )
[30m[0m Negate the value. This is the same as '-1 *'.
[30m[0m
[32m[1mexecute
[30m[0m[34m[1m ( a- )
[30m[0m Call an address.
[30m[0m
[32m[1m(.)
[30m[0m[34m[1m ( n- )
[30m[0m Display a number without a trailing space. See also '.'
[30m[0m
[32m[1m"
[30m[0m[34m[1m ( "-$ )
[30m[0m Parse for and return a string. See also 'tempString' and 'keepString'.
[30m[0m
[32m[1mcompare
[30m[0m[34m[1m ( $$-f )
[30m[0m Compare two strings.
[30m[0m
[32m[1mwait
[30m[0m[34m[1m ( - )
[30m[0m Wait for an I/O event.
[30m[0m
[32m[1m'
[30m[0m[34m[1m ( "-a )
[30m[0m Parse for a name, return the corresponding xt.
[30m[0m
[32m[1m@+
[30m[0m[34m[1m ( a-an )
[30m[0m Fetch from an address, return the value and the address incremented by
one.
[30m[0m
[32m[1m!+
[30m[0m[34m[1m ( na-a )
[30m[0m Store a value to an address and return the address incremented by one.
[30m[0m
[32m[1m+!
[30m[0m[34m[1m ( na- )
[30m[0m Add value to contents of address.
[30m[0m
[32m[1m-!
[30m[0m[34m[1m ( na- )
[30m[0m Subtract value from contents of address.
[30m[0m
[32m[1m:is
[30m[0m[34m[1m ( xa- )
[30m[0m Assign 'a' to call 'x' instead of its default definition.
[30m[0m
[32m[1m:devector
[30m[0m[34m[1m ( a- )
[30m[0m Restore a vectored definition, pointed to by 'a', to its default
definition.
[30m[0m
[32m[1mis
[30m[0m[34m[1m ( a"- )
[30m[0m Parse for a word, and assign it as a vector to 'a'.
[30m[0m
[32m[1mdevector
[30m[0m[34m[1m ( "- )
[30m[0m Parse for a name, and strip the vector.
[30m[0m
[32m[1mcompile
[30m[0m[34m[1m ( a- )
[30m[0m Compile a call to an address.
[30m[0m
[32m[1mliteral,
[30m[0m[34m[1m ( n- )
[30m[0m Compile a value as a literal (push to stack) instruction.
[30m[0m
[32m[1mtempString
[30m[0m[34m[1m ( $-$ )
[30m[0m Move a string to a temporary buffer for safekeeping.
[30m[0m
[32m[1mredraw
[30m[0m[34m[1m ( - )
[30m[0m Force a video update. See also 'fastRender'.
[30m[0m
[32m[1mkeepString
[30m[0m[34m[1m ( $-$ )
[30m[0m Compile a string into the heap and return a pointer to it.
[30m[0m
[32m[1mgetLength
[30m[0m[34m[1m ( $-n )
[30m[0m Get the length of a string.
[30m[0m
[32m[1mbye
[30m[0m[34m[1m ( - )
[30m[0m Exit Retro.
[30m[0m
[32m[1mremap-keys
[30m[0m[34m[1m ( c-c )
[30m[0m Called by 'accept', this can replace or alter keys as they are being
typed. Useful for custom remapping for unusual systems.
[30m[0m
[32m[1mwith-class
[30m[0m[34m[1m ( xa- )
[30m[0m Special function called by 'listen'. It will invoke an xt ('x') via its
class handler ('a'). Normally it just passes control to 'execute'.
[30m[0m
[32m[1m.word
[30m[0m[34m[1m ( a- )
[30m[0m Word class for normal words. Words with this class will be compiled
into definitions, or called, if the interpreter is on.
[30m[0m
[32m[1m.macro
[30m[0m[34m[1m ( a- )
[30m[0m Word class for immediate words. Words with this class will always
execute.
[30m[0m
[32m[1m.data
[30m[0m[34m[1m ( n- )
[30m[0m If interpreting, leave the value on the stack. If compiling, compile as
a literal into the definition.
[30m[0m
[32m[1md->class
[30m[0m[34m[1m ( d-a )
[30m[0m Given a dictionary header, return the address of the class field.
[30m[0m
[32m[1md->xt
[30m[0m[34m[1m ( d-a )
[30m[0m Given a dictionary header, return the address of the xt field.
[30m[0m
[32m[1md->name
[30m[0m[34m[1m ( d-$ )
[30m[0m Given a dictionary header, return the address the word name starts at.
[30m[0m
[32m[1mboot
[30m[0m[34m[1m ( - )
[30m[0m Called when Retro is started. Useful as a TurnKey hook.
[30m[0m
[32m[1mdepth
[30m[0m[34m[1m ( -n )
[30m[0m Return the number of items on the stack.
[30m[0m
[32m[1mreset
[30m[0m[34m[1m ( ...- )
[30m[0m Remove all items from the stack.
[30m[0m
[32m[1mnotfound
[30m[0m[34m[1m ( - )
[30m[0m Called when a token is not found in the dictionary and when the token
is not a valid number in the current 'base'.
[30m[0m
[32m[1msave
[30m[0m[34m[1m ( - )
[30m[0m Save the current image.
[30m[0m
[32m[1m>number
[30m[0m[34m[1m ( $-n )
[30m[0m Convert a string to a number. Conversion is done in the current 'base'.
[30m[0m
[32m[1mok
[30m[0m[34m[1m ( - )
[30m[0m Called after each token is processed. Useful as a TurnKey hook.
[30m[0m
[32m[1mlisten
[30m[0m[34m[1m ( - )
[30m[0m The main interpreter routine. Exercise caution when altering this.
[30m[0m
[32m[1misNumber?
[30m[0m[34m[1m ( - )
[30m[0m
[32m[1mkey
[30m[0m[34m[1m ( -c )
[30m[0m Read a single character from the keyboard. If you want to display the
character, use 'ekey' instead.
[30m[0m
[32m[1mekey
[30m[0m[34m[1m ( -c )
[30m[0m Read and 'emit' a single character from the keyboard.
[30m[0m
[32m[1mtime
[30m[0m[34m[1m ( -n )
[30m[0m Return the current UnixTime
[30m[0m
[32m[1ms"
[30m[0m[34m[1m ( R: -$ )
[30m[0m[34m[1m ( C: "- )
[30m[0m Parse for a string, call 'keepString', and compile the address into the
defintion as a literal. This is 'compile-only'
[30m[0m
[32m[1m[
[30m[0m[34m[1m ( C: - )
[30m[0m Turn 'compiler' off. This is 'compile-only'
[30m[0m
[32m[1m;
[30m[0m[34m[1m ( C: - )
[30m[0m End a definition. This is 'compile-only'
[30m[0m
[32m[1m;;
[30m[0m[34m[1m ( C: - )
[30m[0m Compile an exit instruction into the current definition. This is
'compile-only'
[30m[0m
[32m[1m=if
[30m[0m[34m[1m ( R: xy- )
[30m[0m[34m[1m ( C: -a )
[30m[0m Compare x = y, jump to 'then' or 'else' if condition is not met. This
is 'compile-only'
[30m[0m
[32m[1m>if
[30m[0m[34m[1m ( R: xy- )
[30m[0m[34m[1m ( C: -a )
[30m[0m Compare x > y, jump to 'then' or 'else' if condition is not met. This
is 'compile-only'
[30m[0m
[32m[1m<if
[30m[0m[34m[1m ( R: xy- )
[30m[0m[34m[1m ( C: -a )
[30m[0m Compare x < y, jump to 'then' or 'else' if condition is not met. This
is 'compile-only'
[30m[0m
[32m[1m!if
[30m[0m[34m[1m ( R: xy- )
[30m[0m[34m[1m ( C: -a )
[30m[0m Compare x <> y, jump to 'then' or 'else' if condition is not met. This
is 'compile-only'
[30m[0m
[32m[1mthen
[30m[0m[34m[1m ( R: - )
[30m[0m[34m[1m ( C: a- )
[30m[0m This closes a conditional opened by one of the 'if' forms. This is
'compile-only'. See also: 'else'.
[30m[0m
[32m[1mrepeat
[30m[0m[34m[1m ( R: - )
[30m[0m[34m[1m ( C: -a )
[30m[0m Begin an unconditional loop. This is 'compile-only'
[30m[0m
[32m[1magain
[30m[0m[34m[1m ( R: - )
[30m[0m[34m[1m ( C: a- )
[30m[0m Finish an unconditional loop. This is 'compile-only'
[30m[0m
[32m[1m0;
[30m[0m[34m[1m ( R: n-n || n- )
[30m[0m[34m[1m ( C: - )
[30m[0m Exit a word if TOS = 0. If TOS = 0, also drop TOS. If not, leave TOS
alone and continue executing. This is 'compile-only'
[30m[0m
[32m[1mpush
[30m[0m[34m[1m ( R: n- )
[30m[0m[34m[1m ( C: - )
[30m[0m Move a value from the data stack to the return stack. This is
'compile-only'
[30m[0m
[32m[1mpop
[30m[0m[34m[1m ( R: -n )
[30m[0m[34m[1m ( C: - )
[30m[0m Move a value from the return stack to the data stack. This is
'compile-only'
[30m[0m
[32m[1m[']
[30m[0m[34m[1m ( R: -a )
[30m[0m[34m[1m ( C: "- )
[30m[0m Parse for a name and compile the corresponding xt into the definition
as a literal. This is 'compile-only'
[30m[0m
[32m[1mfor
[30m[0m[34m[1m ( R: n- )
[30m[0m[34m[1m ( C: -a )
[30m[0m Start a simple countdown loop. This should be paired with 'next'. This
is 'compile-only'
[30m[0m
[32m[1mnext
[30m[0m[34m[1m ( R: - )
[30m[0m[34m[1m ( C: a- )
[30m[0m Finish a simple countdown loop. This should be paired with 'for'. This
is 'compile-only'
[30m[0m
[32m[1m(
[30m[0m[34m[1m ( "- )
[30m[0m Start a comment. Parse for and ignore anything up to a ) character.
This is 'immediate'.
[30m[0m
[32m[1mlast
[30m[0m[34m[1m ( -a )
[30m[0m Variable. Holds a pointer to the most recent dictionary header.
[30m[0m
[32m[1mcompiler
[30m[0m[34m[1m ( -a )
[30m[0m Variable. Holds the current state of the compiler.
[30m[0m
[32m[1mtib
[30m[0m[34m[1m ( -a )
[30m[0m Return the address of the 'text input buffer'.
[30m[0m
[32m[1mupdate
[30m[0m[34m[1m ( -a )
[30m[0m Internal variable. Used to help control screen updates.
[30m[0m
[32m[1mfb
[30m[0m[34m[1m ( -a )
[30m[0m Variable. 'TRUE' if canvas exists, 'FALSE' otherwise.
[30m[0m
[32m[1mfw
[30m[0m[34m[1m ( -a )
[30m[0m Variable. Holds the width of the canvas.
[30m[0m
[32m[1mfh
[30m[0m[34m[1m ( -a )
[30m[0m Variable. Holds the height of the canvas.
[30m[0m
[32m[1m#mem
[30m[0m[34m[1m ( -a )
[30m[0m Variable. Holds the amount of memory the NgaroVm is providing to the
image.
[30m[0m
[32m[1mheap
[30m[0m[34m[1m ( -a )
[30m[0m Variable. This holds the address returned by 'here'.
[30m[0m
[32m[1mwhich
[30m[0m[34m[1m ( -a )
[30m[0m A MetaVariable. This holds the address of the most recently
searched-for dictionary header.
[30m[0m
[32m[1mwhitespace
[30m[0m[34m[1m ( -a )
[30m[0m Variable. If 'on}}, remap cr, lf, tab to space. If 'off', do not.
[30m[0m
[32m[1mbase
[30m[0m[34m[1m ( -a )
[30m[0m Variable. Holds the current numeric base for parsing and display. Used
by '>number', '(.)', '.', and others.
[30m[0m
[32m[1mforget
[30m[0m[34m[1m ( "- )
[30m[0m Parse for and forget a word. Any words defined after the word will also
be removed and their memory reclaimed.
[30m[0m
[32m[1md'
[30m[0m[34m[1m ( "-d )
[30m[0m Parse for a name and return the dictionary header for it.
[30m[0m Note:
[30m[0m If not found, this will return the header for 'd'', so exercise caution
if manipulating the header!
[30m[0m
[32m[1mreclass
[30m[0m[34m[1m ( a- )
[30m[0m Change the class of the most recently defined word to the class 'a'
points to.
[30m[0m
[32m[1mreclass:
[30m[0m[34m[1m ( a"- )
[30m[0m Parse for, and change the class of a word, to the class 'a' points to.
[30m[0m
[32m[1m.primitive
[30m[0m[34m[1m ( a- )
[30m[0m Special class for words that map directly to primitives. If compiling,
inline the opcode. If interpreting, call as usual. If revectored, fall
back to '.word' class.
[30m[0m
[32m[1m.compiler
[30m[0m[34m[1m ( a- )
[30m[0m Class for words that will only be called when 'compiler' is 'on'.
[30m[0m
[32m[1mcompile-only
[30m[0m[34m[1m ( - )
[30m[0m Change the class of the most recently defined word to '.compiler'
[30m[0m
[32m[1mimmediate
[30m[0m[34m[1m ( - )
[30m[0m Change the class of the most recently defined word to '.macro'
[30m[0m
[32m[1mchar:
[30m[0m[34m[1m ( "-c )
[30m[0m Parse for a character, pass the character to '.data'. This is
'immediate'.
[30m[0m
[32m[1m++
[30m[0m[34m[1m ( a- )
[30m[0m Increment value at address by 1.
[30m[0m
[32m[1m--
[30m[0m[34m[1m ( a- )
[30m[0m Decrement value at address by 1.
[30m[0m
[32m[1m<list>
[30m[0m[34m[1m ( -a )
[30m[0m List of addresses used for building namespaces.
[30m[0m
[32m[1m{
[30m[0m[34m[1m ( - )
[30m[0m Start a private namespace.
[30m[0m
[32m[1m}
[30m[0m[34m[1m ( - )
[30m[0m Close a private namespace.
[30m[0m
[32m[1m{{
[30m[0m[34m[1m ( - )
[30m[0m Start a public/private namespace.
[30m[0m
[32m[1m---reveal---
[30m[0m[34m[1m ( - )
[30m[0m Switch a public/private namespace to public mode.
[30m[0m
[32m[1m}}
[30m[0m[34m[1m ( - )
[30m[0m Close a public/private namespace.
[30m[0m
[32m[1mvariable:
[30m[0m[34m[1m ( n"- )
[30m[0m Create a variable with an initial value of 'n'.
[30m[0m
[32m[1mvariable
[30m[0m[34m[1m ( "- )
[30m[0m Create a variable with an initial value of '0'.
[30m[0m
[32m[1mconstant
[30m[0m[34m[1m ( n"- )
[30m[0m Create a constant with a value of 'n'.
[30m[0m
[32m[1mallot
[30m[0m[34m[1m ( n- )
[30m[0m Allocate or free memory in a linear fashion.
[30m[0m
[32m[1mzallot
[30m[0m[34m[1m ( n- )
[30m[0m Allocate or free memory. If allocating, fill memory with 0's.
[30m[0m
[32m[1mcopy
[30m[0m[34m[1m ( sdc- )
[30m[0m Copy 'c' cells from 's' to 'd'.
[30m[0m
[32m[1mfill
[30m[0m[34m[1m ( anc- )
[30m[0m Fill memory starting at 'a', with 'c' copies of value 'n'.
[30m[0m
[32m[1m`
[30m[0m[34m[1m ( C: "- )
[30m[0m Parse for a name, and lay down the xt and corresponding class handler.
This is 'compile-only'
[30m[0m Notes:
[30m[0m This one is a bit tricky. Here is a short bit of code to illustrate
what it does:
[30m[0m
[30m[0m : foo 1 . ;
[30m[0m : bar 2 . ;
[30m[0m : test0 ['] foo .word ['] bar .word ; immediate
[30m[0m test0
[30m[0m : test1 test0 ;
[30m[0m test1
[30m[0m see test1
[30m[0m : test2 ` foo ` bar ; immediate
[30m[0m : test3 test2 ;
[30m[0m test2
[30m[0m test3
[30m[0m see test3
[30m[0m
[30m[0m By laying down an xt, and its class handler, it simulates the behavior
of 'listen', allowing 'immediate' and 'compile-only' code to inline
calls, literals, etc.
[30m[0m
[32m[1mstub
[30m[0m[34m[1m ( "- )
[30m[0m Create a stub word, for use with 'is' or ':is'.
[30m[0m Sample:
[30m[0m
[30m[0m stub foo
[30m[0m
[30m[0m Notes:
[30m[0m This compiles to the same code as:
[30m[0m
[30m[0m : foo ;
[30m[0m
[30m[0m
[32m[1mTRUE
[30m[0m[34m[1m ( -f )
[30m[0m Return a TRUE flag.
[30m[0m
[32m[1mFALSE
[30m[0m[34m[1m ( -f )
[30m[0m Return a FALSE flag.
[30m[0m
[32m[1mahead
[30m[0m[34m[1m ( -a )
[30m[0m Compile a jump to 0; leaving the address the jump target is at on the
stack. Can be patched later.
[30m[0m
[32m[1mif
[30m[0m[34m[1m ( - )
[30m[0m This is 'compile-only'.
[30m[0m
[32m[1mif;
[30m[0m[34m[1m ( f- )
[30m[0m Exit word if TOS <> 0. This is 'compile-only'.
[30m[0m
[32m[1m;then
[30m[0m[34m[1m ( - )
[30m[0m Exit a word, and close a conditional. This is 'compile-only'. This is
the same as ';; then'
[30m[0m
[32m[1melse
[30m[0m[34m[1m ( R: - )
[30m[0m[34m[1m ( C: a-a )
[30m[0m Used with 'if'/'then', this lets you conditionally execute code if the
condition was not met. This is 'compile-only'.
[30m[0m Sample:
[30m[0m
[30m[0m[34m[1m : foo ( f- ) if ." true" else ." false" then ;
[30m[0m
[30m[0m
[32m[1m=
[30m[0m[34m[1m ( xy-f )
[30m[0m Compare x = y.
[30m[0m
[32m[1m<>
[30m[0m[34m[1m ( xy-f )
[30m[0m Compare x <> y.
[30m[0m
[32m[1m>
[30m[0m[34m[1m ( xy-f )
[30m[0m Compare x > y.
[30m[0m
[32m[1m<
[30m[0m[34m[1m ( xy-f )
[30m[0m Compare x < y.
[30m[0m
[32m[1mpow
[30m[0m[34m[1m ( bp-n )
[30m[0m Returns b^p.
[30m[0m Sample:
[30m[0m
[30m[0m 256 3 pow
[30m[0m
[30m[0m Is the same as:
[30m[0m
[30m[0m 256 dup dup * *
[30m[0m
[30m[0m
[32m[1mr
[30m[0m[34m[1m ( -n )
[30m[0m Get a copy of the top item on the return stack and place it on the data
stack. Identical to 'pop dup push'. This is 'compile-only'.
[30m[0m
[32m[1mrdrop
[30m[0m[34m[1m ( RS: - )
[30m[0m This drops the top value on the return stack. It is 'compile-only', and
acts the same as 'pop drop'.
[30m[0m
[32m[1mwithin
[30m[0m[34m[1m ( xlu-f )
[30m[0m Check to see if 'x' is between 'l' and 'u'. The range is inclusive.
[30m[0m
[32m[1m."
[30m[0m[34m[1m ( "- )
[30m[0m Parse for and display a string. This is 'immediate' and can be used
inside a definition.
[30m[0m
[32m[1mdecimal
[30m[0m[34m[1m ( - )
[30m[0m Set 'base' to 10. This is the default setting.
[30m[0m
[32m[1mhex
[30m[0m[34m[1m ( - )
[30m[0m Set 'base' to 16.
[30m[0m
[32m[1moctal
[30m[0m[34m[1m ( - )
[30m[0m Set 'base' to 8.
[30m[0m
[32m[1mbinary
[30m[0m[34m[1m ( - )
[30m[0m Set 'base' to 2.
[30m[0m
[32m[1mfind
[30m[0m[34m[1m ( "-af )
[30m[0m Search for a word. Return an address and flag indicating success or
failure.
[30m[0m
[32m[1m.
[30m[0m[34m[1m ( n- )
[30m[0m Display a number in the current 'base', with a trailing 'space'.
[30m[0m See also: '(.)'
[30m[0m
[32m[1mxt->d
[30m[0m[34m[1m ( a-d )
[30m[0m Get a dictionary header corresponding to an address.
[30m[0m
[32m[1m.does
[30m[0m[34m[1m ( R: aa-a )
[30m[0m[34m[1m ( C: aa- )
[30m[0m Superclass for 'does>'. See CreateDoes.
[30m[0m
[32m[1mdoes>
[30m[0m[34m[1m ( -a )
[30m[0m Reassign the class of a 'create''d word to the code following 'does>'.
Lays down a pointer to the xt of the word, a pointer to the code after
'does>', and a call to '.does'. See CreateDoes.
[30m[0m
[32m[1mspace
[30m[0m[34m[1m ( - )
[30m[0m Display a space.
[30m[0m
[32m[1meval
[30m[0m[34m[1m ( ac- )
[30m[0m Evaluate a string, starting at 'a', and being 'c' cells in length.
[30m[0m
[32m[1mifNotDefined
[30m[0m[34m[1m ( ""- )
[30m[0m Parse for a name and execute a code block if the name is not defined.
[30m[0m Sample:
[30m[0m
[30m[0m ifNotDefined rem { bye }
[30m[0m
[30m[0m
[32m[1mifDefined
[30m[0m[34m[1m ( ""- )
[30m[0m Parse for a name and execute a code block if the name is defined.
[30m[0m Sample:
[30m[0m
[30m[0m ifDefined rem { bye }
[30m[0m
[30m[0m
[32m[1mfori
[30m[0m[34m[1m ( R: n-i )
[30m[0m[34m[1m ( C: -a )
[30m[0m Start a 'fori' loop. The current loop index (from 0 to n-1) is pushed
to the stack each time the loop repeats. This is 'compile-only'
[30m[0m
[32m[1mnexti
[30m[0m[34m[1m ( R: - )
[30m[0m[34m[1m ( C: a- )
[30m[0m Close a 'fori' loop. This is 'compile-only'
[30m[0m
[32m[1mfastRender
[30m[0m[34m[1m ( - )
[30m[0m Defer output generated by the calling word until the word executes.
[30m[0m
[32m[1melements
[30m[0m[34m[1m ( n"- )
[30m[0m Create a series of variables. 'n' denotes the number of items. The
memory allocated for the values will be contiguous and can be accessed
as an array.
[30m[0m
[32m[1m>last
[30m[0m[34m[1m ( a- )
[30m[0m Move a dictionary entry to the top of the dictionary.
[30m[0m
[32m[1mexpose
[30m[0m[34m[1m ( "- )
[30m[0m Parse for a word and move it to the top of the dictionary.
[30m[0m
[32m[1minclude
[30m[0m[34m[1m ( "- )
[30m[0m Add a file to the input stack. This parses for a filename, and attempts
to treat it as a source of input. It is not supported by all NgaroVm
implementations, and should act as a no-op after parsing if the VM
doesn't support it.
[30m[0m |