Browse Source

forth: Forth-ify "IMMEDIATE"

pull/95/head
Virgil Dupras 4 years ago
parent
commit
8f990ff954
4 changed files with 9 additions and 11 deletions
  1. BIN
      emul/forth/z80c.bin
  2. +2
    -11
      forth/forth.asm
  3. +1
    -0
      forth/z80a.fs
  4. +6
    -0
      forth/z80c.fs

BIN
emul/forth/z80c.bin View File


+ 2
- 11
forth/forth.asm View File

@@ -781,19 +781,10 @@ DOES:
jp EXIT+2


.db "IMMEDIATE"
.dw $-DOES
.db 9
IMMEDIATE:
.dw nativeWord
ld hl, (CURRENT)
dec hl
set FLAG_IMMED, (hl)
jp next

.fill 23

.db "IMMED?"
.dw $-IMMEDIATE
.dw $-DOES
.db 6
ISIMMED:
.dw nativeWord


+ 1
- 0
forth/z80a.fs View File

@@ -79,6 +79,7 @@
0xc5 OP1qq PUSHqq,
0xc1 OP1qq POPqq,
0x03 OP1qq INCss,
0x0b OP1qq DECss,
0x09 OP1qq ADDHLss,

: _1rr


+ 6
- 0
forth/z80c.fs View File

@@ -227,3 +227,9 @@ CODE R>
JTBL 12 + CALLnn,
HL PUSHqq,
;CODE

CODE IMMEDIATE
CURRENT LDHL(nn),
HL DECss,
7 (HL) SETbr,
;CODE

Loading…
Cancel
Save