1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
12 $FORTH_CONST (REL-BRANCHES) USE_REL_BRANCH
19 ;; calculate the backward branch offset from HERE to addr
20 ;; and compile into the next available dictionary memory address
22 $FORTH_END_WORD COMP-BACK
27 ;; calculate the backward branch offset from addr to HERE and put
30 $FORTH_END_WORD COMP-FWD
37 ;; calculate the backward branch offset from HERE to addr
38 ;; and compile into the next available dictionary memory address
40 $FORTH_END_WORD COMP-BACK
45 ;; calculate the backward branch offset from addr to HERE and put
48 $FORTH_END_WORD COMP-FWD
59 ?COMP 2 ?PAIRS COMP-FWD ;S
75 3 ?PAIRS COMPILE (LOOP)
81 3 ?PAIRS COMPILE (+LOOP)
87 1 ?PAIRS COMPILE 0BRANCH
98 1 ?PAIRS COMPILE BRANCH
100 $FORTH_END_WORD AGAIN
102 $FORTH_WORD REPEAT IMM
104 >R >R AGAIN R> R> 2- ENDIF ;S
105 $FORTH_END_WORD REPEAT
113 $FORTH_WORD IFNOT IMM
117 $FORTH_END_WORD IFNOT
121 2 ?PAIRS COMPILE BRANCH
122 HERE 0 , SWAP 2 ENDIF 2 ;S
125 $FORTH_WORD WHILE IMM
128 $FORTH_END_WORD WHILE
133 ?COMP CSP @ !CSP 4 ;S
138 4 ?PAIRS COMPILE OVER
141 HERE 0 , COMPILE DROP
145 $FORTH_WORD ENDOF IMM
147 LIT 5 ?PAIRS COMPILE BRANCH
148 HERE 0 , SWAP 2 ENDIF 4 ;S
149 $FORTH_END_WORD ENDOF
151 $FORTH_WORD OTHERWISE IMM
153 ;; part of CASE: OTHERWISE ( val ) ... ENDOF
158 $FORTH_END_WORD OTHERWISE
160 $FORTH_WORD ENDCASE IMM
172 $FORTH_END_WORD ENDCASE