forth: Forth-ify "-"

Cette révision appartient à :
Virgil Dupras 2020-03-27 11:36:58 -04:00
Parent 005dd98fc2
révision 941224be94
3 fichiers modifiés avec 11 ajouts et 14 suppressions

Fichier binaire non affiché.

Voir le fichier

@ -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

Voir le fichier

@ -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,