A P P E N D I X  A

FCode Reference

This appendix contains the following sections:


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 Stack Manipulation

Value

Function

Stack

Description

51

depth

( ??? -- ??? u)

Number of items on stack

46

drop

( x -- )

Removes the top item from the stack

52

2drop

( x1 x2 -- )

Removes 2 items from stack

CR

3drop

( x1 x2 x3 -- )

Removes 3 items from stack

47

dup

( x -- x x )

Duplicates x

53

2dup

( x1 x2 -- x1 x2 x1 x2 )

Duplicates 2 stack items

CR

3dup

( 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

4D

nip

( x1 x2 -- x2 )

Discards the second stack item

48

over

( x1 x2 -- x1 x2 x1 )

Copies second stack item to top of stack

54

2over

( x1 x2 x3 x4 -- x1 x2 x3 x4 x1 x2 )

Copies 2 stack items

4E

pick

( 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

31

r>

( -- x ) ( R: x -- )

Moves the top item from return stack to data stack

32

r@

( -- x ) ( R: x -- x )

Copies the top of the return stack to the data stack

4F

roll

( xu ... x1 x0 u -- xu-1 ... x1 x0 xu )

Rotates u stack items

4A

rot

( x1 x2 x3 -- x2 x3 x1 )

Rotates 3 stack items (Same as 3roll)

4B

-rot

( x1 x2 x3 -- x3 x1 x2 )

Rotates top 3 stack items in reverse order of rot

56

2rot

( x1 x2 x3 x4 x5 x6 -- x3 x4 x5 x6 x1 x2 )

Rotates 3 pairs of stack items

49

swap

( x1 x2 -- x2 x1 )

Exchanges the top 2 stack items

55

2swap

( x1 x2 x3 x4 -- x3 x4 x1 x2 )

Exchanges 2 pairs of stack items

4C

tuck

( x1 x2 -- x2 x1 x2 )

Copies the top stack item below the second item


 


TABLE A-2 Arithmetic Operations

Value

Function

Stack

Description

20

*

( nu1 nu2 -- prod )

Multiplies nu1 and nu2

1E

+

( nu1 nu2 -- sum )

Adds nu1 to nu2

1F

-

( nu1 nu2 -- diff )

Subtracts nu2 from nu1

21

/

( n1 n2 -- quot )

Divides n1 by n2

CR

1+

( nu1 -- nu2 )

Adds 1

CR

1-

( nu1 -- nu2 )

Subtracts 1

CR

2+

( nu1 -- nu2 )

Adds 2

CR

2-

( nu1 -- nu2 )

Subtracts 2

59

2*

( x1 -- x2 )

Multiplies by 2

57

2/

( x1 -- x2 )

Divides by 2

27

lshift

( x1 u -- x2 )

Left shifts x1 by u places

28

rshift

( 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 x1u by places

2D

abs

( n -- u )

Absolute value

AE

aligned

( n1 -- |a-addr )

Adjusts an address to a machine word boundary

23

and

( x1 x2 -- x3 )

Logical and

AC

bounds

( start len -- end start )

Converts start,len to end,start for do loop

2F

max

( n1 n2 -- n3)

n3 is maximum of n1 and n2

2E

min

( n1 n2 -- n3)

n3 is minimum of n1 and n2

22

mod

( 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

2C

negate

( n1 -- n2 )

Changes the sign of n1

26

invert

( x1 -- x2 )

One's complement

26

not

( x1 -- x2 )

Synonym for invert

24

or

( x1 x2 -- x3 )

Logical or

2B

u/mod

( u1 u2 -- urem uquot )

Unsigned single precision divide of u1/u2

58

u2/

( x1 -- x2 )

Logical right shifts 1 bit

25

xor

( x1 x2 -- x3 )

Exclusive or

D4

um*

( u1 u2 -- ud.prod )

Multiplies two unsigned quadlets, yields an unsigned double precision product.

D5

um/mod

( ud u -- urem uquot )

Divides an unsigned double precision number by an unsigned single precision number, yields a single precision remainder and quotient

D8

d+

( d1 d2 -- d.sum )

Adds two double precision numbers

D9

d-

( d1 d2 -- d.diff )

Subtracts two double precision numbers


 


TABLE A-3 Memory Operations

Value

Function

Stack

Description

72

!

( x a-addr -- )

Stores a number at a-addr

6C

+!

( n a-addr -- )

Adds n to the number stored at a-addr

77

2!

( x1 x2 a-addr -- )

Stores 2 numbers at a-addr; x2 at lower address

76

2@

( a-addr -- x1 x2 )

Fetches 2 numbers from a-addr; x2 from lower address

6D

@

( a-addr -- x )

Fetches a number from at a-addr

CR

?

( a-addr -- )

Displays the number at a-addr

75

c!

( byte addr -- )

Stores byte at addr

71

c@

( addr -- byte )

Fetches byte from addr

CR

blank

( addr len -- )

Sets len bytes of memory to ASCII space, starting at addr

7A

comp

( addr1 addr2 len -- n )

Compares two byte arrays including case. n=0 if same

CR

erase

( addr len -- )

Sets len bytes of memory to zero, starting at addr

79

fill

( addr len byte -- )

Sets len bytes of memory to value byte starting at addr

0228

lbflips

( qaddr len -- )

Reverses bytes within each quadlet in given region

0237

lwflips

( qaddr len -- )

Exchanges doublets within quadlets in qaddr len

73

l!

( quad qaddr -- )

Stores the quadlet at qaddr, must be 32-bit aligned

6E

l@

( qaddr -- quad )

Fetches the quadlet at qaddr, must be 32-bit aligned

78

move

( src-addr dest-addr len -- )

Copies len bytes from src-addr to dest-addr

6B

off

( a-addr -- )

Stores false at a-addr

6A

on

( a-addr -- )

Stores true at a-addr

0236

wbflips

( waddr len -- )

Exchanges bytes within doublets in the specified region

74

w!

( w waddr -- )

Stores doublet w at waddr, must be 16-bit aligned

6F

w@

( 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 Atomic Access

Value

Function

Stack

Description

0230

rb@

( addr -- byte )

Reads the 8-bit value at the given address, atomically

0231

rb!

( byte addr -- )

Writes the 8-bit value at the given address, atomically

0232

rw@

( waddr -- w )

Reads the doublet at the given address, atomically

0233

rw!

( w waddr -- )

Writes the doublet at the given address, atomically

0234

rl@

( qaddr -- quad )

Reads the quadlet at the given address, atomically

0235

rl!

( quad qaddr -- )

Writes the quadlet at the given address, atomically


 


TABLE A-5 Data Exception Tests

Value

Function

Stack

Description

0220

cpeek

( addr -- false | byte true )

Reads 8-bit value at addr, returns false if unsuccessful

0221

wpeek

( waddr -- false | w true )

Reads doublet at addr, returns false if unsuccessful

0222

lpeek

( qaddr -- false | quad true )

Reads quadlet at addr, returns false if unsuccessful

0223

cpoke

( byte addr -- okay? )

Writes 8-bit value at addr, returns false if unsuccessful

0224

wpoke

( w waddr -- okay? )

Writes doublet to addr, returns false if unsuccessful

0225

lpoke

( quad qaddr -- okay? )

Writes quadlet to addr, returns false if unsuccessful


 


TABLE A-6 Comparison Operations

Value

Function

Stack

Description

36

0<

( n -- less-than-0? )

True if n < 0

37

0<=

( n -- less-or-equal-to-0? )

True if n <= 0

35

0<>

( n -- not-equal-to-0? )

True if n <> 0

34

0=

( n -- equal-to-0? )

True if n = 0, also inverts any flag

38

0>

( n -- greater-than-0? )

True if n > 0

39

0>=

( 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

<>

( n1 n2 -- not-equal? )

True if n1 <> n2

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

44

between

( n min max -- min<=n<=max? )

True if min <= n <= max

CR

false

( -- false )

The value false (0)

CR

true

( -- true )

The value true (1)

40

u<

( u1 u2 -- unsigned-less? )

True if u1 < u2, unsigned

3F

u<=

( u1 u2 -- unsigned-less-or-equal? )

True if u1 <= u2, unsigned

3E

u>

( u1 u2 -- unsigned-greater? )

True if u1 > u2, unsigned

41

u>=

( u1 u2 -- unsigned-greater-or-equal? )

True if u1 >= u2, unsigned

45

within

( n min max -- min<=n<max? )

True if min <= n < max


 


TABLE A-7 Text Input

Value

Function

Stack

Description

-

(

( [text<)> --)

Begins a comment (All text until next close parenthesis ")" is ignored)

-

\

( -- )

Ignore rest of line (comment)

CR

ascii

( [text< >] -- char )

ASCII value of next character

CR

control

( [text< >] -- char )

Interprets next character as ASCII control character

8E

key

( -- char )

Reads a character from the keyboard

8D

key?

( -- pressed? )

True if a key has been typed on the keyboard

CR

accept

( addr len1 -- len2 )

Gets an edited input line, stores it at addr

8A

expect

( addr len -- )

Gets a line of edited input from the keyboard; stores it at addr

88

span

( -- a-addr )

Variable containing the number of characters read by expect


 


TABLE A-8 ASCII Constants

Value

Function

Stack

Description

AB

bell

( -- 0x07 )

The ASCII code for the bell character; decimal 7

A9

bl

( -- 0x20 )

The ASCII code for the space character; decimal 32

AA

bs

( -- 0x08 )

The ASCII code for the backspace character; decimal 8

CR

carret

( -- 0x0D )

The ASCII code for the carriage return character; decimal 13

CR

linefeed

( -- 0x0A )

The ASCII code for the linefeed character; decimal 10

CR

newline

( -- 0x0A)

The ASCII code for the newline character; decimal 10


 


TABLE A-9 Numeric Input

Value

Function

Stack

Description

A4

-1

( -- -1 )

Constant -1

A5

0

( -- 0 )

Constant 0

A6

1

( -- 1 )

Constant 1

A7

2

( -- 2 )

Constant 2

A8

3

( -- 3 )

Constant 3

CR

d#

( [number< >] -- n )

Interprets next number in decimal

-

decimal

( -- )

If outside definition, input numbers in decimal

CR

h#

( [number< >] -- n )

Interprets next number in hexadecimal

-

hex

( -- )

If outside definition, input numbers in hexadecimal


 


TABLE A-10 Numeric Primitives

Value

Function

Stack

Description

99

u#

( u1 -- u2 )

Converts a digit in pictured numeric output

97

u#>

( u -- str len )

Ends pictured numeric output

96

<#

( -- )

Initializes pictured numeric output

C7

#

( ud1 -- ud2 )

Converts a digit in pictured numeric output conversion

C9

#>

( ud -- str len )

Ends pictured numeric output conversion

A0

base

( -- a-addr )

Variable containing number base

A3

digit

( char base -- digit true | char false )

Converts a character to a digit

95

hold

( char -- )

Inserts the char in the pictured numeric output string

C8

#s

( ud -- 0 0 )

Converts remaining digits in pictured numeric output

9A

u#s

( u1 -- u2 )

Converts rest of the digits in pictured numeric output

98

sign

( n -- )

Sets sign of pictured output

A2

$number

( addr len -- true | n false )

Converts a string to a number


 


TABLE A-11 Numeric Output

Value

Function

Stack

Description

9D

.

( nu -- )

Displays a number in the current base

CR

.d

( n -- )

Displays number in decimal

CR

decimal

( -- )

If inside definition, numeric output in decimal

CR

.h

( n -- )

Displays number in hexadecimal

CR

hex

( -- )

If inside definition, numeric output in hexadecimal

9E

.r

( n size -- )

Displays a number in a fixed width field

9F

.s

( ... -- ... )

Displays the contents of the data stack

CR

s.

( n -- )

Displays n as a signed number

9B

u.

( u -- )

Displays an unsigned number

9C

u.r

( u size -- )

Prints an unsigned number in a fixed width field


 


TABLE A-12 General-purpose Output

Value

Function

Stack

Description

CR

.(

( [text<)>] -- )

Displays a string now

91

(cr

( -- )

Outputs ASCII CR character; decimal 13

92

cr

( -- )

Starts a new line of display output

8F

emit

( char -- )

Displays the character

CR

space

( -- )

Outputs a single space character

CR

spaces

( n -- )

Outputs n spaces

90

type

( text-addr text-len -- )

Displays the text string


 


TABLE A-13 Formatted Output

Value

Function

Stack

Description

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 Loops

Value

Function

Stack

Description

CR

again

( C: dest-sys -- )

Ends begin...again (infinite) loop

CR

begin

( C: -- dest-sys ) ( -- )

Starts conditional or infinite loop

CR

repeat

( C: orig-sys dest-sys -- ) ( -- )

Returns to loop start (begin keyword)

CR

until

( C: dest-sys -- ) ( done? -- )

If not false, exits begin...until loop

CR

while

( C: dest-sys -- orig-sys dest-sys )
( continue? -- )

If not false, continues begin...while...repeat loop, else exits loop


 


TABLE A-15 Conditionals

Value

Function

Stack

Description

CR

if

( C: -- orig-sys ) ( do-next? -- )

If not false, executes next FCode(s)

CR

else

( C: orig-sys1 -- orig-sys2 ) ( -- )

Executes next FCode(s) if if failed

CR

then

( C: orig-sys -- ) ( -- )

Terminates if...else...then construct



TABLE A-16 Case Statements

Value

Function

Stack

Description

CR

case

( C: -- case-sys) ( sel -- sel )

Begins a case (multiple selection) statement

CR

endcase

( C: case-sys -- ) ( sel | <nothing> -- )

Marks end of a case statement

CR

of

( C: case-sys1 -- case-sys2 of-sys )

( sel of-val -- sel | <nothing> )

Marks beginning of conditional execution clause based on case selector.

CR

endof

( C: case-sys1 of-sys -- case-sys2 ) ( -- )

Marks the end of an of clause


 


TABLE A-17 do Loops

Value

Function

Stack

Description

CR

do

( C: -- dodest-sys )

( limit start -- ) (R: -- sys )

Marks beginning of loop which will execute with index value ranging from start to limit-1, inclusive

CR

?do

( C: -- dodest-sys )

( limit start -- ) ( R: -- sys )

Like do, but skips loop if limit = start

19

i

( -- index ) ( R: sys -- sys )

Returns current loop index value

1A

j

( -- index ) ( R: sys -- sys )

Returns value of next outer loop index

CR

leave

( -- ) ( R: sys -- )

Exits do loop immediately

CR

?leave

( exit? -- ) ( R: sys -- )

If flag is not false, exits do loop

CR

loop

( C: dodest-sys -- ) ( -- )

( R: sys1 -- <nothing> | sys2)

Increments index, returns to do

CR

+loop

( C: dodest-sys -- ) ( n -- )

( R: sys1 -- <nothing> | sys2 )

Increments index by n, returns to do.

89

unloop

( -- ) ( R: sys -- )

Discards loop control parameters


 


TABLE A-18 Control Words

Value

Function

Stack

Description

1D

execute

( ... xt -- ??? )

Executes the word whose compilation address is on the stack

33

exit

( -- ) (R: sys -- )

Returns from the current word


 


TABLE A-19 Strings

Value

Function

Stack

Description

CR

"

( [text<">< >] -- text-str text-len )

Collects a string

CR

s"

( [text<">] -- text-str text-len )

Gathers the immediately-following string

84

count

( pstr -- str len )

Unpacks a packed string

82

lcc

( char1 -- char2 )

Converts char1 to lower case

83

pack

( strlen addr -- pstr )

Makes a packed string from addr strlen, placing it at pstr

81

upc

( char1 -- char2 )

Converts char1 to upper case

0240

left-parse-string

( str len char

-- R-str R-len L-str L-len )

Splits a string at the given delimiter (which is discarded)

011B

parse-2int

( str len -- val.lo val.hi )

Converts a string into a physical address and space


 


TABLE A-20 Defining Words

Value

Function

Stack

Description

CR

: (colon) name

( -- )

Begins colon definition

CR

; (semicolon)

( -- )

Ends colon definition

-

alias

( E: ... -- ???)

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

Defines a new-name with behavior of old-name

CR

buffer:

( E: -- a-addr )

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

Creates data array of len bytes

CR

constant

( E: -- x ) ( x "new-name< >" -- )

Creates a constant

CR

create

( E: -- a-addr ) ( "new-name< >" -- )

Generic defining word

CR

defer

( E: ... -- ??? ) ( "new-name< >" -- )

Execution vector (change with to)

CR

field

( E: addr -- addr+offset )
( offset size "new-name< >" -- offset+size )

Creates a named offset pointer

C0

instance

( -- )

Declare a data type to be local

CR

struct

( -- 0 )

Initializes for field creation

CR

variable

( E: -- a-addr ) ( "new-name< >"-- )

Creates a variable

CR

value

( E: -- x) ( x "new-name< >"-- )

Creates a value


 


TABLE A-21 Dictionary Compilation

Value

Function

Stack

Description

D3

,

( x -- )

Places a number in the dictionary

D0

c,

( byte -- )

Places a byte in the dictionary

AD

here

( -- addr )

Address of top of dictionary

D2

l,

( quad -- )

Places a quadlet in the dictionary

D1

w,

( w -- )

Places a doublet in the dictionary

CR

allot

( len -- )

Allocates len bytes in the dictionary

CR

to

( param [old-name< >] -- )

Changes value in a defer word or a value

DD

compile

( -- )

Compiles following command at run time

DC

state

( -- a-addr )

Variable containing true if in compilation state


 


TABLE A-22 Dictionary Search

Value

Function

Stack

Description

CR

'

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

Finds the named word (while executing)

CR

['] name

( -- xt )

Finds the named word (while compiling)

CB

$find

( name-str name-len

-- xt true | name-str name-len false )

Finds the execution token corresponding to the name string in the dictionary

CD

eval

( ... str len -- ??? )

Executes Forth commands within a string

CD

evaluate

( ... str len -- ??? )

Interprets Forth text from the given string


 


TABLE A-23 Conversion Operators

Value

Function

Stack

Description

7F

bljoin

( bl.lo b2 b3 b4.hi -- quad )

Joins four bytes to form a quadlet

B0

bwjoin

( 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

66

chars

( nu1 -- nu2 )

Multiplies by /c

5E

ca+

( addr1 index -- addr2 )

Increments addr1 by index times /c

CR

ca1+

( addr1 -- addr2 )

Synonym for char+

62

char+

( addr1 -- addr2 )

Increments addr1 by /c

80

wbflip

( w1 -- w2 )

Swaps the bytes within a doublet

5C

/l

( -- n )

Address increment for a quadlet; 4

68

/l*

( nu1 -- nu2 )

Multiplies by /l

60

la+

( addr1 index -- addr2 )

Increments addr1 by index times /l

64

la1+

( addr1 -- addr2 )

Increments addr1 by /l

0227

lbflip

( quad1 -- quad2 )

Reverses the bytes within a quadlet

7E

lbsplit

( quad -- b.lo b2 b3 b4.hi )

Splits a quadlet into four bytes

7E

lwflip

( quad1 -- quad2 )

Swaps the doublets within a quadlet

7C

lwsplit

( quad -- w1.lo w2.hi )

Splits a quadlet into two doublets

5D

/n

( -- n )

Address increment for a cell

CR

/n*

( nu1 -- nu2 )

Synonym for cells

69

cells

( nu1 -- nu2 )

Multiplies by /n

61

na+

( addr1 index -- addr2 )

Increments addr1 by index times /n

CR

na1+

( addr1 -- addr2 )

Synonym for cell+

65

cell+

( addr1 -- addr2 )

Increments addr1 by /n

5B

/w

( -- n )

Address increment for a doublet; 2

67

/w*

( nu1 -- nu2 )

Multiplies by /w

5F

wa+

( addr1 index -- addr2 )

Increments addr1 by index times /w

63

wa1+

( addr1 -- addr2 )

Increments addr1 by /w

AF

wbsplit

( w -- b1.lo b2.hi )

Splits a doublet into two bytes

7D

wljoin

( w.lo w.hi -- quad )

Joins two doublets to form a quadlet


 


TABLE A-24 64-bit Operations

Value

Function

Stack

Description

022E

rx@

( oaddr -- o )

Reads the 64-bit value at the given address, atomically

022F

rx!

( o oaddr -- )

Writes the 64-bit value at the given address, atomically

0241

bxjoin

( b.lo b.2 b.3 b.4 b.5 b.6 b.7 b.hi -- o )

Joins 8 bytes to form a octlet

0242

<l@

( qaddr -- n )

Fetches a sign-extended quadlet at qaddr

0243

lxjoin

( quad.lo quad.hi -- o )

Joins two quadlets to form an octlet

0244

wxjoin

( w.lo w.2 w.3 w.hi -- o )

Joins four doublets to form an octlet

0245

x,

( o -- )

Places an octlet in the dictionary

0246

x@

( oaddr -- o )

Fetches the octlet at oaddr, must be 64-bit aligned

0247

x!

( o oaddr -- )

Stores an octlet at oaddr, must be 64-bit aligned

0248

/x

( -- n )

Address increment for an octlet; 8

0249

/x*

( nu1 -- nu2 )

Multiplies by /x

024A

xa+

( addr1 index -- addr2 )

Increments addr1 by index times /x

024B

xa1+

( addr1 -- addr2 )

Increments addr1 by /x

024C

xbflip

( oct1 -- oct2 )

Reverse bytes within octlet

024D

xbflips

( oaddr len -- )

Reverse bytes within each octlet in given region

024E

xbsplit

( o -- b.lo b.2 b.3 b.4 b.5 b.6 b.7 b.hi )

Splits an octlet into 8 bytes

024F

xlflip

( oct1 -- oct2 )

Reverse quadlets within octlet

0250

xlflips

( oaddr len -- )

Reverse quadlets within each octlet in given region

0251

xlsplit

( o -- quad.lo quad.hi )

Splits an octlet into 2 quadlets

0252

xwflip

( oct1 -- oct2 )

Reverse doublets within octlet

0253

xwflips

( oaddr len -- )

Reverse doublets within each octlet in given region

0254

xwsplit

( o -- w.lo w.2 w.3 w.hi )

Splits an octlet into 4 doublets


TABLE A-25 Memory Buffers Allocation

Value

Function

Stack

Description

8B

alloc-mem

( n -- a-addr )

Allocates n bytes of memory and returns its address

8C

free-mem

( n len -- )

Frees memory allocated by alloc-mem


 

 


TABLE A-26 Miscellaneous Operators

Value

Function

Stack

Description

86

>body

( xt -- a-addr )

Finds parameter field address from compilation address

85

body>

( a-addr -- xt )

Finds compilation address from parameter field address

DA

get-token

( FCode# -- xt immediate? )

Converts FCode Number to function execution token

DB

set-token

( xt immediate? FCode# -- )

Assigns FCode Number to existing function

00

end0

( -- )

Marks the end of FCode

FF

end1

( -- )

Alternates form for end0 (not recommended)

CR

fcode-version1

( -- )

Begins FCode program

023E

byte-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)

7B

noop

( -- )

Does nothing

CC

offset16

( -- )

All further branches use 16-bit offsets (instead of 8-bit)

-

tokenizer[

( -- )

Begins tokenizer program commands

-

]tokenizer

( -- )

Ends tokenizer program commands

CR

fcode-version2

( -- )

Begins 2.0 FCode program, compiles start1

-

external

( -- )

Creates new names with external-token

CR

fcode-version3

( -- )

Begins 3.0 FCode program, compiles start1


 


TABLE A-27 Internal Operators (invalid for program text)

Value

Function

Stack

Description

01-0F

 

 

First byte of a two byte FCode

10

b(lit)

( -- n ) ( F: /FCode-num32/ -- )

Followed by 32-bit#. Compiled by numeric data

11

b(')

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

Followed by a token (1 or 2-byte code) . Compiled by ['] or '

12

b(")

( -- str len )
( F: /FCode-string/ -- )

Followed by count byte, text. Compiled by " or ."

C3

b(to)

( x -- )

Compiled by to

FD

version1

( -- )

Followed by reserved byte, checksum (2 bytes) , length (4 bytes). Compiled by fcode-version1, as the first FCode bytes

13

bbranch

( -- )

( F: /FCode-offset/ -- )

Followed by offset. Compiled by else or again

14

b?branch

( don't-branch? -- )
( F: /FCode-offset/ -- )

Followed by offset. Compiled by if or until

15

b(loop)

( -- ) ( F: /FCode-offset/ -- )

Followed by offset. Compiled by loop

16

b(+loop)

( delta -- )
( F: /FCode-offset/ -- )

Followed by offset. Compiled by +loop

17

b(do)

( limit start -- )

( F: /FCode-offset/ -- )

Followed by offset. Compiled by do

18

b(?do)

( limit start -- )

( F: /FCode-offset/ -- )

Followed by offset. Compiled by ?do

1B

b(leave)

( F: -- )

Compiled by leave or ?leave

B1

b(<mark)

( F: -- )

Compiled by begin

B2

b(>resolve)

( -- ) ( F: -- )

Compiled by else or then

C4

b(case)

( sel -- sel ) ( F: -- )

Compiled by case

C5

b(endcase)

( sel | <nothing> -- ) ( F: -- )

Compiled by endcase

C6

b(endof)

( -- ) ( F: /FCode-offset/ -- )

Compiled by endof

1C

b(of)

( sel of-val -- sel | <nothing> )

( F: /FCode-offset/ -- )

Followed by offset. Compiled by of

B5

new-token

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

Followed by table#, code#, token-type. Compiled by any defining word.

B6

named-token

( -- )

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

Followed by packed string (count,text), table#, code#, token-type. Compiled by any defining word (: value constant etc.)

B7

b(:)

( E: ... -- ??? )

( F: -- colon-sys )

Token-type compiled by :

B8

b(value)

( E: -- x ) ( F: x -- )

Token-type compiled by value

B9

b(variable)

( E: -- a-addr ) ( F: -- )

Token-type compiled by variable

BA

b(constant)

( E: -- n ) ( F: n -- )

Token-type compiled by constant

BB

b(create)

( E: -- a-addr ) ( F: -- )

Token-type compiled by create

BC

b(defer)

( E: ... -- ??? ) ( F: -- )

Token-type compiled by defer

BD

b(buffer:)

( E: -- a-addr ) ( F: size -- )

Token-type compiled by buffer:

BE

b(field)

( E: addr -- addr+offset )

( F: offset size -- offset+size)

Token-type compiled by field

C2

b(;)

( -- ) ( F: colon-sys -- )

End a colon definition. Compiled by ;

CA

external-token

( -- )

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

Create a new named FCode function.

F0

start0

( -- )

Like version1, but for version 2.x and 3.x FCodes. Uses 16-bit branches. Fetches successive tokens from same address

F1

start1

( -- )

Like version1, but for version 2.x and 3.x FCodes. Uses 16-bit branches. Fetches successive tokens from consecutive addresses. Compiled by fcode-version2

F2

start2

( -- )

Like version1, but for version 2.x and 3.x FCodes. Uses 16-bit branches. Fetches successive tokens from consecutive 16-bit addresses

F3

start4

( -- )

Like version1, but for version 2.x and 3.x FCodes. Uses 16-bit branches. Fetches successive tokens from consecutive 32-bit addresses


 


TABLE A-28 Virtual Memory Allocation

Value

Function

Stack

Description

0105

free-virtual

( virt size -- )

Frees virtual memory obtained using map-low.

0130

map-low

( phys-low .... size -- virt )

Allocate virtual memory.


 


TABLE A-29 Properties

Value

Function

Stack

Description

01 10

property

( prop-addr prop-len name-str name-len -- )

Declares a property with the given value structure, for the given name string.

02 1E

delete-property

( name-str name-len -- )

Deletes the property with the given name

01 15

encode-bytes

( data-addr data-len -- prop-addr prop-len )

Converts a byte array into an prop-format string

01 11

encode-int

( n -- prop-addr prop-len )

Converts a number into an prop-format string

01 13

encode-phys

( phys.lo ... phys.hi -- prop-addr prop-len )

Converts physical address and space into an prop-format string

01 14

encode-string

( str len -- prop-addr prop-len )

Converts a string into an prop-format string

01 12

encode+

( prop-addr1 prop-len1 prop-addr2 prop-len2

-- prop-addr3 prop-len3 )

Merges two prop-format strings. They must have been created sequentially

CR

decode-bytes

( prop-addr1 prop-len1 data-len --

prop-addr2 prop-len2 data-addr data-len )

Decodes a byte array from a prop-encoded-array

02 1B

decode-int

( prop-addr1 prop-len1
-- prop-addr2 prop-len2 n )

Converts the beginning of an prop-format string to an integer

02 1C

decode-string

( prop-addr1 prop-len1
-- prop-addr2 prop-len2 str len )

Converts the beginning of a prop-format string to a normal string

01 28

decode-phys

( prop-addr1 prop-len1 --

prop-addr2 prop-len2 phys.lo ... phys.hi )

Decode a unit-address from a prop-encoded array

02 1A

get-my-property

( name-str name-len
-- true | prop-addr prop-len false )

Returns the prop-format string for the given property name

02 1D

get-inherited-property

( name-str name-len
-- true | prop-addr prop-len false )

Returns the value string for the given property, searches parents' properties if not found

02 1F

get-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 Commonly-used Properties

Value

Function

Stack

Description

0116

reg

( phys.lo ... phys.hi size -- )

Declares location and size of device registers

0119

model

( str len -- )

Declares model# for this device, such as " SUNW,501-1623-01"

011A

device-type

( str len -- )

Declares type of device, e.g. " display", " block", " network", or " byte"

CR

name

( addr len -- )

Declares driver name, as in " SUNW,zebra"

0201

device-name

( str len -- )

Creates the "name" property with the given value


 


TABLE A-31 System Version Information

Value

Function

Stack

Description

87

fcode-revision

( -- n )

Returns major/minor FCode interface version


 


TABLE A-32 Device Activation Vector Setup

Value

Function

Stack

Description

01 1C

is-install

( xt -- )

Identifies "install" routine to allocate a frame buffer

01 1D

is-remove

( xt -- )

Identifies "remove" routine, to deallocate a frame buffer

01 1E

is-selftest

( xt -- )

Identifies "selftest" routine for this frame buffer

01 1F

new-device

( -- )

Creates a new device node

01 27

finish-device

( -- )

Completes current device


 


TABLE A-33 Self-test Utility Routines

Value

Function

Stack

Description

01 20

diagnostic-mode?

( -- diag? )

Returns true if extended diagnostics are desired

01 21

display-status

( n -- )

Obsolete

01 22

memory-test-suite

( addr len -- fail? )

Calls memory tester for given region

01 24

mask

( -- a-addr )

Variable, holds "mask" used by memory-test-suite


 


TABLE A-34 Time Utilities

Value

Function

Stack

Description

01 25

get-msecs

( -- n )

Returns the current number of milliseconds

01 26

ms

( n -- )

Delays for n milliseconds. Resolution is 1 millisecond

02 13

alarm

( xt n -- )

Periodically execute xt. If n=0, stop.


 


TABLE A-35 Machine-specific Support

Value

Function

Stack

Description

01 30

map-low

( phys.lo ... size -- virt )

Maps a region of memory in device's physical address space

01 31

sbus-intr>cpu

( sbus-intr# -- cpu-intr# )

Translates SBus interrupt# into CPU interrupt#




Note - TABLE A-35 through TABLE A-42 apply only to display device-types.




TABLE A-36 User-set Terminal Emulation Values

Value

Function

Stack

Description

01 50

#lines

( -- rows )

Number of lines of text being used for display. This word must be initialized (using to). fbx-install does this automatically

01 51

#columns

( -- columns )

Number of columns (chars/line) used for display. This word must be initialized (using to). fbx-install does this automatically


 


TABLE A-37 Terminal-set Terminal Emulation Values

Value

Function

Stack

Description

01 52

line#

( -- line# )

Current cursor position (row). 0 is top line

01 53

column#

( -- column# )

Current cursor position (column). 0 is left char.

01 54

inverse?

( -- white-on-black? )

True if output is inverted (white-on-black)

01 55

inverse-screen?

( -- black? )

True if screen has been inverted (black background)


 


TABLE A-38 Terminal Emulation Routines*

Value

Function

Stack

Description

01 57

draw-character

( char -- )

Paints the given character and advances the cursor

01 58

reset-screen

( -- )

Initializes the display device

01 59

toggle-cursor

( -- )

Draws or erases the cursor

01 5A

erase-screen

( -- )

Clears all pixels on the display

01 5B

blink-screen

( -- )

Flashes the display momentarily

01 5C

invert-screen

( -- )

Changes all pixels to the opposite color

01 5D

insert-characters

( n -- )

Inserts n blanks just before the cursor

01 5E

delete-characters

( n -- )

Deletes n characters to the right of the cursor Remaining chars slide left

01 5F

insert-lines

( n -- )

Inserts n blank lines just before the current line, lower lines are scrolled downward

01 60

delete-lines

( n -- )

Deletes n lines starting with the current line, lower lines are scrolled upward

01 61

draw-logo

( line# addr width height -- )

Draws the logo

*defer-type loadable routines.


 


TABLE A-39 Frame Buffer Parameter Values*

Value

Function

Stack

Description

016C

char-height

( -- height )

Height (in pixels) of a character (usually 22)

016D

char-width

( -- width )

Width (in pixels) of a character (usually 12)

016F

fontbytes

( -- bytes )

Number of bytes/scan line for font entries (usually 2)

0162

frame-buffer-adr

( -- addr )

Address of frame buffer memory

0163

screen-height

( -- height )

Total height of the display (in pixels)

0164

screen-width

( -- width )

Total width of the display (in pixels)

0165

window-top

( -- border-height )

Distance (in pixels) between display top and text window

0166

window-left

( -- border-width )

Distance (in pixels) between display left edge and text window left edge

*These must all be initialized before using any fbx- routines.


 


TABLE A-40 Font Operators

Value

Function

Stack

Description

016A

default-font

( -- addr width height advance min- char #glyphs )

Returns default font values, plugs directly into set-font

016B

set-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 One-bit Frame Buffer Utilities

Value

Function

Stack

Description

0170

fb1-draw-character

( char -- )

Paints the character and advance the cursor

0171

fb1-reset-screen

( -- )

Initializes the display device (noop)

0172

fb1-toggle-cursor

( -- )

Draws or erases the cursor

0173

fb1-erase-screen

( -- )

Clears all pixels on the display

0174

fb1-blink-screen

( -- )

Inverts the screen, twice (slow)

0175

fb1-invert-screen

( -- )

Changes all pixels to the opposite color

0176

fb1-insert-characters

( n -- )

Inserts n blanks just before the cursor

0177

fb1-delete-characters

( n -- )

Deletes n characters, starting at with cursor character, rightward. Remaining chars slide left

0178

fb1-insert-lines

( n -- )

Inserts n blank lines just before the current line, lower lines are scrolled downward

0179

fb1-delete-lines

( n -- )

Deletes n lines starting with the current line, lower lines are scrolled upward

017A

fb1-draw-logo

( line# addr width height -- )

Draws the logo

017B

fb1-install

( width height #columns #lines -- )

Installs the one-bit built-in routines

017C

fb1-slide-up

( n -- )

Like fb1-delete-lines, but doesn't clear lines at bottom


 


TABLE A-42 Eight-bit Frame Buffer Utilities

Value

Function

Stack

Description

0180

fb8-draw-character

( char -- )

Paints the character and advance the cursor

0181

fb8-reset-screen

( -- )

Initializes the display device (noop)

0182

fb8-toggle-cursor

( -- )

Draws or erases the cursor

0183

fb8-erase-screen

( -- )

Clears all pixels on the display

0184

fb8-blink-screen

( -- )

Inverts the screen, twice (slow)

0185

fb8-invert-screen

( -- )

Changes all pixels to the opposite color

0186

fb8-insert-characters

( n -- )

Inserts n blanks just before the cursor

0187

fb8-delete-characters

( n -- )

Deletes n characters starting with cursor char, rightward. Remaining chars slide left

0188

fb8-insert-lines

( n -- )

Inserts n blank lines just before the current line, lower lines are scrolled downward

0189

fb8-delete-lines

( n -- )

Deletes n lines starting with the current line, lower lines are scrolled upward

018A

fb8-draw-logo

( line# addr width height -- )

Draws the logo

018B

fb8-install

( width height #columns #lines -- )

Installs the eight-bit built-in routines


 


TABLE A-43 Package Support

Value

Function

Stack

Description

0129

push-package

( phandle -- )

Make phandle the active package

012A

pop-package

( -- )

Undo the effect of the most recent push-package relative to each execution of pop-package

012B

interpose

( adr len phandle -- )

Can add more capabilities on top of unmodified OpenBoot device drivers

023C

peer

( phandle -- phandle.sibling )

Returns phandle of package that is the next child of the the parent of the package

023B

child

( phandle.parent -- phandle.child )

Returns phandle of the package that is the first child of the package parent phandle

0204

find-package

( name-str name-len -- false | phandle true )

Finds a package named name-str

0205

open-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-lenarg-str arg-len then opens it with arguments

020A

my-parent

( -- ihandle )

Returns the ihandle of the parent of the current package instance

0203

my-self

( -- ihandle )

Returns the ihandle of currently-executing package instance

020B

ihandle>phandle

( ihandle -- phandle )

Converts an ihandle to a phandle

0206

close-package

( ihandle -- )

Closes an instance of a package

0207

find-method

( method-str method-len phandle -- false | xt true )

Finds the method (command) named method-str in the package phandle

0208

call-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

0202

my-args

( -- arg-str arg-len )

Returns the argument string passed when this package was opened

020D

my-unit

( -- phys.lo ... phys.hi )

Returns the physical unit number pair for this package

0102

my-address

( -- phys.lo ... )

Returns the physical addr of this plug-in device. Phys is a "magic" number, usable by other routines

0103

my-space

( -- phys.hi )

Returns address space of plug-in device. Space is a "magic" number, usable by other routines


 


TABLE A-44 Asynchronous Support

Value

Function

Stack

Description

0213

alarm

( xt n -- )

Executes method (command) indicated by xt every n milliseconds

0219

user-abort

( ... -- ) ( R: ... -- )

Abort after alarm routine finishes execution


 


TABLE A-45 Miscellaneous Operations

Value

Function

Stack

Description

0214

(is-user-word)

( E: ... -- ??? )

( name-str name-len xt -- )

Creates a new word called name-str which executes xt

01A4

mac-address

( -- mac-str mac-len )

Returns the MAC address


 


TABLE A-46 Interpretation

Value

Function

Stack

Description

0215

suspend-fcode

( -- )

Suspends execution of FCode, resumes later if an undefined command is required


 


TABLE A-47 Error Handling

Value

Function

Stack

Description

0216

abort

( ... -- ) (R:... -- )

Aborts FCode execution, returns to the "ok" prompt

0217

catch

( ... xt -- ??? error-code | ??? false )

Executes xt, returns throw error code or 0 if throw not encountered

0218

throw

( ... error-code -- ??? error-code | ...)

Returns given error code to catch

FC

ferror

( -- )

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 FCodes by Byte Value

Value

Function

Stack

00

end0

( -- )

10

b(lit)

( -- n ) ( F: /FCode-num32/ -- )

11

b(')

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

12

b(")

( -- str len ) ( F: /FCode-string/ -- )

13

bbranch

( -- ) ( F: /FCode-offset/ -- )

14

b?branch

( don't-branch? -- ) ( F: /FCode-offset/ --)

15

b(loop)

( -- ) ( F: /FCode-offset/ -- )

16

b(+loop)

( delta -- ) ( F: /FCode-offset/ -- )

17

b(do)

( limit start -- ) ( F: /FCode-offset/ -- )

18

b(?do)

( limit start -- ) ( F: /FCode-offset/ -- )

19

i

( -- index ) ( R: sys -- sys )

1A

j

( -- index ) ( R: sys -- sys )

1B

b(leave)

( F: -- )

1C

b(of)

( sel of-val -- sel | <nothing> ) ( F: /FCode-offset/ -- )

1D

execute

( ... xt -- ??? )

1E

+

( nu1 nu2 -- sum )

1F

-

( nu1 nu2 -- diff )

20

*

( nu1 nu2 -- prod )

21

/

( n1 n2 -- quot )

22

mod

( n1 n2 -- rem )

23

and

( x1 x2 -- x3 )

24

or

( x1 x2 -- x3 )

25

xor

( x1 x2 -- x3 )

26

invert

( x1 -- x2 )

27

lshift

( x1 u -- x2 )

28

rshift

( x1 u -- x2 )

29

>>a

( x1 u -- x2 )

2A

/mod

( n1 n2 -- rem quot )

2B

u/mod

( u1 u2 -- urem uquot )

2C

negate

( n1 -- n2 )

2D

abs

( n -- u )

2E

min

( n1 n2 -- n1|n2 )

2F

max

( n1 n2 -- n1|n2 )

30

>r

( x -- ) ( R: -- x)

31

r>

( -- x ) ( R: x -- )

32

r@

( -- x ) ( R: x -- x )

33

exit

( -- ) (R: sys -- )

34

0=

( nulflag -- equal-to-0? )

35

0<>

( n -- not-equal-to-0? )

36

0<

( n -- less-than-0? )

37

0<=

( n -- less-or-equal-to-0? )

38

0>

( n -- greater-than-0? )

39

0>=

( n -- greater-or-equal-to-0? )

3A

<

( n1 n2 -- less? )

3B

>

( n1 n2 -- greater? )

3C

=

( x1 x2 -- equal? )

3D

<>

( x1 x2 -- not-equal? )

3E

u>

( u1 u2 -- unsigned-greater? )

3F

u<=

( u1 u2 -- unsigned-less-or-equal? )

40

u<

( u1 u2 -- unsigned-less? )

41

u>=

( u1 u2 -- unsigned-greater-or-equal? )

42

>=

( n1 n2 -- greater-or-equal? )

43

<=

( n1 n2 -- less-or-equal? )

44

between

( n min max -- min<=n<=max? )

45

within

( n min max -- min<=n<max? )

46

drop

( x -- )

47

dup

( x -- x x )

48

over

( x1 x2 -- x1 x2 x1 )

49

swap

( x1 x2 -- x2 x1 )

4A

rot

( x1 x2 x3 -- x2 x3 x1 )

4B

-rot

( x1 x2 x3 -- x3 x1 x2 )

4C

tuck

( x1 x2 -- x2 x1 x2 )

4D

nip

( x1 x2 -- x2 )

4E

pick

( xu ... x1 x0 u -- xu ... x1 x0 xu )

4F

roll

( xu ... x1 x0 u -- xu-1 ... x1 x0 xu )

50

?dup

( x -- 0 | x x)

51

depth

( -- u )

52

2drop

( x1 x2 -- )

53

2dup

( x1 x2 -- x1 x2 x1 x2 )

54

2over

( x1 x2 x3 x4 -- x1 x2 x3 x4 x1 x2 )

55

2swap

( x1 x2 x3 x4 -- x3 x4 x1 x2 )

56

2rot

( x1 x2 x3 x4 x5 x6 -- x3 x4 x5 x6 x1 x2 )

57

2/

( x1 -- x2 )

58

u2/

( x1 -- x2 )

59

2*

( x1 -- x2 )

5A

/c

( -- n )

5B

/w

( -- n )

5C

/l

( -- n )

5D

/n

( -- n )

5E

ca+

( addr1 index -- addr2 )

5F

wa+

( addr1 index -- addr2 )

60

la+

( addr1 index -- addr2 )

61

na+

( addr1 index -- addr2 )

62

char+

( addr1 -- addr2 )

63

wa1+

( addr1 -- addr2 )

64

la1+

( addr1 -- addr2 )

65

cell+

( addr1 -- addr2 )

66

chars

( nu1 -- nu2 )

67

/w*

( nu1 -- nu2 )

68

/l*

( nu1 -- nu2 )

69

cells

( nu1 -- nu2 )

6A

on

( a-addr -- )

6B

off

( a-addr -- )

6C

+!

( nu a-addr -- )

6D

@

( a-addr -- x )

6E

l@

( qaddr -- quad )

6F

w@

( waddr -- w )

70

<w@

( waddr -- n )

71

c@

( addr -- byte )

72

!

( x a-addr -- )

73

l!

( quad qaddr -- )

74

w!

( w waddr -- )

75

c!

( byte addr -- )

76

2@

( a-addr -- x1 x2 )

77

2!

( x1 x2 a-addr -- )

78

move

( src-addr dest-addr len -- )

79

fill

( addr len byte -- )

7A

comp

( addr1 addr2 len -- n )

7B

noop

( -- )

7C

lwsplit

( quad -- w1.lo w2.hi )

7D

wljoin

( w.lo w.hi -- quad )

7E

lbsplit

( quad -- b.lo b2 b3 b4.hi )

7F

bljoin

( bl.lo b2 b3 b4.hi -- quad )

80

wbflip

( w1 -- w2 )

81

upc

( char1 -- char2 )

82

lcc

( char1 -- char2 )

83

pack

( str len addr -- pstr )

84

count

( pstr -- str len )

85

body>

( a-addr -- xt )

86

>body

( xt -- a-addr )

87

fcode-revision

( -- n )

88

span

( -- a-addr )

89

unloop

( -- ) ( R: sys -- )

8A

expect

( addr len -- )

8B

alloc-mem

( len -- a-addr )

8C

free-mem

( a-addr len -- )

8D

key?

( -- pressed? )

8E

key

( -- char )

8F

emit

( char -- )

90

type

( text-str text-len -- )

91

(cr

( -- )

92

cr

( -- )

93

#out

( -- a-addr )

94

#line

( -- a-addr )

95

hold

( char -- )

96

<#

( -- )

97

u#>

( u -- str len )

98

sign

( n -- )

99

u#

( u1 -- u2 )

9A

u#s

( u1 -- u2 )

9B

u.

( u -- )

9C

u.r

( u size -- )

9D

.

( nu -- )

9E

.r

( n size -- )

9F

.s

( ... -- ... )

A0

base

( -- a-addr )

A2

$number

( addr len -- true | n false )

A3

digit

( char base -- digit true | char false )

A4

-1

( -- -1 )

A5

0

( -- 0 )

A6

1

( -- 1 )

A7

2

( -- 2 )

A8

3

( -- 3 )

A9

bl

( -- 0x20 )

AA

bs

( -- 0x08 )

AB

bell

( -- 0x07 )

AC

bounds

( n cnt -- n+cnt n )

AD

here

( -- addr )

AE

aligned

( n1 -- n1|a-addr )

AF

wbsplit

( w -- b1.lo b2.hi )

B0

bwjoin

( b.lo b.hi -- w )

B1

b(<mark)

( F: -- )

B2

b(>resolve)

( -- ) ( F: -- )

B5

new-token

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

B6

named-token

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

B7

b(:)

( E: ... -- ??? ) ( F: -- colon-sys )

B8

b(value)

( E: -- x ) ( F: x -- )

B9

b(variable)

( E: -- a-addr ) ( F: -- )

BA

b(constant)

( E: -- n ) ( F: n -- )

BB

b(create)

( E: -- a-addr ) ( F: -- )

BC

b(defer)

( E: ... -- ??? ) ( F: -- )

BD

b(buffer:)

( E: -- a-addr ) ( F: size -- )

BE

b(field)

( E: addr -- addr+offset ) ( F: offset size -- offset+size )

C0

instance

( -- )

C2

b(;)

( -- ) ( F: colon-sys -- )

C3

b(to)

( x -- )

C4

b(case)

( sel -- sel ) ( F: -- )

C5

b(endcase)

( sel | <nothing> -- ) ( F: -- )

C6

b(endof)

( -- ) ( F: /FCode-offset/ -- )

C7

#

( ud1 -- ud2 )

C8

#s

( ud -- 0 0 )

C9

#>

( ud -- str len )

CA

external-token

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

CB

$find

( name-str name-len -- xt true | name-str name-len false )

CC

offset16

( -- )

CD

evaluate

( ... str len -- ??? )

D0

c,

( byte -- )

D1

w,

( w -- )

D2

l,

( quad -- )

D3

,

( x -- )

D4

um*

( u1 u2 -- ud.prod )

D5

um/mod

( ud u -- urem uquot )

D8

d+

( d1 d2 --d.sum )

D9

d-

( d1 d2 -- d.diff )

DA

get-token

( fcode# -- xt immediate? )

DB

set-token

( xt immediate? fcode# -- )

DC

state

( -- a-addr )

DD

compile,

( xt -- )

DE

behavior

( defer-xt -- contents-xt )

F0

start0

( -- )

F1

start1

( -- )

F2

start2

( -- )

F3

start4

( -- )

FC

ferror

( -- )

FD

version1

( -- )

FF

end1

( -- )

0102

my-address

( -- phys.lo ... )

0103

my-space

( -- phys.hi )

0105

free-virtual

( virt size -- )

0110

property

( prop-addr prop-len name-str name-len -- )

0111

encode-int

( n -- prop-addr prop-len )

0112

encode+

( prop-addr1 prop-len1 prop-addr2 prop-len2 -- prop-addr3 prop-len3 )

0113

encode-phys

( phys.lo ... phys.hi -- prop-addr prop-len )

0114

encode-string

( str len -- prop-addr prop-len )

0115

encode-bytes

( data-addr data-len -- prop-addr prop-len )

0116

reg

( phys.lo ... phys.hi size -- )

0119

model

( str len -- )

011A

device-type

( str len -- )

011B

parse-2int

( str len -- val.lo val.hi )

011C

is-install

( xt -- )

011D

is-remove

( xt -- )

011E

is-selftest

( xt -- )

011F

new-device

( -- )

0120

diagnostic-mode?

( -- diag? )

0121

display-status

( n -- )

0122

memory-test-suite

( addr len -- fail? )

0124

mask

( -- a-addr )

0125

get-msecs

( -- n )

0126

ms

( n -- )

0127

finish-device

( -- )

0128

decode-phys

( prop-addr1 prop-len1 -- prop-addr2 prop-len2 phys.lo ... phys.hi )

0129

push-package

( phandle -- )

012A

pop-package

( -- )

012B

interpose

( adr len phandle -- )

0130

map-low

( phys.lo ... size -- virt )

0131

sbus-intr>cpu

( sbus-intr# -- cpu-intr# )

0150

#lines

( -- rows )

0151

#columns

( -- columns )

0152

line#

( -- line# )

0153

column#

( -- column# )

0154

inverse?

( -- white-on-black? )

0155

inverse-screen?

( -- black? )

0157

draw-character

( char -- )

0158

reset-screen

( -- )

0159

toggle-cursor

( -- )

015A

erase-screen

( -- )

015B

blink-screen

( -- )

015C

invert-screen

( -- )

015D

insert-characters

( n -- )

015E

delete-characters

( n -- )

015F

insert-lines

( n -- )

0160

delete-lines

( n -- )

0161

draw-logo

( line# addr width height -- )

0162

frame-buffer-adr

( -- addr )

0163

screen-height

( -- height )

0164

screen-width

( -- width )

0165

window-top

( -- border-height )

0166

window-left

( -- border-width )

016A

default-font

( -- addr width height advance min-char #glyphs )

016B

set-font

( addr width height advance min-char #glyphs -- )

016C

char-height

( -- height )

016D

char-width

( -- width )

016E

>font

( char -- addr )

016F

fontbytes

( -- bytes )

0170

fb1-draw-character

( char -- )

0171

fb1-reset-screen

( -- )

0172

fb1-toggle-cursor

( -- )

0173

fb1-erase-screen

( -- )

0174

fb1-blink-screen

( -- )

0175

fb1-invert-screen

( -- )

0176

fb1-insert-characters

( n -- )

0177

fb1-delete-characters

( n -- )

0178

fb1-insert-lines

( n -- )

0179

fb1-delete-lines

( n -- )

017A

fb1-draw-logo

( line# addr width height -- )

017B

fb1-install

( width height #columns #lines -- )

017C

fb1-slide-up

( n -- )

0180

fb8-draw-character

( char -- )

0181

fb8-reset-screen

( -- )

0182

fb8-toggle-cursor

( -- )

0183

fb8-erase-screen

( -- )

0184

fb8-blink-screen

( -- )

0185

fb8-invert-screen

( -- )

0186

fb8-insert-characters

( n -- )

0187

fb8-delete-characters

( n -- )

0188

fb8-insert-lines

( n -- )

0189

fb8-delete-lines

( n -- )

018A

fb8-draw-logo

( line# addr width height -- )

018B

fb8-install

( width height #columns #lines -- )

01A4

mac-address

( -- mac-str mac-len )

0201

device-name

( str len -- )

0202

my-args

( -- arg-str arg-len )

0203

my-self

( -- ihandle )

0204

find-package

( name-str name-len -- false | phandle true )

0205

open-package

( arg-str arg-len phandle -- ihandle | 0 )

0206

close-package

( ihandle -- )

0207

find-method

( method-str method-len phandle -- false | xt true )

0208

call-package

( ... xt ihandle -- ??? )

0209

$call-parent

( ... method-str method-len -- ??? )

020A

my-parent

( -- ihandle )

020B

ihandle>phandle

( ihandle -- phandle )

020D

my-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 )

0213

alarm

( xt n -- )

0214

(is-user-word)

( E: ... -- ??? ) ( name-str name-len xt -- )

0215

suspend-fcode

( -- )

0216

abort

( ... -- ) (R:... -- )

0217

catch

( ... xt -- ??? error-code | ??? false )

0218

throw

( ... error-code -- ??? error-code | ...)

0219

user-abort

( ... -- ) ( R: ... -- )

021A

get-my-property

( nam-str nam-len -- true | prop-addr prop-len false )

021B

decode-int

( prop-addr1 prop-len1 -- prop-addr2 prop-len2 n )

021C

decode-string

( prop-addr1 prop-len1 -- prop-addr2 prop-len2 str len )

021D

get-inherited-property

( nam-str nam-len -- true | prop-addr prop-len false )

021E

delete-property

( nam-str nam-len -- )

021F

get-package-property

( name-str name-len phandle -- true | prop-addr prop-len false )

0220

cpeek

( addr -- false | byte true )

0221

wpeek

( waddr -- false | w true )

0222

lpeek

( qaddr -- false | quad true )

0223

cpoke

( byte addr -- okay? )

0224

wpoke

( w waddr -- okay? )

0225

lpoke

( quad qaddr -- okay? )

0226

lwflip

( quad1 -- quad2 )

0227

lbflip

( quad1 -- quad2 )

0228

lbflips

( qaddr len -- )

0230

rb@

( addr -- byte )

0231

rb!

( byte addr -- )

0232

rw@

( waddr -- w )

0233

rw!

( w waddr -- )

0234

rl@

( qaddr -- quad )

0235

rl!

( quad qaddr -- )

0236

wbflips

( waddr len -- )

0237

lwflips

( qaddr len -- )

023B

child

( phandle.parent -- phandle.child )

023C

peer

( phandle -- phandle.sibling )

023D

next-property

( previous-str previous-len phandle -- false | name-str name-len true )

023E

byte-load

( addr xt -- )

023F

set-args

( arg-str arg-len unit-str unit-len -- )

0240

left-parse-string

( str len char -- R-str R-len L-str L-len )

022E

rx@

( xaddr -- o )

022F

rx!

( o xaddr -- )

0241

bxjoin

( b.lo b.2 b.3 b.4 b.5 b.6 b.7 b.hi -- o )

0242

<l@

( qaddr -- n )

0243

lxjoin

( quad.lo quad.hi -- o )

0244

wxjoin

( w.lo w.2 w.3 w.hi -- o )

0245

x,

( o -- )

0246

x@

( xaddr -- o )

0247

x!

( o xaddr -- )

0248

/x

( -- n )

0249

/x*

( nu1 -- nu2 )

024A

xa+

( addr1 index -- addr2 )

024B

xa1+

( addr1 -- addr2 )

024C

xbflip

( oct1 -- oct2 )

024D

xbflips

( xaddr len -- )

024E

xbsplit

( o -- b.lo b.2 b.3 b.4 b.5 b.6 b.7 b.hi )

024F

xlflip

( oct1 -- oct2 )

0250

xlflips

( xaddr len -- )

0251

xlsplit

( o -- quad.lo quad.hi )

0252

xwflip

( oct1 -- oct2 )

0253

xwflips

( xaddr len -- )

0254

xwsplit

( o -- w.lo w.2 w.3 w.hi )


TABLE A-49 Tokenizer Directives

Value

Function

Stack

-

(

( [text<)> --)

-

]tokenizer

( -- )

-

\

( -- )

-

alias

( E: ... -- ???)

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

-

decimal

( -- )

-

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 )

CR

1+

( nu1 -- nu2 )

CR

1-

( nu1 -- nu2 )

CR

2+

( nu1 -- nu2 )

CR

2-

( nu1 -- nu2 )

CR

accept

( addr len1 -- len2 )

CR

again

( C: dest-sys -- )

CR

allot

( len -- )

CR

ascii

( [text< >] -- char )

CR

begin

( C: -- dest-sys ) ( -- )

CR

blank

( addr len -- )

CR

buffer:

( E: -- a-addr ) ( len "new-name< >" -- )

CR

/c*

( nu1 -- nu2 )

CR

ca1+

( addr1 -- addr2 )

CR

carret

( -- 0x0D )

CR

case

( C: -- case-sys) ( sel -- sel )

CR

constant

( E: -- x ) ( x "new-name< >" -- )

CR

control

( [text< >] -- char )

CR

create

( E: -- a-addr ) ( "new-name< >" -- )

CR

d#

( [number< >] -- n )

CR

.d

( n -- )

CR

decimal

( -- )

CR

decode-bytes

( prop-addr1 prop-len1 data-len -- prop-addr2 prop-len2 data-addr data-len )

CR

defer

( E: ... -- ??? ) ( "new-name< >" -- )

CR

do

( C: -- dodest-sys ) ( limit start -- ) (R: -- sys )

CR

?do

( C: -- dodest-sys ) ( limit start -- ) ( R: -- sys )

CR

3drop

( x1 x2 x3 -- )

CR

3dup

( x1 x2 x3 -- x1 x2 x3 x1 x2 x3 )

CR

else

( C: orig-sys1 -- orig-sys2 ) ( -- )

CR

endcase

( C: case-sys -- ) ( sel | <nothing> -- )

CR

endof

( C: case-sys1 of-sys -- case-sys2 ) ( -- )

CR

erase

( addr len -- )

CR

eval

( ... str len -- ??? )

CR

false

( -- false )

CR

fcode-version2

( -- )

CR

fcode-version3

( -- )

CR

field

( E: addr -- addr+offset ) ( offset size "new-name< >" -- offset+size )

CR

h#

( [number< >] -- n )

CR

.h

( n -- )

CR

hex

( -- )

CR

if

( C: -- orig-sys ) ( do-next? -- )

CR

leave

( -- ) ( R: sys -- )

CR

?leave

( exit? -- ) ( R: sys -- )

CR

linefeed

( -- 0x0A )

CR

loop

( C: dodest-sys -- ) ( -- ) ( R: sys1 -- <nothing> | sys2)

CR

+loop

( C: dodest-sys -- ) ( delta -- ) ( R: sys1 -- <nothing> | sys2 )

CR

/n*

( nu1 -- nu2 )

CR

na1+

( addr1 -- addr2 )

CR

not

( x1 -- x2 )

CR

of

( C: case-sys1 -- case-sys2 of-sys ) ( sel of-val -- sel | <nothing> )

CR

repeat

( C: orig-sys dest-sys -- ) ( -- )

CR

s"

( [text<">] -- test-str text-len )

CR

s.

( n -- )

CR

space

( -- )

CR

spaces

( cnt -- )

CR

struct

( -- 0 )

CR

then

( C: orig-sys -- ) ( -- )

CR

to

( param [old-name< >] -- )

CR

true

( -- true )

CR

(u.)

( u -- str len )

CR

until

( C: dest-sys -- ) ( done? -- )

CR

value

( E: -- x) ( x "new-name< >"-- )

CR

variable

( E: -- a-addr ) ( "new-name< >"-- )

CR

while

( C: dest-sys -- orig-sys dest-sys ) ( continue? -- )


 


FCodes by Name

The following table lists, in alphabetic order, currently-assigned FCodes.


TABLE A-50 FCodes and Tokenizer Directives by Name

Value

Function

Stack

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

<>

( n1 n2 -- not-equal? )

3C

=

( n1 n2 -- equal? )

0B

>

( n1 n2 -- greater? )

42

>=

( n1 n2 -- greater-or-equal? )

CR

>>

( x1 u -- x2 )

CR

?

( addr -- )

6D

@

( a-addr -- x )

CR

[']

( [old-name< >] -- xt )

-

\

( -- )

-

]tokenizer

( -- )

A5

0

( -- 0 )

36

0<

( n -- less-than-0? )

37

0<=

( n -- less-or-equal-to-0? )

35

0<>

( n -- not-equal-to-0? )

34

0=

( nulflag -- equal-to-0? )

38

0>

( n -- greater-than-0? )

39

0>=

( n -- greater-or-equal-to-0? )

A6

1

( -- 1 )

CR

1+

( nu1 -- nu2 )

CR

1-

( nu1 -- nu2 )

A4

-1

( -- -1 )

A7

2

( -- 2 )

77

2!

( x1 x2 a-addr -- )

59

2*

( x1 -- x2 )

CR

2+

( nu1 -- nu2 )

CR

2-

( nu1 -- nu2 )

57

2/

( x1 -- x2 )

76

2@

( a-addr -- x1 x2 )

A8

3

( -- 3 )

29

>>a

( x1 u -- x2 )

0216

abort

( ... -- ) (R:... -- )

2D

abs

( n -- u )

CR

accept

( addr len1 -- len2 )

CR

again

( C: dest-sys -- )

0213

alarm

( xt n -- )

-

alias

( E: ... -- ???) ( "new-name< >old-name< >" -- )

AE

aligned

( n1 -- n1|a-addr )

8B

alloc-mem

( len -- a-addr )

CR

allot

( len -- )

23

and

( x1 x2 -- x3 )

CR

ascii

( [text< >] -- char )

12

b(")

( -- str len ) ( F: /FCode-string/ -- )

11

b(')

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

B7

b(:)

( E: ... -- ??? ) ( F: -- colon-sys )

C2

b(;)

( -- ) ( F: colon-sys -- )

A0

base

( -- a-addr )

13

bbranch

( -- ) ( F: /FCode-offset/ -- )

14

b?branch

( don't-branch? -- ) ( F: /FCode-offset/ --)

BD

b(buffer:)

( E: -- a-addr ) ( F: size -- )

C4

b(case)

( sel -- sel ) ( F: -- )

BA

b(constant)

( E: -- n ) ( F: n -- )

BB

b(create)

( E: -- a-addr ) ( F: -- )

BC

b(defer)

( E: ... -- ??? ) ( F: -- )

17

b(do)

( limit start -- ) ( F: /FCode-offset/ -- )

18

b(?do)

( limit start -- ) ( F: /FCode-offset/ -- )

CR

begin

( C: -- dest-sys ) ( -- )

DE

behavior

( defer-xt -- contents-xt )

AB

bell

( -- 0x07 )

C5

b(endcase)

( sel | <nothing> -- ) ( F: -- )

C6

b(endof)

( -- ) ( F: /FCode-offset/ -- )

44

between

( n min max -- min<=n<=max? )

BE

b(field)

( E: addr -- addr+offset ) ( F: offset size -- offset+size )

A9

bl

( -- 0x20 )

CR

blank

( addr len -- )

1B

b(leave)

( F: -- )

015B

blink-screen

( -- )

10

b(lit)

( -- n ) ( F: /FCode-num32/ -- )

7F

bljoin

( bl.lo b2 b3 b4.hi -- quad )

15

b(loop)

( -- ) ( F: /FCode-offset/ -- )

16

b(+loop)

( delta -- ) ( F: /FCode-offset/ -- )

B1

b(<mark)

( F: -- )

85

body>

( a-addr -- xt )

86

>body

( xt -- a-addr )

1C

b(of)

( sel of-val -- sel | <nothing> ) ( F: /FCode-offset/ -- )

AC

bounds

( n cnt -- n+cnt n )

B2

b(>resolve)

( -- ) ( F: -- )

AA

bs

( -- 0x08 )

C3

b(to)

( x -- )

CR

buffer:

( E: -- a-addr ) ( len "new-name< >" -- )

B8

b(value)

( E: -- x ) ( F: x -- )

B9

b(variable)

( E: -- a-addr ) ( F: -- )

B0

bwjoin

( b.lo b.hi -- w )

02 41

bxjoin

( b.lo b.2 b.3 b.4 b.5 b.6 b.7 b.hi -- o )

023E

byte-load

( addr xt -- )

75

c!

( byte addr -- )

D0

c,

( byte -- )

5A

/c

( -- n )

-

/c*

( nu1 -- nu2 )

71

c@

( addr -- byte )

5E

ca+

( addr1 index -- addr2 )

CR

ca1+

( addr1 -- addr2 )

62

char+

( addr1 -- addr2 )

020E

$call-method

( ... method-str method-len ihandle -- ??? )

0208

call-package

( ... xt ihandle -- ??? )

0209

$call-parent

( ... method-str method-len -- ??? )

CR

carret

( -- 0x0D )

CR

case

( C: -- case-sys) ( sel -- sel )

0217

catch

( ... xt -- ??? error-code | ??? false )

65

cell+

( addr1 -- addr2 )

69

cells

( nu1 -- nu2 )

62

char+

( addr1 -- addr2 )

016C

char-height

( -- height )

66

chars

( nu1 -- nu2 )

016D

char-width

( -- width )

0236

child

( phandle.parent -- phandle.child )

0206

close-package

( ihandle -- )

0153

column#

( -- column# )

0151

#columns

( -- columns )

7A

comp

( addr1 addr2 len -- n )

DD

compile,

( xt -- )

CR

constant

( E: -- x ) ( x "new-name< >" -- )

CR

control

( [text< >] -- char )

84

count

( pstr -- str len )

0220

cpeek

( addr -- false | byte true )

0223

cpoke

( byte addr -- okay? )

92

cr

( -- )

91

(cr

( -- )

CR

create

( E: -- a-addr ) ( "new-name< >" -- )

CR

d#

( [number< >] -- n )

D8

d+

( d1 d2 --d.sum )

D9

d-

( d1 d2 -- d.diff )

CR

.d

( n -- )

-

decimal

( -- )

CR

decimal

( -- )

021B

decode-int

( prop-addr1 prop-len1 -- prop-addr2 prop-len2 n )

0128

decode-phys

( prop-addr1 prop-len1 -- prop-addr2 prop-len2 phys.lo ... phys.hi )

021C

decode-string

( prop-addr1 prop-len1 -- prop-addr2 prop-len2 str len )

016A

default-font

( -- addr width height advance min-char #glyphs )

CR

defer

( E: ... -- ??? ) ( "new-name< >" -- )

015E

delete-characters

( n -- )

0160

delete-lines

( n -- )

021E

delete-property

( nam-str nam-len -- )

51

depth

( -- u )

0201

device-name

( str len -- )

011A

device-type

( str len -- )

0120

diagnostic-mode?

( -- diag? )

A3

digit

( char base -- digit true | char false )

0121

display-status

( n -- )

CR

do

( C: -- dodest-sys ) ( limit start -- ) (R: -- sys )

CR

?do

( C: -- dodest-sys ) ( limit start -- ) ( R: -- sys )

0157

draw-character

( char -- )

0161

draw-logo

( line# addr width height -- )

46

drop

( x -- )

52

2drop

( x1 x2 -- )

CR

3drop

( x1 x2 x3 -- )

47

dup

( x -- x x )

53

2dup

( x1 x2 -- x1 x2 x1 x2 )

CR

3dup

( x1 x2 x3 -- x1 x2 x3 x1 x2 x3 )

50

?dup

( x -- 0 | x x)

CR

else

( C: orig-sys1 -- orig-sys2 ) ( -- )

8F

emit

( char -- )

0112

encode+

( prop-addr1 prop-len1 prop-addr2 prop-len2 -- prop-addr3 prop-len3 )

0115

encode-bytes

( data-addr data-len -- prop-addr prop-len )

0111

encode-int

( n -- prop-addr prop-len )

0113

encode-phys

( phys.lo ... phys.hi -- prop-addr prop-len )

0114

encode-string

( str len -- prop-addr prop-len )

00

end0

( -- )

FF

end1

( -- )

CR

endcase

( C: case-sys -- ) ( sel | <nothing> -- )

CR

endof

( C: case-sys1 of-sys -- case-sys2 ) ( -- )

CR

erase

( addr len -- )

015A

erase-screen

( -- )

CR

eval

( ... str len -- ??? )

CD

evaluate

(... str len -- ??? )

1D

execute

( ... xt -- ??? )

33

exit

( -- ) (R: sys -- )

8A

expect

( addr len -- )

-

external

( -- )

CA

external-token

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

CR

false

( -- false )

0174

fb1-blink-screen

( -- )

0177

fb1-delete-characters

( n -- )

0179

fb1-delete-lines

( n -- )

0170

fb1-draw-character

( char -- )

017A

fb1-draw-logo

( line# addr width height -- )

0173

fb1-erase-screen

( -- )

0176

fb1-insert-characters

( n -- )

0178

fb1-insert-lines

( n -- )

017B

fb1-install

( width height #columns #lines -- )

0175

fb1-invert-screen

( -- )

0171

fb1-reset-screen

( -- )

017C

fb1-slide-up

( n -- )

0172

fb1-toggle-cursor

( -- )

0184

fb8-blink-screen

( -- )

0187

fb8-delete-characters

( n -- )

0189

fb8-delete-lines

( n -- )

0180

fb8-draw-character

( char -- )

018A

fb8-draw-logo

( line# addr width height -- )

0183

fb8-erase-screen

( -- )

0186

fb8-insert-characters

( n -- )

0188

fb8-insert-lines

( n -- )

018B

fb8-install

( width height #columns #lines -- )

0185

fb8-invert-screen

( -- )

0181

fb8-reset-screen

( -- )

0182

fb8-toggle-cursor

( -- )

87

fcode-revision

( -- n )

CR

fcode-version2

( -- )

FC

ferror

( -- )

CR

field

( E: addr -- addr+offset ) ( offset size "new-name< >" -- offset+size )

79

fill

( addr len byte -- )

CB

$find

( name-str name-len -- xt true | name-str name-len false )

0207

find-method

( method-str method-len phandle -- false | xt true )

0204

find-package

( name-str name-len -- false | phandle true )

0127

finish-device

( -- )

016E

>font

( char -- addr )

-

fload

( [filename<cr>] -- )

016F

fontbytes

( -- bytes )

0162

frame-buffer-adr

( -- addr )

8C

free-mem

( a-addr len -- )

0105

free-virtual

( virt size -- )

021d

get-inherited-property

( nam-str nam-len -- true | prop-addr prop-len false )

0125

get-msecs

( -- n )

021A

get-my-property

( nam-str nam-len -- true | prop-addr prop-len false )

021F

get-package-property

( name-str name-len phandle -- true | prop-addr prop-len false )

DA

get-token

( fcode# -- xt immediate? )

CR

h#

( [number< >] -- n )

CR

.h

( n -- )

-

headerless

( -- )

-

headers

( -- )

AD

here

( -- addr )

-

hex

( -- )

CR

hex

( -- )

95

hold

( char -- )

19

i

( -- index ) ( R: sys -- sys )

CR

if

( C: -- orig-sys ) ( do-next? -- )

020B

ihandle>phandle

( ihandle -- phandle )

015D

insert-characters

( n -- )

015F

insert-lines

( n -- )

C0

instance

( -- )

01 2B

interpose

( adr len phandle -- )

0154

inverse?

( -- white-on-black? )

0155

inverse-screen?

( -- black? )

26

invert

( x1 -- x2 )

015C

invert-screen

( -- )

011C

is-install

( xt -- )

011D

is-remove

( xt -- )

011E

is-selftest

( xt -- )

0214

(is-user-word)

( E: ... -- ??? ) ( name-str name-len xt -- )

1A

j

( -- index ) ( R: sys -- sys )

8E

key

( -- char )

8D

key?

( -- pressed? )

73

l!

( quad qaddr -- )

D2

l,

( quad -- )

6E

l@

( qaddr -- quad )

02 42

<l@

( qaddr -- n )

5C

/l

( -- n )

68

/l*

( nu1 -- nu2 )

60

la+

( addr1 index -- addr2 )

64

la1+

( addr1 -- addr2 )

0227

lbflip

( quad1 -- quad2 )

0228

lbflips

( qaddr len -- )

7E

lbsplit

( quad -- b.lo b2 b3 b4.hi )

82

lcc

( char1 -- char2 )

CR

leave

( -- ) ( R: sys -- )

CR

?leave

( exit? -- ) ( R: sys -- )

0240

left-parse-string

( str len char -- R-str R-len L-str L-len )

0152

line#

( -- line# )

94

#line

( -- a-addr )

CR

linefeed

( -- 0x0A )

0150

#lines

( -- rows )

CR

loop

( C: dodest-sys -- ) ( -- ) ( R: sys1 -- <nothing> | sys2)

CR

+loop

( C: dodest-sys -- ) ( delta -- ) ( R: sys1 -- <nothing> | sys2 )

0222

lpeek

( qaddr -- false | quad true )

0225

lpoke

( quad qaddr -- okay? )

27

lshift

( x1 u -- x2 )

0226

lwflip

( quad1 -- quad2 )

0237

lwflips

( qaddr len -- )

7C

lwsplit

( quad -- w1.lo w2.hi )

02 43

lxjoin

( quad.lo quad.hi -- o )

01A4

mac-address

( -- mac-str mac-len )

0130

map-low

( phys.lo ... size -- virt )

0124

mask

( -- a-addr )

2F

max

( n1 n2 -- n1|n2 )

0122

memory-test-suite

( addr len -- fail? )

2E

min

( n1 n2 -- n1|n2 )

22

mod

( n1 n2 -- rem )

2A

/mod

( n1 n2 -- rem quot )

0119

model

( str len -- )

78

move

( src-addr dest-addr len -- )

0126

ms

( n -- )

0102

my-address

( -- phys.lo ... )

0202

my-args

( -- arg-str arg-len )

020A

my-parent

( -- ihandle )

0203

my-self

( -- ihandle )

0103

my-space

( -- phys.hi )

020D

my-unit

( -- phys.lo ... phys.hi )

5D

/n

( -- n )

CR

/n*

( nu1 -- nu2 )

61

na+

( addr1 index -- addr2 )

CR

na1+

( addr1 -- addr2 )

B6

named-token

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

2C

negate

( n1 -- n2 )

011F

new-device

( -- )

B5

new-token

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

023D

next-property

( previous-str previous-len phandle -- false | name-str name-len true )

4D

nip

( x1 x2 -- x2 )

7B

noop

( -- )

CR

not

( x1 -- x2 )

A2

$number

( addr len -- true | n false )

CR

of

( C: case-sys1 -- case-sys2 of-sys ) ( sel of-val -- sel | <nothing> )

6B

off

( a-addr -- )

CC

offset16

( -- )

6A

on

( a-addr -- )

0205

open-package

( arg-str arg-len phandle -- ihandle | 0 )

020F

$open-package

( arg-str arg-len name-str name-len -- ihandle | 0 )

24

or

( x1 x2 -- x3 )

93

#out

( -- a-addr )

48

over

( x1 x2 -- x1 x2 x1 )

54

2over

( x1 x2 x3 x4 -- x1 x2 x3 x4 x1 x2 )

83

pack

( str len addr -- pstr )

011B

parse-2int

( str len -- val.lo val.hi )

023C

peer

( phandle -- phandle.sibling )

4E

pick

( xu ... x1 x0 u -- xu ... x1 x0 xu )

0110

property

( prop-addr prop-len name-str name-len -- )

012A

pop-package

( -- )

0129

push-package

( phandle -- )

31

r>

( -- x ) ( R: x -- )

32

r@

( -- x ) ( R: x -- x )

9E

.r

( n size -- )

30

>r

( x -- ) ( R: -- x)

0231

rb!

( byte addr -- )

0230

rb@

( addr -- byte )

0116

reg

( phys.lo ... phys.hi size -- )

CR

repeat

( C: orig-sys dest-sys -- ) ( -- )

0158

reset-screen

( -- )

0235

rl!

( quad qaddr -- )

0234

rl@

( qaddr -- quad )

4F

roll

( xu ... x1 x0 u -- xu-1 ... x1 x0 xu )

4A

rot

( x1 x2 x3 -- x2 x3 x1 )

4B

-rot

( x1 x2 x3 -- x3 x1 x2 )

56

2rot

( x1 x2 x3 x4 x5 x6 -- x3 x4 x5 x6 x1 x2 )

28

rshift

( x1 u -- x2 )

0233

rw!

( w waddr -- )

0232

rw@

( waddr -- w )

022E

rx@

( xaddr -- o )

022F

rx!

( o xaddr -- )

CR

s"

( [text<">] -- test-str text-len )

CR

s.

( n -- )

C8

#s

( ud -- 0 0 )

9F

.s

( ... -- ... )

0131

sbus-intr>cpu

( sbus-intr# -- cpu-intr# )

0163

screen-height

( -- height )

0164

screen-width

( -- width )

023F

set-args

( arg-str arg-len unit-str unit-len -- )

016B

set-font

( addr width height advance min-char #glyphs -- )

DB

set-token

( xt immediate? fcode# -- )

98

sign

( n -- )

CR

space

( -- )

CR

spaces

( cnt -- )

88

span

( -- a-addr )

F0

start0

( -- )

F1

start1

( -- )

F2

start2

( -- )

F3

start4

( -- )

DC

state

( -- a-addr )

CR

struct

( -- 0 )

0215

suspend-fcode

( -- )

49

swap

( x1 x2 -- x2 x1 )

55

2swap

( x1 x2 x3 x4 -- x3 x4 x1 x2 )

CR

then

( C: orig-sys -- ) ( -- )

0218

throw

( ... error-code -- ??? error-code | ...)

CR

to

( param [old-name< >] -- )

0159

toggle-cursor

( -- )

-

tokenizer[

( -- )

CR

true

( -- true )

4C

tuck

( x1 x2 -- x2 x1 x2 )

90

type

( text-str text-len -- )

99

u#

( u1 -- u2 )

97

u#>

( u -- str len )

9A

u#s

( u1 -- u2 )

9B

u.

( u -- )

40

u<

( u1 u2 -- unsigned-less? )

3F

u<=

( u1 u2 -- unsigned-less-or-equal? )

3E

u>

( u1 u2 -- unsigned-greater? )

41

u>=

( u1 u2 -- unsigned-greater-or-equal? )

CR

(u.)

( n -- addr len )

58

u2/

( x1 -- x2 )

D4

um*

( u1 u2 -- ud.prod )

D5

um/mod

( ud u -- urem uquot )

2B

u/mod

( u1 u2 -- urem uquot )

89

unloop

( -- ) ( R: sys -- )

CR

until

( C: dest-sys -- ) ( done? -- )

81

upc

( char1 -- char2 )

9C

u.r

( u size -- )

0219

user-abort

( ... -- ) ( R: ... -- )

CR

value

( E: -- x) ( x "new-name< >"-- )

CR

variable

( E: -- a-addr ) ( "new-name< >"-- )

FD

version1

( -- )

74

w!

( w waddr -- )

D1

w,

( w -- )

6F

w@

( waddr -- w )

5B

/w

( -- n )

67

/w*

( nu1 -- nu2 )

70

<w@

( waddr -- n )

5F

wa+

( addr1 index -- addr2 )

63

wa1+

( addr1 -- addr2 )

80

wbflip

( w1 -- w2 )

0236

wbflips

( waddr len -- )

AF

wbsplit

( w -- b1.lo b2.hi )

CR

while

( C: dest-sys -- orig-sys dest-sys ) ( continue? -- )

0166

window-left

( -- border-width )

0165

window-top

( -- border-height )

45

within

( n min max -- min<=n<max? )

7D

wljoin

( w.lo w.hi -- quad )

0221

wpeek

( waddr -- false | w true )

0224

wpoke

( w waddr -- okay? )

0244

wxjoin

( w.lo w.2 w.3 w.hi -- o )

0245

x,

( o -- )

0246

x@

( xaddr -- o )

0247

x!

( o xaddr -- )

0248

/x

( -- n )

0249

/x*

( nu1 -- nu2 )

024a

xa+

( addr1 index -- addr2 )

024b

xa1+

( addr1 -- addr2 )

024c

xbflip

( oct1 -- oct2 )

024d

xbflips

( xaddr len -- )

024e

xbsplit

( o -- b.lo b.2 b.3 b.4 b.5 b.6 b.7 b.hi )

024f

xlflip

( oct1 -- oct2 )

0250

xlflips

( xaddr len -- )

0251

xlsplit

( o -- quad.lo quad.hi )

25

xor

( x1 x2 -- x3 )

0252

xwflip

( oct1 -- oct2 )

0253

xwflips

( xaddr len -- )

0254

xwsplit

( o -- w.lo w.2 w.3 w.hi )