A brief description of what the command does at compile or execute
time depending upon its function.
Command : editv
Type : system variable
Arguments :
Returns : address of edit vector
Description used
if a replacement 'inline' input routine is written the address of the
routine is put into this variable.
Command : base
Type : system variable
Arguments :
Returns : address of system base
Description
used to change the current number entry mode base
Example: 16 mode ! - sets hex numeric entry
Command : compiler
Type : system variable
Arguments :
Returns : <entry>
Description
Pushes the address of the compiler variable which points to the last
entry in the COMPILER vocabulary
Command : context
Type : system variable
Arguments :
Returns : <entry>
Description
Pushes the address of the system CONTEXT variable to the stack.
Command : current
Type : system variable
Arguments :
Returns : <entry>
Description
Pushes the address of the current vocabulary variable.
Command : dp
Type : system variable
Arguments :
Returns : address of dictionary pointer variable
Description
used to locate the current dp value
Command: himem
Type : system variable
Arguments :
Returns : address of himem variable
Description
the word at this address is the value of the highest address that the
dictionary pointer could increase towards before corrupting the stack space.
Command : lbp
Type : system variable
Arguments :
Returns : address of line buffer pointer
Description
used by inline and token for character entry and tokenisation
Command : mode
Type : system variable
Arguments :
Returns : address of mode variable
Description
indicates if system is in compile ( 1 ) or execute mode ( 0 )
Command : state
Type : system variable
Arguments :
Returns : address of state variable
Description
used with mode to decide if a word is compiled or executed
Command : core
Type : system variable
Arguments :
Returns :
Description
Invokes the CORE vocabulary.
Command : quit
Type : command
Arguments :
Returns :
Description
exits from the forth environment.
Command : singletask
Type : command
Arguments :
Returns :
Description
stop multitasking
Command : multitask
Type : command
Arguments :
Returns :
Description
start multitasking
Command : fork
Type : command
Arguments : address of routine to fork
Returns :
Description
takes address of routine from stack and starts the task when the next quantam elapses.
Example: ' test fork - will run test as a background task
Command : taskblock
Type : command
Arguments :
Returns :
Description
Command : quantam
Type : system variable
Arguments :
Returns : address of multitask data block
Description
used by multitasking code to get access to task queues and status. enables utilities to be written to examine task status etc. DO NOT MODIFY THE DATA BLOCK THIS POINTS TO.
Command : token
Type : command
Arguments : <separator>
Returns :
Description
tokenises the next 'word' separated by <separator> into the dictionary space
Example : aspace token - tokenises next word in input buffer
Command : search
Type : command
Arguments : <address>
Returns : <status> [<address>]
Description
used to locate a key word code address. The dictionary pointed to be
<address> will be searched. if the token is found then status will be 0
and the address of the routine will be pushed to the stack, otherwise a
1 will be pushed.
Command : 0
Type : command / arithmetic
Arguments :
Returns : 0
Description
pushes a zero onto the data stack
Command : 1
Type : command / arithmetic
Arguments :
Returns : 1
Description
pushes a 1 onto data stack
Command : -1
Type : command / arithmetic
Arguments :
Returns : -1
Description
pushes -1 onto the data stack
Command : 1+
Type : command / arithmetic
Arguments : <entry1>
Returns : <entry1>+1
Description
adds 1 to top stack entry
Command : 1-
Type : command / arithmetic
Arguments : <entry1>
Returns : <entry1>-1
Description
subtracts 1 from the top stack entry
Command : 2+
Type : command / arithmetic
Arguments : <entry1>
Returns : <entry1>+2
Description
adds 2 to top stack entry
Command : 2-
Type : command / arithmetic
Arguments : <entry1>
Returns : <entry1>-2
Description
subtracts 2 from the top stack entry
Command : 2*
Type : command / arithmetic
Arguments : <entry1>
Returns : <entry1>*2
Description
multiplies top stack entry by 2
Command : 2/
Type : command / arithmetic
Arguments : <entry1>
Returns : <entry1> DIV 2
Description
divides to stack entry by 2
Command : 4+
Type : command / arithmetic
Arguments : <entry1>
Returns: <entry1>+4
Description
adds 4 to top stack entry
Command : 4-
Type : command / arithmetic
Arguments : <entry1>
Returns : <entry1>-4
Description
subtracts 4 from the top stack entry
Command : 4*
Type : command / arithmetic
Arguments : <entry1>
Returns : <entry1>*4
Description
multiplies to stack entry by 4
Command : 4/
Type : command / arithmetic
Arguments : <entry1>
Returns : <entry1> DIV 4
Description
divides top stack entry by 4
Command : +
Type : command / arithmetic
Arguments : <entry1> <entry2>
Returns : <entry1>+<entry2>
Description
adds top 2 stack entries and pushes the result
Command : -
Type : command / arithmetic
Arguments : <entry1> <entry2>
Returns : <entry2>-<entry1>
Description
subtracts top 2 stack entries and pushes result
Command : *
Type : command / arithmetic
Arguments : <entry1> <entry2>
Returns : <entry2>*<entry1>
Description
multiply produces a 32 bit result
Command : /
Type : command / arithmetic
Arguments : <entry1> <entry2>
Returns : <entry2>DIV<entry1> <entry2>MOD<entry1>
Description
divides 2nd entry by first and leaves DIV and MOD on stack
Command : abs
Type : command / arithmetic
Arguments : <entry1>
Returns : <entry1>
Description
if negative makes entry positive
Command : minus
Type : command / arithmetic
Arguments : <entry1>
Returns : -<entry1>
Description
changes sign of top stack entry
Command : min
Type : command / arithmetic
Arguments : <entry1> <entry2>
Returns : <entry>
Description
leaves the smaller of the 2 top entries on the stack
Command : max
Type : command / arithmetic
Arguments : <entry1> <entry2>
Returns : <entry>
Description
leaves the larger of the 2 top entries on the stack
Command : <<
Type : command / arithmetic
Arguments : <entry1> <entry2>
Returns : <entry>
Description
leaves <entry2> left shifted by <entry1> bits on the stack
Command : >>
Type : command / arithmetic
Arguments : <entry1> <entry2>
Returns : <entry>
Description
leaves <entry2> right shifted by <entry1> bits on the stack
Command : not
Type : command / logic
Arguments : <entry>
Returns : <entry>
Description
if top stack entry is not zero then push 1 else push 0
Command : and
Type : command / logic
Arguments : <entry1> <entry2>
Returns : <entry>
Description
replaces the top 2 stack entries by the bitwise AND of them.
Command : eor
Type : command / logic
Arguments : <entry1> <entry2>
Returns : <entry>
Description
replaces the top 2 stack entries by the bitwise EOR of them
Command : or
Type : command / logic
Arguments : <entry1> <entry2>
Returns : <entry>
Description
replaces the top 2 stack entries by the bitwise OR of them
Command : bic
Type : command / logic
Arguments : <entry1> <entry2>
Returns : <entry>
Description
clears bits in entry2 that are set in entry 1
Command : tst
Type : command / logic
Arguments : <entry1> <entry2>
Returns : <entry>
Description
if bit number <entry1> in entry2 is set then push 1 else push 0
Command : ror
Type : command / logic
Arguments : <entry1> <entry2>
Returns : <entry>
Description
rotate <entry2> by <entry1> bits right and push result onto stack.
Command : >
Type : command / control
Arguments : <entry1> <entry2>
Returns : <entry>
Description
if entry2 > entry1 then push 1 else push 0
Command: >=
Type : command / control
Arguments : <entry1> <entry2>
Returns : <entry>
Description
if entry2 >= entry1 then push 1 else push 0
Command : <
Type : command / control
Arguments : <entry1> <entry2>
Returns : <entry>
Description
if entry2 < entry1 then push 1 else push 0
Command : <=
Type : command / control
Arguments : <entry1> <entry2>
Returns : <entry>
Description
if entry2 <= entry1 then push 1 else push 0
Command : =
Type : command / control
Arguments : <entry1> <entry2>
Returns : <entry>
Description
if entry2 = entry1 then push 1 else push 0
Command : <>
Type : command / control
Arguments : <entry1> <entry2>
Returns : <entry>
Description
if entry2 <> entry1 then push 1 else push 0
Command : 0=
Type : command / control
Arguments : <entry1>
Returns : <entry>
Description
if entry1 = 0 then push 1 else push 0
Command : 0<
Type : command / control
Arguments : <entry1>
Returns : <entry>
Description
if entry1 < 0 then push 1 else push 0
Command : 0>
Type : command / control
Arguments : <entry1>
Returns : <entry>
Description
if entry1 > 0 then push 1 else push 0
Command : execute
Type : command
Arguments : <entry>
Returns :
Description
pops the top stack entry and will execute the ARMFORTH code at that address.
Command : abort
Type : system control
Arguments :
Returns :
Description
restarts the interpreter after a fault
Command : bin
Type : command
Arguments :
Returns :
Description
selects binary display mode
Command : oct
Type : command
Arguments :
Returns :
Description
selects octal display mode
Command : dec
Type : command
Arguments :
Returns :
Description
selects decimal display mode
Command : hex
Type : command
Arguments :
Returns :
Description
selects hex display mode
Command : entry
Type : command
Arguments :
Returns : <entry>
Description
pushes the address of the first header word in the latest entry in the
CURRENT vocabulary.
Command : here
Type : command
Arguments :
Returns : <entry>
Description
pushes the address of the next free dictionary location onto the data stack.
Command : ca!
Type : command
Arguments : <entry>
Returns :
Description
Stores the top stack entry in the word address location of the latest
entry in the CURRENT vocabulary.
Command : aspace
Type : command
Arguments :
Returns : 32
Description
pushes the ascii value of a space ( 32 ) onto the data stack.
Command : ,
Type : command
Arguments : <entry>
Returns :
Description
encloses the top data stack entry in the dictionary and advances the
dictionary pointer by 1 word.
Command : c,
Type : command
Arguments : <entry>
Returns :
Description
encloses the lowest byte of the top data stack entry in the dictionary
and moves the dictionary pointer forward by 1. CARE IS RECOMMENDED !!!
Command : buffer
Type : system variable
Arguments :
Returns : <address of the input buffer>
Description
used to get characters from the input buffer
Command : !
Type : command / memory
Arguments : <entry1> <entry2>
Returns :
Description
puts the word entry2 in the address entry1
Command : c!
Type : command / memory
Arguments : <entry1> <entry2>
Returns :
Description
puts the lsb of the word entry2 into the address entry1
Command : +!
Type : command / memory
Arguments : <entry1> <entry2>
Returns :
Description
adds entry2 to the value at address entry1
Command : c+!
Type : command / memory
Arguments : <entry1> <entry2>
Returns :
Description
adds the lsb of entry2 to the byte at address entry1
Command : 0set
Type : command / memory
Arguments : <entry1>
Returns :
Description
zeros the word at address entry1
Command : 1set
Type : command / memory
Arguments : <entry1>
Returns :
Description
sets the word at address entry1 to 1
Command : c0set
Type : command / memory
Arguments : <entry1>
Returns :
Description
sets the byte at address entry1 to zero
Command : c1set
Type : command / memory
Arguments : <entry1>
Returns :
Description
sets the byte at address entry1 to 1
Command : @
Type : command / memory
Arguments : <entry1>
Returns : <entry>
Description
pushes the word at address entry1 onto the data stack
Command : c@
Type : command / memory
Arguments : <entry1>
Returns : <entry>
Description
pushes the byte ( expanded to 32 bits ) at address entry1 onto the data stack
Command : align
Type : command / memory
Arguments : <entry1>
Returns : <entry>
Description
replaces entry1 with the nearest value rounded up to a word boundary
Example : dec 5 align . - would display 8
Command : over
Type : command / stack
Arguments : <entry1> <entry2>
Returns : <entry2> <entry1> <entry2>
Description
over pushes the second stack entry onto the data stack
Command : 2over
Type : command / stack
Arguments : <entry1> <entry2> <entry3>
Returns : <entry3> <entry1> <entry2> <entry3>
Description
2over pushes the third stack entry onto the data stack.
Command : swap
Type : command / stack
Arguments : <entry1> <entry2>
Returns : <entry2> <entry1>
Description
swaps the top 2 stack entries
Command : 2swap
Type : command / stack
Arguments : <entry1> <entry2> <entry3>
Returns : <entry3> <entry2> <entry1>
Description
swaps the first and third stack entries.
Command : dup
Type : command / stack
Arguments :
Returns : <entry1> <entry1>
Description
pushes the top stack entry onto the stack.
Command : drop
Type : command / stack
Arguments : <entry1> <entry2>
Returns : <entry2>
Description
pops the top stack entry.
Command: 2dup
Type : command / stack
Arguments : <entry1>
Returns : <entry1> <entry1> <entry1>
Description
duplicates the top stack entry twice.
Command : ?rs
Type : command / stack
Arguments :
Returns : <entry>
Description
pushes the value of the current return stack pointer,
Command : ?sp
Type : command / stack
Arguments :
Returns : <entry>
Description
pushes the value of the data stack pointer prior to the push onto that
data stack.
Command : i
Type : compile / loop index
Arguments :
Returns : <entry>
Description
pushes the value of the inner most loop index onto the data stack.
Command : j
Type : compile / loop index
Arguments :
Returns : <entry>
Description
pushes the value of the 2nd inner most loop index onto the data stack.
Command : k
Type : compile / loop
Arguments :
Returns : <entry>
Description
pushes the value of the 3rd inner most loop index onto the data stack.
Command : -sp
Type : command / stack
Arguments : < entry1>
Returns :
Description
this command will reduce the depth of the stack by <entry1> bytes. CARE
is recommended.... always leave SP on a word boundary. YOU HAVE BEEN
WARNED
Command : +sp
Type : command / stack
Arguments : <entry1>
Returns :
Description
this command will effectively push <entry1> bytes onto the stack
although no actual valid data will be present. Used mainly for
reserving stack space. CARE: always ensure that the stack remains on a
word boundary when you have finished. YOU HAVE BEEN WARNED.
Command : rrot
Type : command / stack
Arguments : <entry1> <entry2> <entry3>
Returns : <entry2> <entry3> <entry1>
Description
rotates the top three stack entries once to the right.
Example : 1 2 3 rrot . . . gives 2 1 3
Command : lrot
Type : command / stack
Arguments : <entry1> <entry2> <entry3>
Returns : <entry3> <entry1> <entry2>
Description
rotates the top 3 stack entries to the left by one slot.
Example : 1 2 3 lrot . . . gives 1 3 2
Command : rs>ds
Type : command / inter-stack
Arguments :
Returns : <top entry from return stack>
Description
pops the top entry from the return stack and pushes it onto the data
stack. CARE is recommended as popping a return address without careful
consideration will result in the forth interpreter crashing. YOU HAVE
BEEN WARNED
Command : ds>rs
Type : command / inter-stack
Arguments: <entry>
Returns :
Description
pops <entry> from the data stack and pushes it onto the return stack.
CARE is recommended here as a ds>rs without an rs>ds will destroy the
return stack and could kill forth. YOU HAVE BEEN WARNED
Command : .
Type : command / IO
Arguments : <entry1>
Returns :
Description
displays the top stack entry in the currently selected base.
Command : .r
Type : command / IO
Arguments <entry1> <entry2>
Returns :
Description
displays the <entry2> in a field width of <entry1>
Command : cr
Type : command / IO
Arguments :
Returns :
Description
echoes a CR/LF to the screen.
Command : inkey
Type : command / IO
Arguments :
Returns : <status> [<key number>]
Description
inkey waits .01 of a second for a key to be pressed, if no key is
pressed it pushes a 0 otherwise it pushes the key and 1.
Command : get
Type : command / IO
Arguments :
Returns : <char>
Description
get waits indefinitely until a key is pressed and then it pushes the
ascii value of the key onto the stack.
Command : space
Type : command / IO
Arguments :
Returns :
Description
prints a space to the screen.
Command : echo
Type : command / IO
Arguments : <ascii code>
Returns :
Description
pops the stack and echoes the lsb of the word to the display.
Command : cls
Type : command / IO
Arguments :
Returns :
Description
clears the screen. It is a more efficient version of 12 echo.
Command : pos
Type : command / IO
Arguments :
Returns : <ypos> <xpos>
Description
pushes the current position (x,y) of the text cursor onto the stack.
Command : tab
Type : command / IO
Arguments : <ypos> <xpos>
Returns :
Description
moves the text cursor to position (xpos,ypos) on the screen.
Command : malloc
Type : command / memory
Arguments : <size>
Returns : <status> [ <address> ]
Description
malloc will try to allocate a space of <size> bytes, if unsuccessful
<status> will be 0 else <status> will be 1 and <address> will be the
address of the allocated block.
Command : free
Type : command / memory
Arguments : <address>
Returns :
Description
free will deallocate the block pointed to be <address>. No error will
be reported if it is unsuccessful.
Command : ?
Type : command / IO
Arguments : <entry>
Returns :
Description
this command will display the word at the address pointed to by <entry>
in the current number base on the display.
Command : c?
Type : command / IO
Arguments :
Returns :
Description
this command will display the byte at the address pointed to by <entry>
in the current number base on the display.
Command : forget
Type : dictionary management
Arguments :
Returns :
Description
Searches the current vocabulary for the keyword following the forget and
will remove all keyword from that point forwards. It is to forget
priority to completely erase the ARMFORTH dictionary.
Command : '
Type : command / vocabulary
Arguments :
Returns : [<entry>]
Description
scans the token following the tick in the input buffer and searches the
CURRENT and CONTEXT vocabularies. If the word is found its execution
address is pushed to the stack otherwise the keyword followed by a
question mark will be displayed.
Command : definitions
Type : command / vocabulary
Arguments :
Returns :
Description
sets the system variable CURRENT to the value in CONTEXT.
Command : create
Type : defining word
Arguments :
Returns :
Description
creates a dictionary header for the primitive keyword whose name follows
create and links it to the vocabulary.
Command : :
Type : compiling word
Arguments :
Returns :
Description
creates a token for the keyword following the : in the buffer, links it
to the current vocabulary and sets the system in compile mode.
Command : next
Type : compiling word
Arguments :
Returns :
Description
encloses a jump to the inner interpreter NEXT routine in the dictionary.
Command : constant
Type : defining word
Arguments : <entry>
Returns :
Description
creates a word length constant dictionary entry whose value is the top
stack entry and whose name follows the constant keyword. When the
keyword name is executed the value of the constant will be pushed to the
data stack.
Command : variable
Arguments : <entry>
Returns :
Description
creates a word length variable entry whose value is the top stack entry
and whose name follows the constant keyword. When the keyword name is
executed the address of the keyword is pushed to the stack.
Command : immediate
Type : vocabulary management
Arguments :
Returns :
Description
delinks the last keyword from the CURRENT vocabulary and links it to the
COMPILER vocabulary. Adds keywords to the compiler vocabulary.
Command : <builds
Type : defining word
Arguments :
Returns :
Description
creates a CONSTANT keyword definition with an initial value of 0. The
name is the token following <builds in the input buffer. MUST be