Writing FCode 3.x Programs
  Sök endast i den här boken
Ladda ner denna bok i PDF

FCode Reference

A

FCode Primitives

This appendix contains three lists:
  • FCodes sorted according to functional group
  • FCodes sorted by byte value
  • FCodes sorted alphabetically by name

FCodes by Function

The following tables describe FCodes currently supported by OpenBoot. Both the FCode token values and Forth names are included. A token value entry of CR indicates a tokenizer-generated sequence, while - indicates that no FCode is generated.
Table A-1
ValueFunctionStackDescription
51depth( -- u )How many items on stack?
46drop( x -- )Removes x from the stack
522drop( x1 x2 -- )Removes 2 items from stack
CR3drop( x1 x2 x3 -- )Removes 3 items from stack
47dup( x -- x x )Duplicates x
532dup( x1 x2 -- x1 x2 x1 x2 )Duplicates 2 stack items
Table A-1 (Continued)
ValueFunctionStackDescription
CR3dup( x1 x2 x3 -- x1 x2 x3 x1 x2 x3 )Copies top 3 stack items
50?dup( x -- 0 | x x)Duplicates x if it is non-zero
4Dnip( x1 x2 -- x2 )Discards the second stack item
48over( x1 x2 -- x1 x2 x1 )Copies second stack item to top of stack
542over( x1 x2 x3 x4 -- x1 x2 x3 x4 x1 x2 )Copies 2 stack items
4Epick( xu ... x1 x0 u -- xu ... x1 x0 xu )Copies u-th stack item
30>r( x -- ) ( R: -- x)Moves a stack item to the return stack
31r>( -- x ) ( R: x -- )Moves item from return stack to data stack
32r@( -- x ) ( R: x -- x )Copies the top of the return stack to the data stack
4Froll( xu ... x1 x0 u -- xu-1 ... x1 x0 xu )Rotates u stack items
4Arot( x1 x2 x3 -- x2 x3 x1 )Rotates 3 stack items
4B-rot( x1 x2 x3 -- x3 x1 x2 )Shuffles top 3 stack items
562rot( x1 x2 x3 x4 x5 x6 -- x3 x4 x5 x6 x1 x2 )Rotates 3 pairs of stack items
49swap( x1 x2 -- x2 x1 )Exchanges the top 2 stack items
552swap( x1 x2 x3 x4 -- x3 x4 x1 x2 )Exchanges 2 pairs of stack items
4Ctuck( x1 x2 -- x2 x1 x2 )Copies the top stack item below the second item
Table A-2
ValueFunctionStackDescription
20*( nu1 nu2 -- prod )Multiplies nu1 times nu2
1E+( nu1 nu2 -- sum )Adds nu1+nu2
1F-( nu1 nu2 -- diff )Subtracts nu1-nx2
21/( n1 n2 -- quot )Divides n1/n2
CR1+( nu1 -- nu2 )Adds one
CR1-( nu1 -- nu2 )Subtracts one
CR2+( nu1 -- nu2 )Adds 2
CR2-( nu1 -- nu2 )Subtracts 2
592*( x1 -- x2 )Multiplies by 2
572/( x1 -- x2 )Divides by 2
27lshift( x1 u -- x2 )Left shifts x1 by u places
Table A-2 (Continued)
ValueFunctionStackDescription
28rshift( x1 u -- x2 )Right shifts x1 by u places
CR<<a( n1 u -- n2 )Arithmetic left shifts (same as lshift)
29>>a( x1 u -- x2 )Arithmetic right shifts n1 by u places
2Dabs( n -- u )Absolute value
AEaligned( n1 -- n1|a-addr )Adjusts an address to a machine word boundary
23and( x1 x2 -- x3 )Logical and
ACbounds( n cnt -- n+cnt n )Converts start,len to end,start for do loop
2Fmax( n1 n2 -- n1|n2 )n3 is maximum of n1 and n2
2Emin( n1 n2 -- n1|n2 )n3 is minimum of n1 and n2
22mod( n1 n2 -- rem )Remainder of n1/n2
CR*/mod( n1 n2 n3 -- rem quot )Remainder, quotient of n1*n2/n3
2A/mod( n1 n2 -- rem quot )Remainder, quotient of n1/n2
2Cnegate( n1 -- n2 )Changes the sign of n1
26invert( x1 -- x2 )One's complement
CRnot( x1 -- x2 )Synonym for invert
24or( x1 x2 -- x3 )Logical or
2Bu/mod( u1 u2 -- urem uquot )Unsigned 32-bit divide of u1/u2
58u2/( x1 -- x2 )Logical right shifts 1 bit
25xor( x1 x2 -- x3 )Exclusive or
D4um*( u1 u2 -- ud.prod )Multiplies two unsigned quadlets, yields an unsigned 64-bit product.
D5um/mod( ud u -- urem uquot )Divides an unsigned 64-bit number by an unsigned quadlet, yields a 32-bit remainder and quotient
D8d+( d1 d2 --d.sum )Adds two 64-bit numbers
D9d-( d1 d2 -- d.diff )Subtracts two 64-bit numbers
Table A-3
ValueFunctionStackDescription
72!( x a-addr -- )Stores a number into the variable at a-addr
6C+!( nu a-addr -- )Adds nu to the number stored in the variable at a-addr
772!( x1 x2 a-addr -- )Stores 2 numbers at a-addr; x2 at lower address
762@( a-addr -- x1 x2 )Fetches 2 numbers from a-addr; x2 from lower address
6D@( a-addr -- x )Fetches a number from the variable at a-addr
CR?( a-addr -- )Displays the number at a-addr
75c!( byte addr -- )Stores low byte of n at addr
71c@( addr -- byte )Fetches a byte from addr
CRblank( addr len -- )Sets len bytes of memory to ASCII space, starting at addr
7Acomp( addr1 addr2 len -- n )Compares two byte arrays including case. n=0 if same
CRerase( addr len -- )Sets len bytes of memory to zero, starting at addr
79fill( addr len byte -- )Sets len bytes of memory to value byte
0228lbflips( qaddr len -- )Reverses bytes within each quadlet in given region
0237lwflips( qaddr len -- )Exchanges doublets within quadlets in qaddr len
73l!( quad qaddr -- )Stores the quadlet at qaddr, must be 32-bit aligned
6El@( qaddr -- quad )Fetches the quadlet at qaddr, must be 32-bit aligned
78move( src-addr dest-addr len -- )Copies len bytes from src-addr to dest-addr, handles overlap correctly.
6Boff( a-addr -- )Stores false (32-bit 0) at a-addr
6Aon( a-addr -- )Stores true (32-bit -1) at a-addr
0236wbflips( waddr len -- )Exchanges bytes within doublets in the specified region
74w!( w waddr -- )Stores a doublet at waddr, must be 16-bit aligned
6Fw@( waddr -- w )Fetches the unsigned doublet at waddr, must be 16-bit aligned
70<w@( waddr -- n )Fetches the signed doublet at waddr, must be 16-bit aligned
Table A-4
ValueFunctionStackDescription
0230rb@( addr -- byte )Reads the 8-bit value at the given address, atomically
0231rb!( byte addr -- )Writes the 8-bit value at the given address, atomically
0232rw@( waddr -- w )Reads the doublet at the given address, atomically
0233rw!( w waddr -- )Writes the doublet at the given address, atomically
0234rl@( qaddr -- quad )Reads the quadlet at the given address, atomically
0235rl!( quad qaddr -- )Writes the quadlet at the given address, atomically
Table A-5
ValueFunctionStackDescription
0220cpeek( addr -- false | byte true )Reads 8-bit value at given address, returns false if unsuccessful
0221wpeek( waddr -- false | w true )Reads doublet at given address, returns false if unsuccessful
0222lpeek( qaddr -- false | quad true )Reads quadlet at given address, returns false if unsuccessful
0223cpoke( byte addr -- okay? )Writes 8-bit value at given address, returns false if unsuccessful
0224wpoke( w waddr -- okay? )Writes doublet at given address, returns false if unsuccessful
0225lpoke( quad qaddr -- okay? )Writes quadlet at given address, returns false if unsuccessful
Table A-6
ValueFunctionStackDescription
360<( n -- less-than-0? )True if n < 0
370<=( n -- less-or-equal-to-0? )True if n <= 0
350<>( n -- not-equal-to-0? )True if n <> 0
340=( nulflag -- equal-to-0? )True if n = 0, also inverts any flag
380>( n -- greater-than-0? )True if n > 0
390>=( n -- greater-or-equal-to-0? )True if n >= 0
3A<( n1 n2 -- less? )True if n1 < n2
43<=( n1 n2 -- less-or-equal? )True if n1 <= n2
3D<>( x1 x2 -- not-equal? )True if x1 <> x2
Table A-6 (Continued)
ValueFunctionStackDescription
3C=( x1 x2 -- equal? )True if x1 = x2
3B>( n1 n2 -- greater? )True if n1 > n2
42>=( n1 n2 -- greater-or-equal? )True if n1 >= n2
44between( n min max -- min<=n<=max? )True if min <= n <= max
CRfalse( -- false )The value false
CRtrue( -- true )The value true
40u<( u1 u2 -- unsigned-less? )True if u1 < u2, unsigned
3Fu<=( u1 u2 -- unsigned-less-or-equal? )True if u1 <= u2, unsigned
3Eu>( u1 u2 -- unsigned-greater? )True if u1 > u2, unsigned
41u>=( u1 u2 -- unsigned-greater-or-equal? )True if u1 >= u2, unsigned
45within( n min max -- min<=n<max? )True if min <= n < max
Table A-7
ValueFunctionStackDescription
-(( [text<)> --)Begins a comment (ignored)
-\( -- )Ignore rest of line (comment)
CRascii( [text< >] -- char )ASCII value of next character
CRcontrol( [text< >] -- char )Interprets next character as ASCII control character
8Ekey( -- char )Reads a character from the keyboard
8Dkey?( -- pressed? )True if a key has been typed on the keyboard
CRaccept( addr len1 -- len2 )Gets an edited input line, stores it at addr
8Aexpect( addr len -- )Gets a line of edited input from the keyboard; stores it at addr
88span( -- a-addr )Variable containing the number of characters read by expect
Table A-8
ValueFunctionStackDescription
ABbell( -- 0x07 )The ASCII code for the bell character; decimal 7
A9bl( -- 0x20 )The ASCII code for the space character; decimal 32
AAbs( -- 0x08 )The ASCII code for the backspace character; decimal 8
CRcarret( -- 0x0D )The ASCII code for the carriage return character; decimal 13
CRlinefeed( -- 0x0A )The ASCII code for the linefeed character; decimal 10
CRnewline( -- n )The ASCII code for the newline character; decimal 10
Table A-9
ValueFunctionStackDescription
A4-1( -- -1 )Constant -1
A50( -- 0 )Constant 0
A61( -- 1 )Constant 1
A72( -- 2 )Constant 2
A83( -- 3 )Constant 3
CRd#( [number< >] -- n )Interprets next number in decimal
-decimal( -- )If outside definition, input text in decimal
CRh#( [number< >] -- n )Interprets next number in hexadecimal
-hex( -- )If outside definition, input text in hexadecimal
CRo#( [number< >] -- n )Interprets next number in octal
-octal( -- )If outside definition, input text in octal
Table A-10
ValueFunctionStackDescription
99u#( u1 -- u2 )Converts a digit in pictured numeric output
97u#>( u -- str len )Ends pictured numeric output
96<#( -- )Initializes pictured numeric output
C7#( ud1 -- ud2 )Converts a digit in pictured numeric output conversion
Table A-10 (Continued)
ValueFunctionStackDescription
C9#>( ud -- str len )Ends pictured numeric output conversion
A0base( -- a-addr )Variable containing number base
A3digit( char base -- digit true | char false )Converts a character to a digit
95hold( char -- )Inserts the char in the pictured numeric output string
C8#s( ud -- 0 0 )Converts remaining digits in pictured numeric output
9Au#s( u1 -- u2 )Converts rest of the digits in pictured numeric output
98sign( n -- )Sets sign of pictured output
A2$number( addr len -- true | n false )Converts a string to a number
Table A-11
ValueFunctionStackDescription
9D.( nu -- )Displays a number
CR.d( n -- )Displays number in decimal
CRdecimal( -- )If inside definition, output in decimal
CR.h( n -- )Displays number in hexadecimal
CRhex( -- )If inside definition, output in hexadecimal
CRoctal( -- )If inside definition, output in octal
9E.r( n size -- )Displays a number in a fixed width field
9F.s( ... -- ... )Displays the contents of the data stack
CRs.( n -- )Displays n as a signed number
9Bu.( u -- )Displays an unsigned number
9Cu.r( u size -- )Prints an unsigned number in a fixed width field
Table A-12
ValueFunctionStackDescription
CR.(( [text<)>] -- )Displays a string now
91(cr( -- )Outputs ASCII CR character; decimal 13
92cr( -- )Starts a new line of display output
Table A-12 (Continued)
ValueFunctionStackDescription
8Femit( char -- )Displays the character
CRspace( -- )Outputs a single space character
CRspaces( cnt -- )Outputs cnt spaces
90type( text-str text-len -- )Displays n characters
Table A-13
ValueFunctionStackDescription
94#line( -- a-addr )Variable holding the line number on the output device
93#out( -- a-addr )Variable holding the column number on the output device
Table A-14 begin
ValueFunctionStackDescription
CRagain( C: dest-sys -- )Ends begin...again (infinite) loop
CRbegin( C: -- dest-sys ) ( -- )Starts conditional loop
CRrepeat( C: orig-sys dest-sys -- ) ( -- )Returns to loop start
CRuntil( C: dest-sys -- ) ( done? -- )If true, exits begin...until loop
CRwhile( C: dest-sys -- orig-sys dest-sys ) ( continue? -- )If true, continues begin...while...repeat loop, else exits loop
Table A-15
ValueFunctionStackDescription
CRif( C: -- orig-sys ) ( do-next? -- )If true, executes next FCode(s)
CRelse( C: orig-sys1 -- orig-sys2 ) ( -- )(optional) Executes next FCode(s) if if failed
CRthen( C: orig-sys -- ) ( -- )Terminates if...else...then
Table A-16
ValueFunctionStackDescription
CRcase( C: -- case-sys) ( sel -- sel )Begins a case (multiple selection) statement
CRendcase( C: case-sys -- ) ( sel | <nothing> -- )Marks end of a case statement
CRof( C: case-sys1 -- case-sys2 of-sys ) ( sel of-val -- sel | <nothing> )Returns to loop start
CRendof( C: case-sys1 of-sys -- case-sys2 ) ( -- )If true, exits begin...until loop
Table A-17 do
ValueFunctionStackDescription
CRdo( C: -- dodest-sys ) ( limit start -- ) (R: -- sys )Loops, index start to end-1 inclusive
CR?do( C: -- dodest-sys ) ( limit start -- ) ( R: -- sys )Like do, but skips loop if end = start
19i( -- index ) ( R: sys -- sys )Returns current loop index value
1Aj( -- index ) ( R: sys -- sys )Returns value of next outer loop index
CRleave( -- ) ( R: sys -- )Exits do loop immediately
CR?leave( exit? -- ) ( R: sys -- )If flag is true, exits do loop
CRloop( C: dodest-sys -- ) ( -- ) ( R: sys1 -- <nothing> | sys2)Increments index, returns to do
CR+loop( C: dodest-sys -- ) ( delta -- ) ( R: sys1 -- <nothing> | sys2 )Increments by n, returns to do. If n<0, index start to end
89unloop( -- ) ( R: sys -- )Discards loop control parameters
Table A-18
ValueFunctionStackDescription
1Dexecute( ... xt -- ??? )Executes the word whose compilation address is on the stack
33exit( -- ) (R: sys -- )Returns from the current word
Table A-19
ValueFunctionStackDescription
CR"( [text<">< >] -- text-str text-len )Collects a string
CRs"( [text<">] -- test-str text-len )Gathers the immediately-following string
84count( pstr -- str len )Unpacks a packed string
82lcc( char1 -- char2 )Converts char to lower case
83pack( str len addr -- pstr )Makes a packed string from addr len, placing it at pstr
81upc( char1 -- char2 )Converts char to upper case
0240left-parse-
string
( str len char
-- R-str R-len L-str L-len )
Splits a string at the given delimiter (which is
discarded)
011Bparse-2int( str len -- val.lo val.hi )Converts a string into a physical address and space
Table A-20
ValueFunctionStackDescription
CR: (colon) name( -- )Begins colon definition
CR; (semicolon)( -- )Ends colon definition
-alias( E: ... -- ???)

