Quartus Forth is an ISO/ANS Forth Standard System:
#TIB CONVERT EXPECT QUERY SPAN TIB
);
FS. F. PRECISION SET-PRECISION F~
from the Floating-Point
Extensions word set;
AHEAD ASSEMBLER BYE CODE [ELSE] [IF] [THEN]
from
Programming-Tools Extensions word set;
-TRAILING CMOVE CMOVE>
);
INCLUDED
and REFILL
from the File Access
wordset.
The DragonBall CPU architecture mandates that word- and long-size reads and writes of RAM occur on even-byte boundaries. In Forth terms, cell- or double-cell-width reads and writes must occur on even-byte boundaries.
EMIT
for non-graphic characters: EMIT treats all characters as graphic. If the font selected has no character representation for a given value, a 'no-character' symbol (an unfilled rectangle) is displayed.
ACCEPT
and 6.2.1390 EXPECT
: Standard PalmOS editing facilities (marking text, undo, cut, copy, paste,
popup keyboard) are available in ACCEPT
. . Additionally, while
in the interpreter, the Page Up button retrieves the previously input line.
EXCEPT
, being obsolescent, is not provided
EMIT
, 6.1.1750 KEY
): Characters in the standard, large, and bold PalmPilot fonts from 0x20 to 0x7E correspond to ASCII. Other characters vary by font selection.
All address are valid for character-width (byte) access.
Matching is both case- and accent-insensitive (i.e. a, à, and A all match each other).
When parsing, all control characters match the space delimiter.
The data stack serves as the control-flow stack.
Input conversion will fail. Output conversion will be attempted, with digits larger than 35 mapped into the character-set range beyond Z (i.e. [, \, ], and so forth).
ACCEPT
and 6.2.1390 EXPECT
: The display is not changed; the cursor is positioned at the end of the input text.
ABORT"
): The text message associated with the ABORT"
is displayed, and
execution continues as per ABORT
.
At the Quartus Forth console, the input line terminator is the carriage return
(Graffiti stroke upper-right to lower-left). In INCLUDE
d
files, input is terminated via carriage-return, or end-of-file.
WORD
):
255.
255.
31.
ENVIRONMENT?
, in characters: 31.
Input is from the keyboard (pop-up keyboard, or Graffiti input) unless redirected
via INCLUDED
, INCLUDE
, or NEEDS
.
No facilities are currently provided for redirection of output.
Code is compiled to the dictionary using what the Standard calls a type 3 mechanism (native-code with optimizations).
8.
Numbers are represented internally as two's-complement, big-endian values.
n | -32767..32767 |
+n | 0..32767 |
u | 0..65535 |
d | -214783648..2147483647 |
+d | 0..2147483647 |
ud | 0..4294967295 |
All dataspace regions are read/write.
WORD
(3.3.3.6 Other transient regions): 40 characters.
2.
1.
80 characters.
34 characters.
PAD
(3.3.3.6 Other transient regions):
Depends upon the user implementation of PAD
. Recommended:
CREATE PAD 84 CHARS ALLOT
The system is case-insensitive.
QUIT
): ok
*/
, 6.1.0110 */MOD
, 6.1.0230
/
, 6.1.0240 /MOD
, 6.1.1890 MOD
):
Symmetrical.
STATE
when true: Compilation state is indicated by a 1 in STATE
.
Overflow results in integer rollover (e.g. 65535 1+ -> 0
)
DOES>
(6.1.0450 :): The current definition cannot be found until ;
(except via RECURSE
).
CATCH
and 9.6.1.2275 THROW
(9.3.1 THROW
values, 9.3.5 Possible actions on an ambiguous condition): -1 -2 -4 -9 -13 -14 -16 -19 -29 -31 -38 -42 -43 -45
EKEY
): EKEY
returns a keyDownEvent
for each keyboard event
received. EKEY>CHAR
interrogates the event buffer to retrieve
the received character.
10 milliseconds.
MS
: Repeatable to +/- 10 milliseconds.
BIN
, 11.6.1.1010 CREATE-FILE
, 11.6.1.1970 OPEN-FILE
,
11.6.1.2054 R/O
, 11.6.1.2056 R/W
, and 11.6.1.2425
W/O
: Not applicable.
-38.
READ-LINE
): Line-feed (0x0A) (REFILL
).
Case- and accent-insensitive non-whitespace names not to exceed 31 characters in length.
FILE-STATUS
: Not applicable.
INCLUDE-FILE
, 11.6.1.1718 INCLUDED
):
The file (and any nesting file) is closed.
Not applicable.
Maximum nesting depth is 64 levels deep.
100 characters.
Not applicable.
Not applicable.
Not applicable.
REPRESENT
): Motorola Fast Floating Point (FFP) format. See the floating point specification for detailed specifications.
REPRESENT
when float is out of range: Not applicable.
Floats are rounded to 24 bits of precision.
8 floats.
2 cells.
;CODE
and 15.6.2.0930 CODE
: END-CODE
.
;CODE
and 15.6.2.0930 CODE
: Input is processed as either prefix or postfix 68000 assembler, as described in 'asm68k.html'.
EDITOR
and 15.6.2.0740 ASSEMBLER
(15.3.3 The Forth
dictionary): ASSEMBLER
allows all asm68k words
to be found. FORTH
(SEARCH EXT) is available in the ASSEMBLER
wordlist for easy return to the default search-order.
SEE
. Not applicable.
SET-ORDER
):
8.
SET-ORDER
, 16.6.2.1965 ONLY
): FORTH-WORDLIST
.
-13 THROW
. When at the Quartus Forth console, the system
beeps, prints the invalid name on the screen in underlined text, followed by
a question-mark, and then performs the semantics of ABORT.
-19 THROW
.
Attempts to write to write-protected RAM are trapped by the PalmOS and result in a system exception.
Not detected. False flags (0) are always legal values. True flags are legal values for data types n and u.
'
, 6.1.1550 FIND
, etc.)
of a definition with undefined interpretation semantics: Returns the execution token representing the compilation semantics of the definition.
*/
,
6.1.0110 */MOD
, 6.1.0230 /
, 6.1.0240 /MOD
,
6.1.1561 FM/MOD
, 6.1.1890 MOD
, 6.1.2214 SM/REM
,
6.1.2370 UM/MOD
, 8.6.1.1820 M*/
): Trapped by the PalmOS, resulting in a system exception.
Not detected.
Not detected.
-8 THROW
.
Permitted. An attempt will be made to execute the compilation semantics, potentially resulting in an ambiguous condition.
Permitted.
Not detected.
Not detected.
*
) results in a value too big to be
represented by a single-cell integer (6.1.0090 *
, 6.1.0100 */
,
6.1.0110 */MOD
, 6.1.0570 >NUMBER
, 6.1.1561 FM/MOD
,
6.1.2214 SM/REM
, 6.1.2370 UM/MOD
, 6.2.0970 CONVERT
,
8.6.1.1820 M*/
): Not detected.
Stack underflow is detected during interpretation after the execution of each word. Not detected during run-time except by an explicit check.
-16 THROW
.
>IN
greater than size of input buffer (3.4.1 Parsing): Treated as though the end of the input buffer has been reached.
RECURSE
appears
after 6.1.1250 DOES>
: Causes recursion into the word containing the DOES>
.
RESTORE-INPUT
: Not detected.
Not detected.
Trapped by the PalmOS, resulting in a system exception.
,
, 6.1.0860 C,
): For cell-sized reads and writes, unaligned accesses are trapped by the PalmOS, resulting in a system exception.
PICK
, 6.2.2150 ROLL
): Not detected.
+LOOP
, 6.1.1680 I
, 6.1.1730 J
,
6.1.1760 LEAVE
, 6.1.1800 LOOP
, 6.1.2380 UNLOOP
):
Not detected.
IMMEDIATE
): Not detected.
VALUE
used by 6.2.2295 TO
: Not detected.
'
,
6.1.2033 POSTPONE
, 6.1.2510 [']
, 6.2.2530 [COMPILE]
):
-13 THROW
.
DO
, 6.2.0620 ?DO
, 6.2.2440 WITHIN
):
Not detected.
POSTPONE
or 6.2.2530 [COMPILE]
applied to 6.2.2295 TO
: Not detected.
WORD
: Not detected.
LSHIFT
, 6.1.2162 RSHIFT
):
Not detected.
CREATE
(6.1.0550 >BODY
, 6.1.1250 DOES>
): >BODY
attempts to identify CREATE
words, and
performs -31 THROW
for words failing this identification. DOES>
does not attempt to identify words as having been defined by CREATE
.
<#
and 6.1.0040 #>
(6.1.0030 #
,
6.1.0050 #S
, 6.1.1670 HOLD
, 6.1.2210 SIGN
):
Not detected.
D>S
: Not detected.
AT-XY
operation can't be performed on user output device. AT-XY
assumes the user output device is the Palm LCD screen.
REPOSITION-FILE
): Not applicable.
READ-FILE
, 11.6.1.2090 READ-LINE
)
Not applicable.
INCLUDE-FILE
): Not applicable.
INCLUDE-FILE
, 11.6.1.1718 INCLUDED
):
Not applicable.
INCLUDED
): -38 THROW
.
Not applicable.
SOURCE-ID
when 7.6.1.0790 BLK
is not zero. Not applicable.
DF@
or DF!
is used with an address that is not double-float aligned:
Not applicable.
F@
or F!
is used with an address that is not float aligned: If the address is not cell-aligned, the PalmOS will trap the access and a system exception will result.
F/
): -43 THROW
(when detected).
SF@
or SF!
is used with an address that is not single-float aligned:
Not applicable.
BASE
is not decimal (12.6.1.2143 REPRESENT
, 12.6.2.1427 F.
,
12.6.2.1513 FE.
, 12.6.2.1613 FS.
): BASE
is not required to be decimal for floating-point conversion.
FATAN2
): Not applicable.
FTAN
: Not applicable.
D>F
: Not detected.
F/
):
-42 THROW.
DF!
, 12.6.2.1204 DF@
, 12.6.2.2202 SF!
,
12.6.2.2203 SF@
): Not applicable.
FACOSH
): Not applicable.
FLNP1
): Not applicable.
FLN
, 12.6.2.1557 FLOG
): Not applicable.
FASINH
, 12.6.2.1618 FSQRT
): Not detected.
FACOS
, 12.6.2.1486 FASIN
, 12.6.2.1491
FATANH
): Not applicable.
F>D
: -43 THROW
.
F.
, 12.6.2.1513 FE.
, 12.6.2.1613
FS.
): Not applicable.
FORGET
): Not detected.
CSPICK
, 15.6.2.1020 CSROLL
): Not applicable.
FORGET
): Not applicable.
CREATE
(15.6.2.0470 ;CODE
): Not applicable.
POSTPONE
applied to 15.6.2.2532 [IF]
: Not detected.
[ELSE]
or 15.6.2.2533 [THEN]
(15.6.2.2532 [IF]
): Responds as though [THEN]
was encountered.
FORGET
): Not detected.
Not detected.
PREVIOUS
): Not detected.
ALSO
): Not detected.
PAD
(3.3.3.6 Other transient regions): None.
The Quartus Forth console provides a dot-addressable bitmap screen of 160 pixels across by 160 pixels down. This space holds (in the default proportional font) 14 lines of (roughly) 40 characters each. Pixels are square. Coordinate addressing is relative to (0,0) at the top-left of the screen. Clipping is handled by the system.
Screen-scrolling is handled automatically by the output subsystem in Quartus Forth.
While interpreting or during ACCEPT
, the operator has access
to the full range of PalmOS editing facilities.
The Quartus Forth menu provides ABORT
and COLD
,
along with command-shortcuts for editing facilities.
Varies by PalmOS version. As a rule, at least 12K; under newer versions of the PalmOS, Quartus Forth apps have as much as 32K of dynamic RAM available.
1024 cells.
1024 cells.
The Quartus Forth kernel requires approximately 18K. User-available codespace defaults to 32000 additional bytes, to a configurable combined maximum (system+user) of 65K.