This website works better with JavaScript.
Home
Explore
lain.church
Help
Register
Sign In
izaya
/
collapseos
mirror of
https://github.com/hsoft/collapseos.git
Watch
1
Star
1
Fork
0
Code
Issues
0
Releases
0
Wiki
Activity
Browse Source
forth: Forth-ify "IMMED?"
pull/95/head
Virgil Dupras
4 years ago
parent
8f990ff954
commit
408d93bd23
4 changed files
with
15 additions
and
19 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
BIN
emul/forth/z80c.bin
+2
-18
forth/forth.asm
+1
-1
forth/icore.fs
+12
-0
forth/z80c.fs
BIN
emul/forth/z80c.bin
View File
+ 2
- 18
forth/forth.asm
View File
@@ -781,27 +781,11 @@ DOES:
jp EXIT+2
.fill 23
.db "IMMED?"
.dw $-DOES
.db 6
ISIMMED:
.dw nativeWord
pop hl
call chkPS
dec hl
ld de, 0
bit FLAG_IMMED, (hl)
jr z, .notset
inc de
.notset:
push de
jp next
.fill 51
; ( n -- )
.db "LITN"
.dw $-
ISIMMED
.dw $-DOES
.db 4
LITN:
.dw nativeWord
+ 1
- 1
forth/icore.fs
View File
@@ -113,7 +113,7 @@
WORD
(find)
( is word )
IF DUP IMMED? IF EXECUTE ELSE , THEN
IF DUP
_c
IMMED? IF EXECUTE ELSE , THEN
( maybe number )
ELSE (parse*) @ EXECUTE LITN THEN
AGAIN
+ 12
- 0
forth/z80c.fs
View File
@@ -233,3 +233,15 @@ CODE IMMEDIATE
HL DECss,
7 (HL) SETbr,
;CODE
CODE IMMED?
HL POPqq,
chkPS,
HL DECss,
DE 0 LDddnn,
7 (HL) BITbr,
3 JRZe, ( notset )
DE INCss,
( notset )
DE PUSHqq,
;CODE
Write
Preview
Loading…
Cancel
Save