( "new-name< >old-name< >" -- )

Creates newname with behavior of oldname
CRbuffer:( E: -- a-addr )
( len "new-name< >" -- )
Creates data array of size bytes
CRconstant( E: -- x ) ( x "new-name< >" -- )Creates a constant
CRcreate( E: -- a-addr ) ( "new-name< >" -- )Generic defining word
CRdefer( E: ... -- ??? ) ( "new-name< >" -- )Execution vector (change with is)
CRfield( E: addr -- addr+offset ) ( offset size "new-
name< >" -- offset+size )
Creates a named offset pointer
C0instance( -- )Declare a data type to be local
CRstruct( -- 0 )Initializes for field creation
CRvariable( E: -- a-addr ) ( "new-name< >"-- )Creates a data variable
CRvalue( E: -- x) ( x "new-name< >"-- )Creates named value-type variable (change with is)
Table A-21
ValueFunctionStackDescription
D3,( x -- )Places a number in the dictionary
D0c,( byte -- )Places a byte in the dictionary
ADhere( -- addr )Address of top of dictionary
D2l,( quad -- )Places a quadlet in the dictionary
D1w,( w -- )Places a doublet in the dictionary
CRallot( len -- )Allocates len bytes in the dictionary
CRto( param [old-name< >] -- )Changes value in a defer word or a value
DDcompile( -- )Compiles following command at run time
DCstate( -- a-addr )Variable containing true if in compilation state
Table A-22
ValueFunctionStackDescription
CR'( "old-name< >" -- xt )Finds the word (while executing)
CR['] name( -- xt )Finds word (while compiling)
CB$find( name-str name-len
-- xt true | name-str name-len false )
Finds a name in the dictionary
CDeval( ... str len -- ??? )Executes Forth commands within a string
CDevaluate( ... str len -- ??? )Interprets Forth text from the given string
Table A-23
ValueFunctionStackDescription
7Fbljoin( bl.lo b2 b3 b4.hi -- quad )Joins four bytes to form a quadlet
B0bwjoin( b.lo b.hi -- w )Joins two bytes to form a doublet
5A/c( -- n )Address increment for a byte; 1
-/c*( nu1 -- nu2 )Synonym for chars
66chars( nu1 -- nu2 )Multiplies by /c
5Eca+( addr1 index -- addr2 )Increments addr1 by index times /c
Table A-23 (Continued)
ValueFunctionStackDescription
CRca1+( addr1 -- addr2 )Synonym for chars+
62char+( addr1 -- addr2 )Increments addr1 by /c
80wbflip( w1 -- w2 )Swaps the bytes within a doublet
5C/l( -- n )Address increment for a quadlet;
68/l*( nu1 -- nu2 )Multiplies by /l
60la+( addr1 index -- addr2 )Increments addr1 by index times /l
64la1+( addr1 -- addr2 )Increments addr1 by /l
0227lbflip( quad1 -- quad2 )Reverses the bytes within a quadlet
7Elbsplit( quad -- b.lo b2 b3 b4.hi )Splits a quadlet into four bytes
7Elwflip( quad1 -- quad2 )Swaps the doublets within a quadlet
7Clwsplit( quad -- w1.lo w2.hi )Splits a quadlet into two doublets
5D/n( -- n )Address increment for a normal;
CR/n*( nu1 -- nu2 )Synonym for cells
69cells( nu1 -- nu2 )Multiplies by /n
61na+( addr1 index -- addr2 )Increments addr1 by index times /n
CRna1+( addr1 -- addr2 )Synonym for cell+
65cell+( addr1 -- addr2 )Increments addr1 by /n
5B/w( -- n )Address increment for a doublet;
67/w*( nu1 -- nu2 )Multiplies by /w
5Fwa+( addr1 index -- addr2 )Increments addr1 by index times /w
63wa1+( addr1 -- addr2 )Increments addr1 by /w
AFwbsplit( w -- b1.lo b2.hi )Splits a doublet into two bytes
7Dwljoin( w.lo w.hi -- quad )Joins two doublets to form a quadlet
Table A-24
ValueFunctionStack Description
02 2Erx@( oaddr -- o )Reads the 64-bit value at the given address, atomically
02 2Frx!( o oaddr -- )Writes the 64-bit value at the given address, atomically
02 41bxjoin ( b.lo b.2 b.3 b.4 b.5 b.6 b.7 b.hi -- o )
Table A-24 (Continued)
ValueFunctionStack Description
02 42<l@ ( qaddr -- n )Fetches a sign-extended quadlet at qaddr
02 43lxjoin( quad.lo quad.hi -- o )Joins two quadlets to form an octlet
02 44wxjoin ( w.lo w.2 w.3 w.hi -- o )Joins four doublets to form an octlet
02 45x, ( o -- )Places an octlet in the dictionary
02 46x@ ( oaddr -- o )Fetches the octlet at oaddr, must be 64-bit aligned
02 47x! ( o oaddr -- )Stores an octlet at oaddr, must be 64-bit aligned
02 48/x ( -- n )Address increment for an octlet; 8
02 49/x*
( nu1 -- nu2 )
02 4Axa+
(addr1 index -- addr2 )
Increments addr1 by index times /x
02 4Bxa1+
( addr1 -- addr2 )
Increments addr1 by /x
02 4Cxbflip
( oct1 -- oct2 )
Reverse bytes within octlet
02 4Dxbflips
( oaddr len -- )

Reverse bytes within each octlet in given region

02 4Exbsplit
( o -- b.lo b.2 b.3 b.4 b.5 b.6 b.7 b.hi )
Splits an octlet into 8 bytes
02 4Fxlflip
( oct1 -- oct2 )
Reverse quadlets within octlet
02 50xlflips
( oaddr len -- )

Reverse quadlets within each octlet in given region

02 51xlsplit
( o -- quad.lo quad.hi )
Splits an octlet into 2 quadlets
02 52xwflip
( oct1 -- oct2 )
Reverse doublets within octlet
02 53xwflips
( oaddr len -- )

Reverse doublets within each octlet in given region

02 54xwsplit
( o -- w.lo w.2 w.3 w.hi )
Splits an octlet into 4 doublets
Table A-25
ValueFunctionStackDescription
8Balloc-mem( len -- a-addr )Allocates nbytes of memory and returns its address
8Cfree-mem( a-addr len -- )Frees memory allocated by alloc-mem
Table A-26
ValueFunctionStackDescription
86>body( xt -- a-addr )Finds parameter field address from compilation address
85body>( a-addr -- xt )Finds compilation address from parameter field address
DAget-token( FCode# -- xt immediate? )Converts FCode Number to function execution token
DBset-token( xt immediate? FCode# -- )Assigns FCode Number to existing function
00end0( -- )Marks the end of FCode
FFend1( -- )Alternates form for end0 (not recommended)
CRfcode-version1( -- )Begins FCode program
023Ebyte-load( addr xt -- )Interprets FCode beginning at location addr
-fload( [filename<cr>] -- )Begins tokenizing filename
-headerless( -- )Creates new names with new-token (no name fields)
-headers( -- )Creates new names with named-token (default)
7Bnoop( -- )Does nothing
CCoffset16( -- )All further branches use 16-bit offsets (instead of 8-bit)
-tokenizer[( -- )Begins tokenizer program commands
-]tokenizer( -- )Ends tokenizer program commands
CRfcode-version2( -- )Begins 2.0 FCode program, compiles start1
-external( -- )Creates new names with external-token
Table A-27
ValueFunctionStackDescription
01-0F

First byte of a two byte FCode
10b(lit)( -- n ) ( F: /FCode-num32/ -- )Followed by 32-bit#. Compiled by numeric data
11b(')( -- xt ) ( F: /FCode#/ -- )Followed by a token (1 or 2-byte code) . Compiled by ['] or '
12b(")( -- str len )
( F: /FCode-string/ -- )
Followed by count byte, text. Compiled by " or ."
C3b(to)( x -- )Compiled by to
FDversion1( -- )Followed by reserved byte, checksum (2 bytes) , length (4 bytes). Compiled by fcode-version1, as the first FCode bytes
13bbranch( -- ) ( F: /FCode-offset/ -- )Followed by offset. Compiled by else or again
14b?branch( don't-branch? -- )
( F: /FCode-offset/ -- )
Followed by offset. Compiled by if or until
15b(loop)( -- ) ( F: /FCode-offset/ -- )Followed by offset. Compiled by loop
16b(+loop)( delta -- )
( F: /FCode-offset/ -- )
Followed by offset. Compiled by +loop
17b(do)( limit start -- )
( F: /FCode-offset/ -- )
Followed by offset. Compiled by do
18b(?do)( limit start -- )
( F: /FCode-offset/ -- )
Followed by offset. Compiled by ?do
1Bb(leave)( F: -- )Compiled by leave or ?leave
B1b(<mark)( F: -- )Compiled by begin
B2b(>resolve)( -- ) ( F: -- )Compiled by else or then
C4b(case)( sel -- sel ) ( F: -- )Compiled by case
C5b(endcase)( sel | <nothing> -- ) ( F: -- )Compiled by endcase
C6b(endof)( -- ) ( F: /FCode-offset/ -- )Compiled by endof
1Cb(of)( sel of-val -- sel | <nothing> ) (F: /FCode-offset/ -- )Followed by offset. Compiled by of
B5new-token( -- ) ( F: /FCode#/ -- )Followed by table#, code#, token-type. Compiled by any defining word. Headerless, not used normally.
B6named-token( -- )

( F: /FCode-string FCode#/ -- )

Followed by packed string (count,text), table#, code#, token-type. Compiled by any defining word (: value constant etc.)
Table A-27 (Continued)
ValueFunctionStackDescription
B7b(:)( E: ... -- ??? ) ( F: -- colon-sys )Token-type compiled by :
B8b(value)( E: -- x ) ( F: x -- )Token-type compiled by value
B9b(variable)( E: -- a-addr ) ( F: -- )Token-type compiled by variable
BAb(constant)( E: -- n ) ( F: n -- )Token-type compiled by constant
BBb(create)( E: -- a-addr ) ( F: -- )Token-type compiled by create
BCb(defer)( E: ... -- ??? ) ( F: -- )Token-type compiled by defer
BDb(buffer:)( E: -- a-addr ) ( F: size -- )Token-type compiled by buffer:
BEb(field)( E: addr -- addr+offset )
( F: offset size -- offset+size)
Token-type compiled by field
C2b(;)( -- ) ( F: colon-sys -- )End a colon definition. Compiled by ;
CAexternal-token( -- )

( F: /FCode-string FCode#/ -- )

Create a new named FCode function.
F0start0( -- )Like version1, but for version 2.0 FCodes. Uses 16-bit branches. Fetches successive tokens from same address
F1start1( -- )Like version1, but for version 2.0 FCodes. Uses 16-bit branches. Fetches successive tokens from consecutive addresses. Compiled by fcode-version2
F2start2( -- )Like version1, but for version 2.0 FCodes. Uses 16-bit branches. Fetches successive tokens from consecutive 16-bit addresses
F3start4( -- )Like version1, but for version 2.0 FCodes. Uses 16-bit branches. Fetches successive tokens from consecutive 32-bit addresses
Table A-28
ValueFunctionStackDescription
0105free-virtual( virt size -- )Frees virtual memory obtained using map-low.
0130map-low( phys-low .... size -- virt )Allocate virtual memory.
Table A-29
ValueFunctionStackDescription
0110property( prop-addr prop-len name-str name-len -- )Declares a property with the given value structure, for the given name string.
021Edelete-property( nam-str nam-len -- )Deletes the property with the given name
0115encode-bytes( data-addr data-len -- prop-addr prop-len )Converts a byte array into an prop-format string
0111encode-int( n -- prop-addr prop-len )Converts a number into an prop-format string
0113encode-phys( phys.lo ... phys.hi -- prop-addr prop-len )Converts physical address and space into an prop-format string
0114encode-string( str len -- prop-addr prop-len )Converts a string into an prop-format string
0112encode+( prop-addr1 prop-len1 prop-addr2 prop-len2
-- prop-addr3 prop-len3 )
Merges two prop-format strings.
They must have been created
sequentially
CRdecode-bytes( prop-addr1 prop-len1 data-len --
prop-addr2 prop-len2 data-addr data-len )
Decodes a byte array from a prop-
encoded-array
021Bdecode-int( prop-addr1 prop-len1
-- prop-addr2 prop-len2 n )
Converts the beginning of an prop-
format string to an integer
021Cdecode-string( prop-addr1 prop-len1
-- prop-addr2 prop-len2 str len )
Converts the beginning of a prop-
format string to a normal string
0128decode-phys( prop-addr1 prop-len1 --
prop-addr2 prop-len2 phys.lo ... phys.hi )
Decode a unit-address from a prop-
encoded array
021Aget-my-property( nam-str nam-len
-- true | prop-addr prop-len false )
Returns the prop-format string for
the given property name
021Dget-inherited-
property
( nam-str nam-len
-- true | prop-addr prop-len false )
Returns the value string for the
given property, searches parents'
properties if not found
021Fget-package-property( name-str name-len phandle -- true | prop-addr prop-len false )Returns the prop-format string for the given property name in the package phandle
Table A-30
ValueFunctionStackDescription
0116reg( phys.lo ... phys.hi size -- )Declares location and size of device registers
0119model( str len -- )Declares model# for this device, such as " SUNW,501-1623-01"
011Adevice-type( str len -- )Declares type of device, e.g. " display", " block", " network", or " byte"
CRname( addr len -- )Declares SunOS driver name, as in " SUNW,zebra"
0201device-name( str len -- )Creates the "name" property with the given value
Table A-31
ValueFunctionStackDescription
87fcode-revision( -- n )Returns major/minor FCode interface version
Table A-32
ValueFunctionStackDescription
011Cis-install( xt -- )Identifies "install" routine to allocate a frame buffer
011Dis-remove( xt -- )Identifies "remove" routine, to deallocate a frame buffer
011Eis-selftest( xt -- )Identifies "selftest" routine for this frame buffer
011Fnew-device( -- )Opens an additional device, using this driver package
0127finish-device( -- )Closes out current device, ready for new-device
Table A-33
ValueFunctionStackDescription
0120diagnostic-mode?( -- diag? )Returns "true" if extended diagnostics are desired
0121display-status( n -- )Obsolete
0122memory-test-suite( addr len -- fail? )Calls memory tester for given region
0124mask( -- a-addr )Variable, holds "mask" used by memory-test-suite
Table A-34
ValueFunctionStackDescription
0125get-msecs( -- n )Returns the current time, in milliseconds, approx.
0126ms( n -- )Delays for n milliseconds. Resolution is 1 millisecond
0213alarm( xt n -- )Periodically execute xt. If n=0, stop.
Table A-35
ValueFunctionStackDescription
0130map-low( phys.lo ... size -- virt )Maps a region of memory in 'sbus' address space
0131sbus-intr>cpu( sbus-intr# -- cpu-intr# )Translates SBus interrupt# into CPU interrupt#

Note - Table A-36 through Table A-42 apply only to display device-types.

Table A-36
ValueFunctionStackDescription
0150#lines( -- rows )Number of lines of text being used for display. This word must be initialized (using is). fbx-install does this automatically, and also properly incorporates the NVRAM parameter "screen-#rows"
0151#columns( -- columns )Number of columns (chars/line) used for display. This word must be initialized (using is). fbx-install does this automatically, and also properly incorporates the NVRAM parameter "screen-#columns"
Table A-37
ValueFunctionStackDescription
0152line#( -- line# )Current cursor position (line#). 0 is top line
0153column#( -- column# )Current cursor position. 0 is left char.
0154inverse?( -- white-on-black? )True if output is inverted (white-on-black)
0155inverse-screen?( -- black? )True if screen has been inverted (black background)
Table A-38
ValueFunctionStackDescription
0157draw-character( char -- )Paints the given character and advances the cursor
0158reset-screen( -- )Initializes the display device
0159toggle-cursor( -- )Draws or erase the cursor
015Aerase-screen( -- )Clears all pixels on the display
015Bblink-screen( -- )Flashes the display momentarily
015Cinvert-screen( -- )Changes all pixels to the opposite color
015Dinsert-characters( n -- )Inserts n blanks just before the cursor
015Edelete-characters( n -- )Deletes n characters to the right of the cursor Remaining chars slide left
015Finsert-lines( n -- )Inserts n blank lines just before the current line, lower
lines are scrolled downward
0160delete-lines( n -- )Deletes n lines starting with the current line, lower
lines are scrolled upward
0161draw-logo( line# addr width height -- )Draws the logo
*defer-type loadable routines.

Table A-39
ValueFunctionStackDescription
016Cchar-height( -- height )Height (in pixels) of a character (usually 22)
016Dchar-width( -- width )Width (in pixels) of a character (usually 12)
016Ffontbytes( -- bytes )Number of bytes/scan line for font entries (usually 2)
0162frame-buffer-adr( -- addr )Address of frame buffer memory
0163screen-height( -- height )Total height of the display (in pixels)
0164screen-width( -- width )Total width of the display (in pixels)
0165window-top( -- border-height )Distance (in pixels) between display top and text window
0166window-left( -- border-width )Distance (in pixels) between display left edge and text window left edge
*These must all be initialized befor
e using any fbx- routines.
Table A-40
ValueFunctionStackDescription
016Adefault-font( -- addr width height advance min- char #glyphs )Returns default font values, plugs directly into set-font
016Bset-font( addr width height advance min-char #glyphs -- )Sets the character font for text output
016E>font( char -- addr )Returns font address for given ASCII character
Table A-41
ValueFunctionStackDescription
0170fb1-draw-character( char -- )Paints the character and advance the cursor
0171fb1-reset-screen( -- )Initializes the display device (noop)
0172fb1-toggle-cursor( -- )Draws or erases the cursor
0173fb1-erase-screen( -- )Clears all pixels on the display
0174fb1-blink-screen( -- )Inverts the screen, twice (slow)
0175fb1-invert-screen( -- )Changes all pixels to the opposite color
0176fb1-insert-characters( n -- )Inserts n blanks just before the cursor
0177fb1-delete-characters( n -- )Deletes n characters, starting at with cursor character, rightward. Remaining chars slide left
0178fb1-insert-lines( n -- )Inserts n blank lines just before the current line,
lower lines are scrolled downward
0179fb1-delete-lines( n -- )Deletes n lines starting with the current line,lower
lines are scrolled upward
017Afb1-draw-logo( line# addr width height -- )Draws the logo
017Bfb1-install( width height #columns #lines -- )Installs the one-bit built-in routines
017Cfb1-slide-up( n -- )Like fb1-delete-lines, but doesn't clear lines at bottom
Table A-42
ValueFunctionStackDescription
0180fb8-draw-character( char -- )Paints the character and advance the cursor
0181fb8-reset-screen( -- )Initializes the display device (noop)
0182fb8-toggle-cursor( -- )Draws or erases the cursor
0183fb8-erase-screen( -- )Clears all pixels on the display
0184fb8-blink-screen( -- )Inverts the screen, twice (slow)
0185fb8-invert-screen( -- )Changes all pixels to the opposite color
0186fb8-insert-characters( n -- )Inserts n blanks just before the cursor
0187fb8-delete-
characters
( n -- )Deletes n characters starting with cursor char,
rightward. Remaining chars slide left
0188fb8-insert-lines( n -- )Inserts n blank lines just before the current line, lower lines are scrolled downward
0189fb8-delete-
lines
( n -- )Deletes n lines starting with the current line,
lower lines are scrolled upward
018Afb8-draw-logo( line# addr width height -- )Draws the logo
018Bfb8-install( width height #columns #lines -- )Installs the eight-bit built-in routines
Table A-43
ValueFunctionStackDescription
023Cpeer( phandle -- phandle.sibling )Returns phandle of package that is the next
child of the the parent of the package
023Bchild( phandle.parent -- phandle.child )Returns phandle of the package that is the first child of the package parent-phandle
0204find-package( name-str name-len -- false | phandle true )Finds a package named "name-str"
Table A-43 (Continued)
ValueFunctionStackDescription
0205open-package( arg-str arg-len phandle
-- ihandle | 0 )
Opens an instance of the package "phandle,"
passes arguments "arg-str arg-len"
020F$open-package( arg-str arg-len name-str name-len
-- ihandle | 0 )
Finds a package "name-str name-len" then
opens it with arguments "arg-str arg-len"
020Amy-parent( -- ihandle )Returns the ihandle of the parent of the
current package instance
0203my-self( -- ihandle )Returns the instance handle of currently-executing package instance
020Bihandle>phandle( ihandle -- phandle )Converts an ihandle to a phandle
0206close-package( ihandle -- )Closes an instance of a package
0207find-method( method-str method-len phandle -- false | xt true )Finds the method (command) named "method-str" in the package "phandle"
0208call-package( ... xt ihandle -- ??? )Executes the method "xt" in the instance "ihandle"
020E$call-method( ... method-str method-len ihandle -- ??? )Executes the method named "method-str" in the instance "ihandle"
0209$call-parent( ... method-str method-len -- ??? )Executes the method "method-str" in the parent's package
0202my-args( -- arg-str arg-len )Returns the argument str passed when this package was opened
020Dmy-unit( -- phys.lo ... phys.hi )Returns the physical unit number pair for this package
0102my-address( -- phys.lo ... )Returns the physical addr of this plug-in device. "phys" is a "magic" number, usable by other routines
0103my-space( -- phys.hi )Returns address space of plug-in device. "space" is a "magic" number, usable by other routines
Table A-44
ValueFunctionStackDescription
0213alarm( xt n -- )Executes method (command) indicated by "xt" every "n" milliseconds
0219user-
abort
( ... -- ) ( R: ... -- )Abort after alarm routine finishes execution

Table A-45
ValueFunctionStackDescription
0214(is-user-word)( E: ... -- ??? ) ( name-str name-len xt -- )Creates a new word called "name-str" which executes "xt"
01A4mac-address( -- mac-str mac-len )Returns the MAC address

Table A-46
ValueFunctionStackDescription
0215suspend-fcode( -- )Suspends execution of FCode, resumes later if an undefined command is required
Table A-47
ValueFunctionStackDescription
0216abort ( ... -- ) (R:... -- )Aborts FCode execution, returns to the "ok" prompt
0217catch ( ... xt -- ??? error-code | ??? false )Executes "xt," returns throw error code or 0 if throw not encountered
0218throw ( ... error-code -- ??? error-code | ...)Returns given error code to catch
FCferror( -- )Displays "Unimplemented FCode" and stops FCode interpretation

FCodes by Byte Value

The following table lists, in hexadecimal order, currently-assigned FCode byte values.
Table A-48
ValueFunctionStack
00end0( -- )
10b(lit)( -- n ) ( F: /FCode-num32/ -- )
11b(')( -- xt ) ( F: /FCode#/ -- )
12b(")( -- str len ) ( F: /FCode-string/ -- )
13bbranch( -- ) ( F: /FCode-offset/ -- )
14b?branch( don't-branch? -- ) ( F: /FCode-offset/ --)
15b(loop)( -- ) ( F: /FCode-offset/ -- )
16b(+loop)( delta -- ) ( F: /FCode-offset/ -- )
17b(do)( limit start -- ) ( F: /FCode-offset/ -- )
18b(?do)( limit start -- ) ( F: /FCode-offset/ -- )
19i( -- index ) ( R: sys -- sys )
1Aj( -- index ) ( R: sys -- sys )
1Bb(leave)( F: -- )
1Cb(of)( sel of-val -- sel | <nothing> ) ( F: /FCode-offset/ -- )
1Dexecute( ... xt -- ??? )
1E+( nu1 nu2 -- sum )
1F-( nu1 nu2 -- diff )
20*( nu1 nu2 -- prod )
21/( n1 n2 -- quot )
22mod( n1 n2 -- rem )
23and( x1 x2 -- x3 )
24or( x1 x2 -- x3 )
25xor( x1 x2 -- x3 )
26invert( x1 -- x2 )
27lshift( x1 u -- x2 )
28rshift( x1 u -- x2 )
29>>a( x1 u -- x2 )
Table A-48 (Continued)
ValueFunctionStack
2A/mod( n1 n2 -- rem quot )
2Bu/mod( u1 u2 -- urem uquot )
2Cnegate( n1 -- n2 )
2Dabs( n -- u )
2Emin( n1 n2 -- n1|n2 )
2Fmax( n1 n2 -- n1|n2 )
30>r( x -- ) ( R: -- x)
31r>( -- x ) ( R: x -- )
32r@( -- x ) ( R: x -- x )
33exit( -- ) (R: sys -- )
340=( nulflag -- equal-to-0? )
350<>( n -- not-equal-to-0? )
360<( n -- less-than-0? )
370<=( n -- less-or-equal-to-0? )
380>( n -- greater-than-0? )
390>=( n -- greater-or-equal-to-0? )
3A<( n1 n2 -- less? )
3B>( n1 n2 -- greater? )
3C=( x1 x2 -- equal? )
3D<>( x1 x2 -- not-equal? )
3Eu>( u1 u2 -- unsigned-greater? )
3Fu<=( u1 u2 -- unsigned-less-or-equal? )
40u<( u1 u2 -- unsigned-less? )
41u>=( u1 u2 -- unsigned-greater-or-equal? )
42>=( n1 n2 -- greater-or-equal? )
43<=( n1 n2 -- less-or-equal? )
44between( n min max -- min<=n<=max? )
45within( n min max -- min<=n<max? )
46drop( x -- )
47dup( x -- x x )
48over( x1 x2 -- x1 x2 x1 )
Table A-48 (Continued)
ValueFunctionStack
49swap( x1 x2 -- x2 x1 )
4Arot( x1 x2 x3 -- x2 x3 x1 )
4B-rot( x1 x2 x3 -- x3 x1 x2 )
4Ctuck( x1 x2 -- x2 x1 x2 )
4Dnip( x1 x2 -- x2 )
4Epick( xu ... x1 x0 u -- xu ... x1 x0 xu )
4Froll( xu ... x1 x0 u -- xu-1 ... x1 x0 xu )
50?dup( x -- 0 | x x)
51depth( -- u )
522drop( x1 x2 -- )
532dup( x1 x2 -- x1 x2 x1 x2 )
542over( x1 x2 x3 x4 -- x1 x2 x3 x4 x1 x2 )
552swap( x1 x2 x3 x4 -- x3 x4 x1 x2 )
562rot( x1 x2 x3 x4 x5 x6 -- x3 x4 x5 x6 x1 x2 )
572/( x1 -- x2 )
58u2/( x1 -- x2 )
592*( x1 -- x2 )
5A/c( -- n )
5B/w( -- n )
5C/l( -- n )
5D/n( -- n )
5Eca+( addr1 index -- addr2 )
5Fwa+( addr1 index -- addr2 )
60la+( addr1 index -- addr2 )
61na+( addr1 index -- addr2 )
62char+( addr1 -- addr2 )
63wa1+( addr1 -- addr2 )
64la1+( addr1 -- addr2 )
65cell+( addr1 -- addr2 )
66chars( nu1 -- nu2 )
67/w*( nu1 -- nu2 )
Table A-48 (Continued)
ValueFunctionStack
68/l*( nu1 -- nu2 )
69cells( nu1 -- nu2 )
6Aon( a-addr -- )
6Boff( a-addr -- )
6C+!( nu a-addr -- )
6D@( a-addr -- x )
6El@( qaddr -- quad )
6Fw@( waddr -- w )
70<w@( waddr -- n )
71c@( addr -- byte )
72!( x a-addr -- )
73l!( quad qaddr -- )
74w!( w waddr -- )
75c!( byte addr -- )
762@( a-addr -- x1 x2 )
772!( x1 x2 a-addr -- )
78move( src-addr dest-addr len -- )
79fill( addr len byte -- )
7Acomp( addr1 addr2 len -- n )
7Bnoop( -- )
7Clwsplit( quad -- w1.lo w2.hi )
7Dwljoin( w.lo w.hi -- quad )
7Elbsplit( quad -- b.lo b2 b3 b4.hi )
7Fbljoin( bl.lo b2 b3 b4.hi -- quad )
80wbflip( w1 -- w2 )
81upc( char1 -- char2 )
82lcc( char1 -- char2 )
83pack( str len addr -- pstr )
84count( pstr -- str len )
85body>( a-addr -- xt )
86>body( xt -- a-addr )
Table A-48 (Continued)
ValueFunctionStack
87fcode-revision( -- n )
88span( -- a-addr )
89unloop( -- ) ( R: sys -- )
8Aexpect( addr len -- )
8Balloc-mem( len -- a-addr )
8Cfree-mem( a-addr len -- )
8Dkey?( -- pressed? )
8Ekey( -- char )
8Femit( char -- )
90type( text-str text-len -- )
91(cr( -- )
92cr( -- )
93#out( -- a-addr )
94#line( -- a-addr )
95hold( char -- )
96<#( -- )
97u#>( u -- str len )
98sign( n -- )
99u#( u1 -- u2 )
9Au#s( u1 -- u2 )
9Bu.( u -- )
9Cu.r( u size -- )
9D.( nu -- )
9E.r( n size -- )
9F.s( ... -- ... )
A0base( -- a-addr )
A2$number( addr len -- true | n false )
A3digit( char base -- digit true | char false )
A4-1( -- -1 )
A50( -- 0 )
A61( -- 1 )
Table A-48 (Continued)
ValueFunctionStack
A72( -- 2 )
A83( -- 3 )
A9bl( -- 0x20 )
AAbs( -- 0x08 )
ABbell( -- 0x07 )
ACbounds( n cnt -- n+cnt n )
ADhere( -- addr )
AEaligned( n1 -- n1|a-addr )
AFwbsplit( w -- b1.lo b2.hi )
B0bwjoin( b.lo b.hi -- w )
B1b(<mark)( F: -- )
B2b(>resolve)( -- ) ( F: -- )
B5new-token( -- ) ( F: /FCode#/ -- )
B6named-token( -- ) ( F: /FCode-string FCode#/ -- )
B7b(:)( E: ... -- ??? ) ( F: -- colon-sys )
B8b(value)( E: -- x ) ( F: x -- )
B9b(variable)( E: -- a-addr ) ( F: -- )
BAb(constant)( E: -- n ) ( F: n -- )
BBb(create)( E: -- a-addr ) ( F: -- )
BCb(defer)( E: ... -- ??? ) ( F: -- )
BDb(buffer:)( E: -- a-addr ) ( F: size -- )
BEb(field)( E: addr -- addr+offset ) ( F: offset size -- offset+size )
C0instance( -- )
C2b(;)( -- ) ( F: colon-sys -- )
C3b(to)( x -- )
C4b(case)( sel -- sel ) ( F: -- )
C5b(endcase)( sel | <nothing> -- ) ( F: -- )
C6b(endof)( -- ) ( F: /FCode-offset/ -- )
C7#( ud1 -- ud2 )
C8#s( ud -- 0 0 )
C9#>( ud -- str len )
Table A-48 (Continued)
ValueFunctionStack
CAexternal-token( -- ) ( F: /FCode-string FCode#/ -- )
CB$find( name-str name-len -- xt true | name-str name-len false )
CCoffset16( -- )
CDevaluate( ... str len -- ??? )
D0c,( byte -- )
D1w,( w -- )
D2l,( quad -- )
D3,( x -- )
D4um*( u1 u2 -- ud.prod )
D5um/mod( ud u -- urem uquot )
D8d+( d1 d2 --d.sum )
D9d-( d1 d2 -- d.diff )
DAget-token( fcode# -- xt immediate? )
DBset-token( xt immediate? fcode# -- )
DCstate( -- a-addr )
DDcompile,( xt -- )
DEbehavior( defer-xt -- contents-xt )
F0start0( -- )
F1start1( -- )
F2start2( -- )
F3start4( -- )
FCferror( -- )
FDversion1( -- )
FFend1( -- )
0102my-address( -- phys.lo ... )
0103my-space( -- phys.hi )
0105free-virtual( virt size -- )
0110property( prop-addr prop-len name-str name-len -- )
0111encode-int( n -- prop-addr prop-len )
0112encode+( prop-addr1 prop-len1 prop-addr2 prop-len2 -- prop-addr3 prop-len3 )
0113encode-phys( phys.lo ... phys.hi -- prop-addr prop-len )
Table A-48 (Continued)
ValueFunctionStack
0114encode-string( str len -- prop-addr prop-len )
0115encode-bytes( data-addr data-len -- prop-addr prop-len )
0116reg( phys.lo ... phys.hi size -- )
0119model( str len -- )
011Adevice-type( str len -- )
011Bparse-2int( str len -- val.lo val.hi )
011Cis-install( xt -- )
011Dis-remove( xt -- )
011Eis-selftest( xt -- )
011Fnew-device( -- )
0120diagnostic-mode?( -- diag? )
0121display-status( n -- )
0122memory-test-suite( addr len -- fail? )
0124mask( -- a-addr )
0125get-msecs( -- n )
0126ms( n -- )
0127finish-device( -- )
0128decode-phys( prop-addr1 prop-len1 -- prop-addr2 prop-len2 phys.lo ... phys.hi )
0129push-package( phandle -- )
012Apop-package( -- )
012Binterpose( adr len phandle -- )
0130map-low( phys.lo ... size -- virt )
0131sbus-intr>cpu( sbus-intr# -- cpu-intr# )
0150#lines( -- rows )
0151#columns( -- columns )
0152line#( -- line# )
0153column#( -- column# )
0154inverse?( -- white-on-black? )
0155inverse-screen?( -- black? )
0157draw-character( char -- )
0158reset-screen( -- )
Table A-48 (Continued)
ValueFunctionStack
0159toggle-cursor( -- )
015Aerase-screen( -- )
015Bblink-screen( -- )
015Cinvert-screen( -- )
015Dinsert-characters( n -- )
015Edelete-characters( n -- )
015Finsert-lines( n -- )
0160delete-lines( n -- )
0161draw-logo( line# addr width height -- )
0162frame-buffer-adr( -- addr )
0163screen-height( -- height )
0164screen-width( -- width )
0165window-top( -- border-height )
0166window-left( -- border-width )
016Adefault-font( -- addr width height advance min-char #glyphs )
016Bset-font( addr width height advance min-char #glyphs -- )
016Cchar-height( -- height )
016Dchar-width( -- width )
016E>font( char -- addr )
016Ffontbytes( -- bytes )
0170fb1-draw-character( char -- )
0171fb1-reset-screen( -- )
0172fb1-toggle-cursor( -- )
0173fb1-erase-screen( -- )
0174fb1-blink-screen( -- )
0175fb1-invert-screen( -- )
0176fb1-insert-characters( n -- )
0177fb1-delete-characters( n -- )
0178fb1-insert-lines( n -- )
0179fb1-delete-lines( n -- )
017Afb1-draw-logo( line# addr width height -- )
Table A-48 (Continued)
ValueFunctionStack
017Bfb1-install( width height #columns #lines -- )
017Cfb1-slide-up( n -- )
0180fb8-draw-character( char -- )
0181fb8-reset-screen( -- )
0182fb8-toggle-cursor( -- )
0183fb8-erase-screen( -- )
0184fb8-blink-screen( -- )
0185fb8-invert-screen( -- )
0186fb8-insert-characters( n -- )
0187fb8-delete-characters( n -- )
0188fb8-insert-lines( n -- )
0189fb8-delete-lines( n -- )
018Afb8-draw-logo( line# addr width height -- )
018Bfb8-install( width height #columns #lines -- )
01A4mac-address( -- mac-str mac-len )
0201device-name( str len -- )
0202my-args( -- arg-str arg-len )
0203my-self( -- ihandle )
0204find-package( name-str name-len -- false | phandle true )
0205open-package( arg-str arg-len phandle -- ihandle | 0 )
0206close-package( ihandle -- )
0207find-method( method-str method-len phandle -- false | xt true )
0208call-package( ... xt ihandle -- ??? )
0209$call-parent( ... method-str method-len -- ??? )
020Amy-parent( -- ihandle )
020Bihandle>phandle( ihandle -- phandle )
020Dmy-unit( -- phys.lo ... phys.hi )
020E$call-method( ... method-str method-len ihandle -- ??? )
020F$open-package( arg-str arg-len name-str name-len -- ihandle | 0 )
0213alarm( xt n -- )
0214(is-user-word)( E: ... -- ??? ) ( name-str name-len xt -- )
Table A-48 (Continued)
ValueFunctionStack
0215suspend-fcode( -- )
0216abort( ... -- ) (R:... -- )
0217catch( ... xt -- ??? error-code | ??? false )
0218throw( ... error-code -- ??? error-code | ...)
0219user-abort( ... -- ) ( R: ... -- )
021Aget-my-property( nam-str nam-len -- true | prop-addr prop-len false )
021Bdecode-int( prop-addr1 prop-len1 -- prop-addr2 prop-len2 n )
021Cdecode-string( prop-addr1 prop-len1 -- prop-addr2 prop-len2 str len )
021Dget-inherited-property( nam-str nam-len -- true | prop-addr prop-len false )
021Edelete-property( nam-str nam-len -- )
021Fget-package-property( name-str name-len phandle -- true | prop-addr prop-len false )
0220cpeek( addr -- false | byte true )
0221wpeek( waddr -- false | w true )
0222lpeek( qaddr -- false | quad true )
0223cpoke( byte addr -- okay? )
0224wpoke( w waddr -- okay? )
0225lpoke( quad qaddr -- okay? )
0226lwflip( quad1 -- quad2 )
0227lbflip( quad1 -- quad2 )
0228lbflips( qaddr len -- )
0230rb@( addr -- byte )
0231rb!( byte addr -- )
0232rw@( waddr -- w )
0233rw!( w waddr -- )
0234rl@( qaddr -- quad )
0235rl!( quad qaddr -- )
0236wbflips( waddr len -- )
0237lwflips( qaddr len -- )
023Bchild( phandle.parent -- phandle.child )
023Cpeer( phandle -- phandle.sibling )
023Dnext-property( previous-str previous-len phandle -- false | name-str name-len true )
Table A-48 (Continued)
ValueFunctionStack
023Ebyte-load( addr xt -- )
023Fset-args( arg-str arg-len unit-str unit-len -- )
0240left-parse-string( str len char -- R-str R-len L-str L-len )
022Erx@( xaddr -- o )
022Frx!( o xaddr -- )
0241bxjoin( b.lo b.2 b.3 b.4 b.5 b.6 b.7 b.hi -- o )
0242<l@( qaddr -- n )
0243lxjoin( quad.lo quad.hi -- o )
0244wxjoin( w.lo w.2 w.3 w.hi -- o )
0245x,( o -- )
0246x@ ( xaddr -- o )
0247x! ( o xaddr -- )
0248/x ( -- n )
0249/x* ( nu1 -- nu2 )
024Axa+ ( addr1 index -- addr2 )
024Bxa1+ ( addr1 -- addr2 )
024Cxbflip ( oct1 -- oct2 )
024Dxbflips( xaddr len -- )
024Exbsplit ( o -- b.lo b.2 b.3 b.4 b.5 b.6 b.7 b.hi )
024Fxlflip ( oct1 -- oct2 )
0250xlflips( xaddr len -- )
0251xlsplit( o -- quad.lo quad.hi )
0252xwflip( oct1 -- oct2 )
0253xwflips ( xaddr len -- )
0254xwsplit( o -- w.lo w.2 w.3 w.hi )
-(( [text<)> --)
-]tokenizer( -- )
-\( -- )
-alias( E: ... -- ???)
( "new-name< >old-name< >" -- )
-decimal( -- )
Table A-48 (Continued)
ValueFunctionStack
-external( -- )
-fload( [filename<cr>] -- )
-headerless( -- )
-headers( -- )
-hex( -- )
-octal( -- )
-tokenizer[( -- )
CR"( [text<">< >] -- text-str text-len )
CR'( "old-name< >" -- xt )
CR(.)( n -- str len )
CR."( [text<)>] -- )
CR.(( [text<)>] -- )
CR: (colon)( "new-name< >" -- colon-sys ) ( E: ... -- ??? )
CR; (semicolon)( -- )
CR<<( x1 u -- x2 )
CR>>( x1 u -- x2 )
CR?( addr -- )
CR[']( [old-name< >] -- xt )
CR1+( nu1 -- nu2 )
CR1-( nu1 -- nu2 )
CR2+( nu1 -- nu2 )
CR2-( nu1 -- nu2 )
CRaccept( addr len1 -- len2 )
CRagain( C: dest-sys -- )
CRallot( len -- )
CRascii( [text< >] -- char )
CRbegin( C: -- dest-sys ) ( -- )
CRblank( addr len -- )
CRbuffer:( E: -- a-addr ) ( len "new-name< >" -- )
CR/c*( nu1 -- nu2 )
CRca1+( addr1 -- addr2 )
Table A-48 (Continued)
ValueFunctionStack
CRcarret( -- 0x0D )
CRcase( C: -- case-sys) ( sel -- sel )
CRconstant( E: -- x ) ( x "new-name< >" -- )
CRcontrol( [text< >] -- char )
CRcreate( E: -- a-addr ) ( "new-name< >" -- )
CRd#( [number< >] -- n )
CR.d( n -- )
CRdecimal( -- )
CRdecode-bytes( prop-addr1 prop-len1 data-len -- prop-addr2 prop-len2 data-addr data-len )
CRdefer( E: ... -- ??? ) ( "new-name< >" -- )
CRdo( C: -- dodest-sys ) ( limit start -- ) (R: -- sys )
CR?do( C: -- dodest-sys ) ( limit start -- ) ( R: -- sys )
CR3drop( x1 x2 x3 -- )
CR3dup( x1 x2 x3 -- x1 x2 x3 x1 x2 x3 )
CRelse( C: orig-sys1 -- orig-sys2 ) ( -- )
CRendcase( C: case-sys -- ) ( sel | <nothing> -- )
CRendof( C: case-sys1 of-sys -- case-sys2 ) ( -- )
CRerase( addr len -- )
CReval( ... str len -- ??? )
CRfalse( -- false )
CRfcode-version2( -- )
CRfield( E: addr -- addr+offset ) ( offset size "new-name< >" -- offset+size )
CRh#( [number< >] -- n )
CR.h( n -- )
CRhex( -- )
CRif( C: -- orig-sys ) ( do-next? -- )
CRleave( -- ) ( R: sys -- )
CR?leave( exit? -- ) ( R: sys -- )
CRlinefeed( -- 0x0A )
CRloop( C: dodest-sys -- ) ( -- ) ( R: sys1 -- <nothing> | sys2)
CR+loop( C: dodest-sys -- ) ( delta -- ) ( R: sys1 -- <nothing> | sys2 )
Table A-48 (Continued)
ValueFunctionStack
CR/n*( nu1 -- nu2 )
CRna1+( addr1 -- addr2 )
CRnot( x1 -- x2 )
CRo#( [number< >] -- n )
CRoctal( -- )
CRof( C: case-sys1 -- case-sys2 of-sys ) ( sel of-val -- sel | <nothing> )
CRrepeat( C: orig-sys dest-sys -- ) ( -- )
CRs"( [text<">] -- test-str text-len )
CRs.( n -- )
CRspace( -- )
CRspaces( cnt -- )
CRstruct( -- 0 )
CRthen( C: orig-sys -- ) ( -- )
CRto( param [old-name< >] -- )
CRtrue( -- true )
CR(u.)( u -- str len )
CRuntil( C: dest-sys -- ) ( done? -- )
CRvalue( E: -- x) ( x "new-name< >"-- )
CRvariable( E: -- a-addr ) ( "new-name< >"-- )
CRwhile( C: dest-sys -- orig-sys dest-sys ) ( continue? -- )

FCodes by Name

The following table lists, in alphabetic order, currently-assigned FCodes.
Table A-49
ValueFunctionStack
72!( x a-addr -- )
CR"( [text<">< >] -- text-str text-len )
C7#( ud1 -- ud2 )
C9#>( ud -- str len )
CR'( "old-name< >" -- xt )
-(( [text<)> --)
CR(.)( n -- str len )
20*( nu1 nu2 -- prod )
1E+( nu1 nu2 -- sum )
6C+!( nu a-addr -- )
D3,( x -- )
1F-( nu1 nu2 -- diff )
9D.( nu -- )
CR."( [text<)>] -- )
CR.(( [text<)>] -- )
21/( n1 n2 -- quot )
CR: (colon)( "new-name< >" -- colon-sys ) ( E: ... -- ??? )
CR; (semicolon)( -- )
3A<( n1 n2 -- less? )
96<#( -- )
CR<<( x1 u -- x2 )
43<=( n1 n2 -- less-or-equal? )
3D<>30
3C=( n1 n2 -- greater? )
0B>( n1 n2 -- greater? )
42>=( n1 n2 -- greater-or-equal? )
CR>>( x1 u -- x2 )
CR?( addr -- )
Table A-49 (Continued)
ValueFunctionStack
6D@( a-addr -- x )
CR[']( [old-name< >] -- xt )
-\( -- )
-]tokenizer( -- )
A50( -- 0 )
360<( n -- less-than-0? )
370<=( n -- less-or-equal-to-0? )
350<>( n -- not-equal-to-0? )
340=( nulflag -- equal-to-0? )
380>( n -- greater-than-0? )
390>=( n -- greater-or-equal-to-0? )
A61( -- 1 )
CR1+( nu1 -- nu2 )
CR1-( nu1 -- nu2 )
A4-1( -- -1 )
A72( -- 2 )
772!( x1 x2 a-addr -- )
592*( x1 -- x2 )
CR2+( nu1 -- nu2 )
CR2-( nu1 -- nu2 )
572/( x1 -- x2 )
762@( a-addr -- x1 x2 )
A83( -- 3 )
29>>a( x1 u -- x2 )
0216abort( ... -- ) (R:... -- )
2Dabs( n -- u )
CRaccept( addr len1 -- len2 )
CRagain( C: dest-sys -- )
0213alarm( xt n -- )
-alias( E: ... -- ???) ( "new-name< >old-name< >" -- )
AEaligned( n1 -- n1|a-addr )
Table A-49 (Continued)
ValueFunctionStack
8Balloc-mem( len -- a-addr )
CRallot( len -- )
23and( x1 x2 -- x3 )
CRascii( [text< >] -- char )
12b(")( -- str len ) ( F: /FCode-string/ -- )
11b(')( -- xt ) ( F: /FCode#/ -- )
B7b(:)( E: ... -- ??? ) ( F: -- colon-sys )
C2b(;)( -- ) ( F: colon-sys -- )
A0base( -- a-addr )
13bbranch( -- ) ( F: /FCode-offset/ -- )
14b?branch( don't-branch? -- ) ( F: /FCode-offset/ --)
BDb(buffer:)( E: -- a-addr ) ( F: size -- )
C4b(case)( sel -- sel ) ( F: -- )
BAb(constant)( E: -- n ) ( F: n -- )
BBb(create)( E: -- a-addr ) ( F: -- )
BCb(defer)( E: ... -- ??? ) ( F: -- )
17b(do)( limit start -- ) ( F: /FCode-offset/ -- )
18b(?do)( limit start -- ) ( F: /FCode-offset/ -- )
CRbegin( C: -- dest-sys ) ( -- )
DEbehavior( defer-xt -- contents-xt )
ABbell( -- 0x07 )
C5b(endcase)( sel | <nothing> -- ) ( F: -- )
C6b(endof)( -- ) ( F: /FCode-offset/ -- )
44between( n min max -- min<=n<=max? )
BEb(field)( E: addr -- addr+offset ) ( F: offset size -- offset+size )
A9bl( -- 0x20 )
CRblank( addr len -- )
1Bb(leave)( F: -- )
015Bblink-screen( -- )
10b(lit)( -- n ) ( F: /FCode-num32/ -- )
7Fbljoin( bl.lo b2 b3 b4.hi -- quad )
Table A-49 (Continued)
ValueFunctionStack
15b(loop)( -- ) ( F: /FCode-offset/ -- )
16b(+loop)( delta -- ) ( F: /FCode-offset/ -- )
B1b(<mark)( F: -- )
85body>( a-addr -- xt )
86>body( xt -- a-addr )
1Cb(of)( sel of-val -- sel | <nothing> ) ( F: /FCode-offset/ -- )
ACbounds( n cnt -- n+cnt n )
B2b(>resolve)( -- ) ( F: -- )
AAbs( -- 0x08 )
C3b(to)( x -- )
CRbuffer:( E: -- a-addr ) ( len "new-name< >" -- )
B8b(value)( E: -- x ) ( F: x -- )
B9b(variable)( E: -- a-addr ) ( F: -- )
B0bwjoin( b.lo b.hi -- w )
02 41bxjoin( b.lo b.2 b.3 b.4 b.5 b.6 b.7 b.hi -- o )
023Ebyte-load( addr xt -- )
75c!( byte addr -- )
D0c,( byte -- )
5A/c( -- n )
-/c*( nu1 -- nu2 )
71c@( addr -- byte )
5Eca+( addr1 index -- addr2 )
CRca1+( addr1 -- addr2 )
62char+( addr1 -- addr2 )
020E$call-method( ... method-str method-len ihandle -- ??? )
0208call-package( ... xt ihandle -- ??? )
0209$call-parent( ... method-str method-len -- ??? )
CRcarret( -- 0x0D )
CRcase( C: -- case-sys) ( sel -- sel )
0217catch ( ... xt -- ??? error-code | ??? false )
65cell+( addr1 -- addr2 )
Table A-49 (Continued)
ValueFunctionStack
69cells( nu1 -- nu2 )
62char+( addr1 -- addr2 )
016Cchar-height( -- height )
66chars( nu1 -- nu2 )
016Dchar-width( -- width )
0236child( phandle.parent -- phandle.child )
0206close-package( ihandle -- )
0153column#( -- column# )
0151#columns( -- columns )
7Acomp( addr1 addr2 len -- n )
DDcompile,( xt -- )
CRconstant( E: -- x ) ( x "new-name< >" -- )
CRcontrol( [text< >] -- char )
84count( pstr -- str len )
0220cpeek( addr -- false | byte true )
0223cpoke( byte addr -- okay? )
92cr( -- )
91(cr( -- )
CRcreate( E: -- a-addr ) ( "new-name< >" -- )
CRd#( [number< >] -- n )
D8d+( d1 d2 --d.sum )
D9d-( d1 d2 -- d.diff )
CR.d( n -- )
-decimal( -- )
CRdecimal( -- )
021Bdecode-int( prop-addr1 prop-len1 -- prop-addr2 prop-len2 n )
0128decode-phys( prop-addr1 prop-len1 -- prop-addr2 prop-len2 phys.lo ...
phys.hi )
021Cdecode-string( prop-addr1 prop-len1 -- prop-addr2 prop-len2 str len )
016Adefault-font( -- addr width height advance min-char #glyphs )
CRdefer( E: ... -- ??? ) ( "new-name< >" -- )
Table A-49 (Continued)
ValueFunctionStack
015Edelete-characters( n -- )
0160delete-lines( n -- )
021Edelete-property( nam-str nam-len -- )
51depth( -- u )
0201device-name( str len -- )
011Adevice-type( str len -- )
0120diagnostic-mode?( -- diag? )
A3digit( char base -- digit true | char false )
0121display-status( n -- )
CRdo( C: -- dodest-sys ) ( limit start -- ) (R: -- sys )
CR?do( C: -- dodest-sys ) ( limit start -- ) ( R: -- sys )
0157draw-character( char -- )
0161draw-logo( line# addr width height -- )
46drop( x -- )
522drop( x1 x2 -- )
CR3drop( x1 x2 x3 -- )
47dup( x -- x x )
532dup( x1 x2 -- x1 x2 x1 x2 )
CR3dup( x1 x2 x3 -- x1 x2 x3 x1 x2 x3 )
50?dup( x -- 0 | x x)
CRelse( C: orig-sys1 -- orig-sys2 ) ( -- )
8Femit( char -- )
0112encode+( prop-addr1 prop-len1 prop-addr2 prop-len2 -- prop-addr3
prop-len3 )
0115encode-bytes( data-addr data-len -- prop-addr prop-len )
0111encode-int( n -- prop-addr prop-len )
0113encode-phys( phys.lo ... phys.hi -- prop-addr prop-len )
0114encode-string( str len -- prop-addr prop-len )
00end0( -- )
FFend1( -- )
CRendcase( C: case-sys -- ) ( sel | <nothing> -- )
Table A-49 (Continued)
ValueFunctionStack
CRendof( C: case-sys1 of-sys -- case-sys2 ) ( -- )
CRerase( addr len -- )
015Aerase-screen( -- )
CReval( ... str len -- ??? )
CDevaluate(... str len -- ??? )
1Dexecute( ... xt -- ??? )
33exit( -- ) (R: sys -- )
8Aexpect( addr len -- )
-external( -- )
CAexternal-token( -- ) ( F: /FCode-string FCode#/ -- )
CRfalse( -- false )
0174fb1-blink-screen( -- )
0177fb1-delete-characters( n -- )
0179fb1-delete-lines( n -- )
0170fb1-draw-character( char -- )
017Afb1-draw-logo( line# addr width height -- )
0173fb1-erase-screen( -- )
0176fb1-insert-characters( n -- )
0178fb1-insert-lines( n -- )
017Bfb1-install( width height #columns #lines -- )
0175fb1-invert-screen( -- )
0171fb1-reset-screen( -- )
017Cfb1-slide-up( n -- )
0172fb1-toggle-cursor( -- )
0184fb8-blink-screen( -- )
0187fb8-delete-characters( n -- )
0189fb8-delete-lines( n -- )
0180fb8-draw-character( char -- )
018Afb8-draw-logo( line# addr width height -- )
0183fb8-erase-screen( -- )
0186fb8-insert-characters( n -- )
Table A-49 (Continued)
ValueFunctionStack
0188fb8-insert-lines( n -- )
018Bfb8-install( width height #columns #lines -- )
0185fb8-invert-screen( -- )
0181fb8-reset-screen( -- )
0182fb8-toggle-cursor( -- )
87fcode-revision( -- n )
CRfcode-version2( -- )
FCferror( -- )
CRfield( E: addr -- addr+offset ) ( offset size "new-name< >" --offset+size )
79fill( addr len byte -- )
CB$find( name-str name-len -- xt true | name-str name-len false )
0207find-method( method-str method-len phandle -- false | xt true )
0204find-package( name-str name-len -- false | phandle true )
0127finish-device( -- )
016E>font( char -- addr )
-fload( [filename<cr>] -- )
016Ffontbytes( -- bytes )
0162frame-buffer-adr( -- addr )
8Cfree-mem( a-addr len -- )
0105free-virtual( virt size -- )
021dget-inherited-property( nam-str nam-len -- true | prop-addr prop-len false )
0125get-msecs( -- n )
021Aget-my-property( nam-str nam-len -- true | prop-addr prop-len false )
021Fget-package-property( name-str name-len phandle -- true | prop-addr prop-len false )
DAget-token( fcode# -- xt immediate? )
CRh#( [number< >] -- n )
CR.h( n -- )
-headerless( -- )
-headers( -- )
ADhere( -- addr )
Table A-49 (Continued)
ValueFunctionStack
-hex( -- )
CRhex( -- )
95hold( char -- )
19i( -- index ) ( R: sys -- sys )
CRif( C: -- orig-sys ) ( do-next? -- )
020Bihandle>phandle( ihandle -- phandle )
015Dinsert-characters( n -- )
015Finsert-lines( n -- )
C0instance( -- )
01 2Binterpose( adr len phandle -- )
0154inverse?( -- white-on-black? )
0155inverse-screen?( -- black? )
26invert( x1 -- x2 )
015Cinvert-screen( -- )
011Cis-install( xt -- )
011Dis-remove( xt -- )
011Eis-selftest( xt -- )
0214(is-user-word)( E: ... -- ??? ) ( name-str name-len xt -- )
1Aj( -- index ) ( R: sys -- sys )
8Ekey( -- char )
8Dkey?( -- pressed? )
73l!( quad qaddr -- )
D2l,( quad -- )
6El@( qaddr -- quad )
02 42<l@( qaddr -- n )
5C/l( -- n )
68/l*( nu1 -- nu2 )
60la+( addr1 index -- addr2 )
64la1+( addr1 -- addr2 )
0227lbflip( quad1 -- quad2 )
0228lbflips( qaddr len -- )
Table A-49 (Continued)
ValueFunctionStack
7Elbsplit( quad -- b.lo b2 b3 b4.hi )
82lcc( char1 -- char2 )
CRleave( -- ) ( R: sys -- )
CR?leave( exit? -- ) ( R: sys -- )
0240left-parse-string( str len char -- R-str R-len L-str L-len )
0152line#( -- line# )
94#line( -- a-addr )
CRlinefeed( -- 0x0A )
0150#lines( -- rows )
CRloop( C: dodest-sys -- ) ( -- ) ( R: sys1 -- <nothing> | sys2)
CR+loop( C: dodest-sys -- ) ( delta -- ) ( R: sys1 -- <nothing> | sys2 )
0222lpeek( qaddr -- false | quad true )
0225lpoke( quad qaddr -- okay? )
27lshift( x1 u -- x2 )
0226lwflip( quad1 -- quad2 )
0237lwflips( qaddr len -- )
7Clwsplit( quad -- w1.lo w2.hi )
02 43lxjoin( quad.lo quad.hi -- o )
01A4mac-address( -- mac-str mac-len )
0130map-low( phys.lo ... size -- virt )
0124mask( -- a-addr )
2Fmax( n1 n2 -- n1|n2 )
0122memory-test-suite( addr len -- fail? )
2Emin( n1 n2 -- n1|n2 )
22mod( n1 n2 -- rem )
2A/mod( n1 n2 -- rem quot )
0119model( str len -- )
78move( src-addr dest-addr len -- )
0126ms( n -- )
0102my-address( -- phys.lo ... )
0202my-args( -- arg-str arg-len )
Table A-49 (Continued)
ValueFunctionStack
020Amy-parent( -- ihandle )
0203my-self( -- ihandle )
0103my-space( -- phys.hi )
020Dmy-unit( -- phys.lo ... phys.hi )
5D/n( -- n )
CR/n*( nu1 -- nu2 )
61na+( addr1 index -- addr2 )
CRna1+( addr1 -- addr2 )
B6named-token( -- ) ( F: /FCode-string FCode#/ -- )
2Cnegate( n1 -- n2 )
011Fnew-device( -- )
B5new-token( -- ) ( F: /FCode#/ -- )
023Dnext-property( previous-str previous-len phandle -- false | name-str name-len true )
4Dnip( x1 x2 -- x2 )
7Bnoop( -- )
CRnot( x1 -- x2 )
A2$number( addr len -- true | n false )
CRo#( [number< >] -- n )
-octal( -- )
CRoctal( -- )
CRof( C: case-sys1 -- case-sys2 of-sys ) ( sel of-val -- sel | <nothing> )
6Boff( a-addr -- )
CCoffset16( -- )
6Aon( a-addr -- )
0205open-package( arg-str arg-len phandle -- ihandle | 0 )
020F$open-package( arg-str arg-len name-str name-len -- ihandle | 0 )
24or( x1 x2 -- x3 )
93#out( -- a-addr )
48over( x1 x2 -- x1 x2 x1 )
542over( x1 x2 x3 x4 -- x1 x2 x3 x4 x1 x2 )
Table A-49 (Continued)
ValueFunctionStack
83pack( str len addr -- pstr )
011Bparse-2int( str len -- val.lo val.hi )
023Cpeer( phandle -- phandle.sibling )
4Epick( xu ... x1 x0 u -- xu ... x1 x0 xu )
0110property( prop-addr prop-len name-str name-len -- )
01 2Apop-package( -- )
01 29push-package( phandle -- )
31r>( -- x ) ( R: x -- )
32r@( -- x ) ( R: x -- x )
9E.r( n size -- )
30>r( x -- ) ( R: -- x)
0231rb!( byte addr -- )
0230rb@( addr -- byte )
0116reg( phys.lo ... phys.hi size -- )
CRrepeat( C: orig-sys dest-sys -- ) ( -- )
0158reset-screen( -- )
0235rl!( quad qaddr -- )
0234rl@( qaddr -- quad )
4Froll( xu ... x1 x0 u -- xu-1 ... x1 x0 xu )
4Arot( x1 x2 x3 -- x2 x3 x1 )
4B-rot( x1 x2 x3 -- x3 x1 x2 )
562rot( x1 x2 x3 x4 x5 x6 -- x3 x4 x5 x6 x1 x2 )
28rshift( x1 u -- x2 )
0233rw!( w waddr -- )
0232rw@( waddr -- w )
02 2Erx@( xaddr -- o )
02 2Frx!( o xaddr -- )
CRs"( [text<">] -- test-str text-len )
CRs.( n -- )
C8#s( ud -- 0 0 )
9F.s( ... -- ... )
Table A-49 (Continued)
ValueFunctionStack
0131sbus-intr>cpu( sbus-intr# -- cpu-intr# )
0163screen-height( -- height )
0164screen-width( -- width )
023Fset-args( arg-str arg-len unit-str unit-len -- )
016Bset-font( addr width height advance min-char #glyphs -- )
DBset-token( xt immediate? fcode# -- )
98sign( n -- )
CRspace( -- )
CRspaces( cnt -- )
88span( -- a-addr )
F0start0( -- )
F1start1( -- )
F2start2( -- )
F3start4( -- )
DCstate( -- a-addr )
CRstruct( -- 0 )
0215suspend-fcode( -- )
49swap( x1 x2 -- x2 x1 )
552swap( x1 x2 x3 x4 -- x3 x4 x1 x2 )
CRthen( C: orig-sys -- ) ( -- )
0218throw( ... error-code -- ??? error-code | ...)
CRto( param [old-name< >] -- )
0159toggle-cursor( -- )
-tokenizer[( -- )
CRtrue( -- true )
4Ctuck( x1 x2 -- x2 x1 x2 )
90type( text-str text-len -- )
99u#( u1 -- u2 )
97u#>( u -- str len )
9Au#s( u1 -- u2 )
9Bu.( u -- )
Table A-49 (Continued)
ValueFunctionStack
40u<( u1 u2 -- unsigned-less? )
3Fu<=( u1 u2 -- unsigned-less-or-equal? )
3Eu>( u1 u2 -- unsigned-greater? )
41u>=( u1 u2 -- unsigned-greater-or-equal? )
CR(u.)( n -- addr len )
58u2/( x1 -- x2 )
D4um*( u1 u2 -- ud.prod )
D5um/mod( ud u -- urem uquot )
2Bu/mod( u1 u2 -- urem uquot )
89unloop( -- ) ( R: sys -- )
CRuntil( C: dest-sys -- ) ( done? -- )
81upc( char1 -- char2 )
9Cu.r( u size -- )
0219user-abort( ... -- ) ( R: ... -- )
CRvalue( E: -- x) ( x "new-name< >"-- )
CRvariable( E: -- a-addr ) ( "new-name< >"-- )
FDversion1( -- )
74w!( w waddr -- )
D1w,( w -- )
6Fw@( waddr -- w )
5B/w( -- n )
67/w*( nu1 -- nu2 )
70<w@( waddr -- n )
5Fwa+( addr1 index -- addr2 )
63wa1+( addr1 -- addr2 )
80wbflip( w1 -- w2 )
0236wbflips( waddr len -- )
AFwbsplit( w -- b1.lo b2.hi )
CRwhile( C: dest-sys -- orig-sys dest-sys ) ( continue? -- )
0166window-left( -- border-width )
0165window-top( -- border-height )
Table A-49 (Continued)
ValueFunctionStack
45within( n min max -- min<=n<max? )
7Dwljoin( w.lo w.hi -- quad )
0221wpeek( waddr -- false | w true )
0224wpoke( w waddr -- okay? )
02 44wxjoin( w.lo w.2 w.3 w.hi -- o )
02 45x,( o -- )
02 46x@ ( xaddr -- o )
02 47x! ( o xaddr -- )
02 48/x ( -- n )
02 49/x* ( nu1 -- nu2 )
02 4axa+ ( addr1 index -- addr2 )
02 4bxa1+ ( addr1 -- addr2 )
02 4cxbflip ( oct1 -- oct2 )
02 4dxbflips( xaddr len -- )
02 4exbsplit ( o -- b.lo b.2 b.3 b.4 b.5 b.6 b.7 b.hi )
02 4fxlflip ( oct1 -- oct2 )
02 50xlflips( xaddr len -- )
02 51xlsplit( o -- quad.lo quad.hi )
25xor( x1 x2 -- x3 )
02 52xwflip( oct1 -- oct2 )
02 53xwflips ( xaddr len -- )
02 54xwsplit( o -- w.lo w.2 w.3 w.hi )