config - Forth system specific words

Module Description

The config module contains the extension and missing words for a forth system.

Module Words

System Settings

sys.eol ( - c-addr )
Counted string for the end of line for the current system

sys.bits-in-byte ( - n )
Number of bits in a byte

sys.bits-in-char ( - n )
Number of bits in a char

sys.bits-in-cell ( - n )
Number of bits in a cell

sys.bigendian ( - f )
Check for bigendian hardware

Extension words

ms@ ( - u )
Fetch milliseconds timer

max-ms@ ( - u )
Maximum value of the milliseconds timer

2+ ( n - n+2 )
Add two to tos

lroll ( u1 u - u2 )
Rotate u1 u bits to the left

0! ( w - )
Set zero in address

nil! ( w - )
Set nil in address

nil= ( w - f )
Check for nil

nil<> ( w - f )
Check for unequal to nil

1+! ( w - )
Increase contents of address by 1

1-! ( w - )
Decrease contents of address by 1

@! ( w a - w )
First fetch the contents and then store the new value

<=> ( n n - n )
Compare two numbers and return the compare result [-1,0,1]

index2offset ( n:index n:length - n:offset )
Convert an index [-length..length> into an offset [0..length>

Float extension constants

0e0 ( - r:0e0 )
Float constant 0.0

1e0 ( - r:1e0 )
Float constant 1.0

2e0 ( - r:2e0 )
Float constant 2.0

Float extension words

f-rot ( r1 r2 r3 - r3 r1 r2 )
Rotate counter clockwise three floats

f2dup ( r1 r2 - r1 r2 r1 r2 )
Duplicate two floats

Exceptions

exp-index-out-of-range ( - n )
Index out of range exception number

exp-invalid-state ( - n )
Invalid state exception number

exp-no-data ( - n )
No data available exception number

exp-invalid-parameters ( - n )
Invalid parameters on stack


generated 09-Jan-2007 by ofcfrth-0.2.0