mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-27 12:18:07 +11:00
forth: Forth-ify "SCMP"
This commit is contained in:
parent
400ef99b54
commit
7c9d799d93
Binary file not shown.
@ -122,6 +122,8 @@ LIT:
|
||||
.dw litWord
|
||||
.dw INITIAL_SP
|
||||
.dw WORDBUF
|
||||
jp flagsToBC
|
||||
jp strcmp
|
||||
|
||||
; *** Code ***
|
||||
forthMain:
|
||||
@ -180,7 +182,7 @@ INTERPRET:
|
||||
.dw DROP
|
||||
.dw EXECUTE
|
||||
|
||||
.fill 56
|
||||
.fill 50
|
||||
|
||||
; STABLE ABI
|
||||
; Offset: 00cd
|
||||
@ -980,25 +982,11 @@ PLUS:
|
||||
push hl
|
||||
jp next
|
||||
|
||||
.fill 18
|
||||
|
||||
; ( a1 a2 -- b )
|
||||
.db "SCMP"
|
||||
.dw $-PLUS
|
||||
.db 4
|
||||
SCMP:
|
||||
.dw nativeWord
|
||||
pop de
|
||||
pop hl
|
||||
call chkPS
|
||||
call strcmp
|
||||
call flagsToBC
|
||||
push bc
|
||||
jp next
|
||||
.fill 42
|
||||
|
||||
; ( n1 n2 -- f )
|
||||
.db "CMP"
|
||||
.dw $-SCMP
|
||||
.dw $-PLUS
|
||||
.db 3
|
||||
CMP:
|
||||
.dw nativeWord
|
||||
|
@ -254,3 +254,15 @@ CODE (resSP)
|
||||
( INITIAL_SP == JTBL+28 )
|
||||
SP JTBL 28 + @ LDdd(nn),
|
||||
;CODE
|
||||
|
||||
CODE SCMP
|
||||
DE POPqq,
|
||||
HL POPqq,
|
||||
chkPS,
|
||||
( JTBL+35 == strcmp )
|
||||
JTBL 35 + CALLnn,
|
||||
( JTBL+32 == flagsToBC )
|
||||
JTBL 32 + CALLnn,
|
||||
BC PUSHqq,
|
||||
;CODE
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user