Procházet zdrojové kódy

forth: Forth-ify "-"

pull/95/head
Virgil Dupras před 4 roky
rodič
revize
941224be94
3 změnil soubory, kde provedl 11 přidání a 14 odebrání
  1. binární
      emul/forth/z80c.bin
  2. +2
    -14
      forth/forth.asm
  3. +9
    -0
      forth/z80c.fs

binární
emul/forth/z80c.bin Zobrazit soubor


+ 2
- 14
forth/forth.asm Zobrazit soubor

@@ -1318,23 +1318,11 @@ PLUS:
push hl
jp next

; ( a b -- c ) A - B
.db "-"
.dw $-PLUS
.db 1
MINUS:
.dw nativeWord
pop de ; B
pop hl ; A
call chkPS
or a ; reset carry
sbc hl, de
push hl
jp next
.fill 18

; ( a1 a2 -- b )
.db "SCMP"
.dw $-MINUS
.dw $-PLUS
.db 4
SCMP:
.dw nativeWord


+ 9
- 0
forth/z80c.fs Zobrazit soubor

@@ -113,6 +113,15 @@ CODE XOR
HL PUSHqq,
;CODE

CODE -
DE POPqq,
HL POPqq,
chkPS,
A ORr,
DE SBCHLss,
HL PUSHqq,
;CODE

CODE *
DE POPqq,
BC POPqq,


Načítá se…
Zrušit
Uložit