This website works better with JavaScript.
Home
Explore
lain.church
Help
Register
Sign In
izaya
/
collapseos
mirror of
https://github.com/hsoft/collapseos.git
Watch
1
Star
1
Fork
0
Code
Issues
0
Releases
0
Wiki
Activity
Browse Source
forth: Forth-ify "SCMP"
pull/95/head
Virgil Dupras
4 years ago
parent
400ef99b54
commit
7c9d799d93
3 changed files
with
17 additions
and
17 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
BIN
emul/forth/z80c.bin
+5
-17
forth/forth.asm
+12
-0
forth/z80c.fs
BIN
emul/forth/z80c.bin
View File
+ 5
- 17
forth/forth.asm
View File
@@ -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 5
6
.fill 5
0
; 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 $-
SCM
P
.dw $-PLUS
.db 3
CMP:
.dw nativeWord
+ 12
- 0
forth/z80c.fs
View File
@@ -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
Write
Preview
Loading…
Cancel
Save