$Header: /home/radek/cvs/forth-book/sec-figforth65.xml,v 1.2 2004/12/23 21:07:28 radek Exp $
FigForth pro procesor 6502 používá tradiční model Nepřímo zřetězený kód.
; LIT SCREEN 13 LINE 1 0224 83 4C 49 D4 L22 .BYTE $83,'LI',$D4 ; <--- name field ; <----- link field 0228 00 00 .WORD 00 ; last link marked by zero 022A 2C 02 LIT .WORD *+2 ; <----- code address field 022C B1 AE LDA (IP),Y ; <----- start of parameter field 022E 48 PHA 022F E6 AE INC IP 0231 D0 02 BNE L30 0233 E6 AF INC IP+1 0235 B1 AE L30 LDA (IP),Y 0237 E6 AE L31 INC IP 0239 D0 02 BNE PUSH 023B E6 AF INC IP+1 ; 023D CA PUSH DEX 023E CA DEX 023F 95 01 PUT STA 1,X 0241 68 PLA 0242 95 00 STA 0,X ; ; NEXT is the address interpreter that moves from machine ; level word to word. ; Uses 25 bytes of memory. 0244 A0 01 NEXT LDY #1 0246 B1 AE LDA (IP),Y ; Fetch code field address pointed 0248 85 B2 STA W+1 ; to by IP. 024A 88 DEY 024B B1 AE LDA (IP),Y 024D 85 B1 STA W ;@ JSR TRACE ; Remove this when all is well 024F 18 CLC ; Increment IP by two. 0250 A5 AE LDA IP 0252 69 02 ADC #2 0254 85 AE STA IP 0256 90 02 BCC L54 0258 E6 AF INC IP+1 025A 4C B0 00 L54 JMP W-1 Jump to an indirect jump (W) which ; vectors to code pointed to by a code ; field.