Download programming - CamelForth

Transcript
Removes last compiled cell. Compiles the CFA of the given State word. Compiles PTHIST.
NEXT-TIME ( spfa -- )
Requires CSP=HERE. Requires the given word to be a State word. Then:
Removes last compiled cell. Compiles the CFA of the given State word. Compiles PNEXTT.
SET-STATE ( spfa -- )
Given the pfa of a State word on the stack. Requires the given word to be a State word. Then:
Fetches the thread pointer and RAM pointer from the State word, and stores the thread pointer in
the RAM pointer.
IS-STATE?
( spfa -- )
Given the pfa of a State word on the stack. Requires the given word to be a State word. Then:
Fetches the thread pointer and RAM pointer from the State word. Returns true if the current state
of the machine is this state.
IN-EE
TIMING CONTROL
EVERY
CYCLES
( -- 6000 )
stacks the value 6000.
( -- 9000 )
stacks the value 9000.
SCHEDULE-RUNS not defined in source file
not defined in source file
ALL-TASKS
not defined in source file
COUNTDOWN-TIMER
not defined in source file
TIMER-INIT
INPUT/OUTPUT TRINARIES
DEFINE <word-name>
( -- 1111 )
Creates a new word in the Forth dictionary (CREATE SMUDGE) and stacks the
pair-tag 1111.
PROC
END-PROC
not defined in source file
not defined in source file
TEST-MASK ( -- 7002 )
stacks the tag 7002.
DATA-MASK
( -- 7004 )
stacks the tag 7004.
FOR-INPUT ( 1111 tag n tag n tag n -- )
If tags 7001, 7002, 7004 are stacked, compiles Address, Test-Mask (byte), and Data-Mask (byte),
then changes the code field of the latest word to XCPAT. Requires pair-tag 1111.
XCPAT
Fetches the data byte from the stored Address, masks it with the Test-Mask, and xors it with the
Data-Mask. If the result is zero (equal), stacks TRUE, else stacks FALSE.
AND-MASK ( -- 7008 )
stacks the tag 7008.