1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
11 $FORTH_CONST (REL-BRANCHES) USE_REL_BRANCH
18 ;; calculate the backward branch offset from HERE to addr
19 ;; and compile into the next available dictionary memory address
21 $FORTH_END_WORD COMP-BACK
26 ;; calculate the backward branch offset from addr to HERE and put
29 $FORTH_END_WORD COMP-FWD
36 ;; calculate the backward branch offset from HERE to addr
37 ;; and compile into the next available dictionary memory address
39 $FORTH_END_WORD COMP-BACK
44 ;; calculate the backward branch offset from addr to HERE and put
47 $FORTH_END_WORD COMP-FWD
58 ?COMP 2 ?PAIRS COMP-FWD ;S
74 3 ?PAIRS COMPILE (LOOP)
80 3 ?PAIRS COMPILE (+LOOP)
86 1 ?PAIRS COMPILE 0BRANCH
97 1 ?PAIRS COMPILE BRANCH
101 $FORTH_WORD REPEAT IMM
103 >R >R AGAIN R> R> 2- ENDIF ;S
104 $FORTH_END_WORD REPEAT
112 $FORTH_WORD IFNOT IMM
116 $FORTH_END_WORD IFNOT
120 2 ?PAIRS COMPILE BRANCH
121 HERE 0 , SWAP 2 ENDIF 2 ;S
124 $FORTH_WORD WHILE IMM
127 $FORTH_END_WORD WHILE
132 ?COMP CSP @ !CSP 4 ;S
137 4 ?PAIRS COMPILE OVER
140 HERE 0 , COMPILE DROP
144 $FORTH_WORD ENDOF IMM
146 LIT 5 ?PAIRS COMPILE BRANCH
147 HERE 0 , SWAP 2 ENDIF 4 ;S
148 $FORTH_END_WORD ENDOF
150 $FORTH_WORD OTHERWISE IMM
152 ;; part of CASE: OTHERWISE ( val ) ... ENDOF
157 $FORTH_END_WORD OTHERWISE
159 $FORTH_WORD ENDCASE IMM
171 $FORTH_END_WORD ENDCASE