1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-12-24 14:38:05 +11:00

forth: Forth-ify "PC@"

This commit is contained in:
Virgil Dupras 2020-03-25 17:13:10 -04:00
parent 7beac94b5a
commit eb6a07a162
4 changed files with 10 additions and 16 deletions

Binary file not shown.

View File

@ -733,23 +733,9 @@ PRINT:
inc hl
jr .loop
; ( port -- c )
.db "PC@"
.fill 4
.dw $-PRINT
.db 0
PFETCH:
.dw nativeWord
pop bc
call chkPS
ld h, 0
in l, (c)
push hl
jp next
.db "C,"
.fill 5
.dw $-PFETCH
.dw $-PRINT
.db 0
CWR:
.dw nativeWord

View File

@ -124,7 +124,7 @@
OR A,
;
0xed41 OP2r OUT(C)r,
0xeb40 OP2r INr(C),
0xed40 OP2r INr(C),
( dd nn -- )
: OP3ddnn

View File

@ -90,3 +90,11 @@ CODE PC!
chkPS,
L OUT(C)r,
;CODE
CODE PC@
BC POPqq,
chkPS,
H 0 LDrn,
L INr(C),
HL PUSHqq,
;CODE