FigForth in 6502 IDE
Posted: Sat Dec 01, 2018 6:27 am
Maybe someone is interested. I ported FigForth to Michal Kowalski's 6502 IDE and emulator (http://www.exifpro.com/utils.html).
Have fun!
--Dietmar
Have fun!
--Dietmar
Code: Select all
22000 7 / .
Code: Select all
' R/W CFA ADDR1 !
' R/W CFA ADDR2 !
Code: Select all
' R/W
Code: Select all
' R/W CFA OVER ! \ CFA of the new R/W is stored in the first cell of the original R/W
' ;S CFA SWAP ! \ CFA of the word to exit high level Forth words is stored in the second cell of the original R/W
Code: Select all
: (R/W)
<define R/W here>
;
: R/W
(R/W) ;
Code: Select all
HEX
4000 CONSTANT LO ( START OF BUFFER AREA )
6800 CONSTANT HI ( 10 SCREEN EQUIVALENT )
: R/W >R ( save boolean )
B/BUF * LO + DUP
HI > 6 ?ERROR ( range check )
R> IF ( read ) SWAP ENDIF
B/BUF CMOVE ;
( Patch BLOCK and BUFFER )
DECIMAL
' R/W CFA ' BLOCK 48 + !
' R/W CFA ' BUFFER 44 + !Code: Select all
L3060 .BYTE $83,"R/",$D7
.WORD L3050 ; link to -BCD
RSLW .WORD DOCOL
.WORD >R ; Save boolean
.WORD BBUF ; B/BUF
.WORD STAR ; *
.WORD $4000 ; LO
.WORD PLUS ; +
.WORD DUP ; dup
.WORD $6800
.WORD GREAT ; >
.BYTE $06 ; #$06
.WORD QERR ; ?ERROR
.WORD IF ; R> IF
.WORD SWAP ; SWAP
.WORD ENDIF ; ENDIF
.WORD BBUF ; BBUF
.WORD CMOVE ; CMOVE
.WORD SEMIS ; ;