mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-27 11:18:05 +11:00
forth: Forth-ify "-"
This commit is contained in:
parent
005dd98fc2
commit
941224be94
Binary file not shown.
@ -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
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user