1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-12-04 19:48:08 +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 inc hl
jr .loop 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," .db "C,"
.fill 5 .fill 5
.dw $-PFETCH .dw $-PRINT
.db 0 .db 0
CWR: CWR:
.dw nativeWord .dw nativeWord

View File

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

View File

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