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 "OVER"
pull/95/head
Virgil Dupras
4 years ago
parent
9cfddea940
commit
09cd25df29
4 changed files
with
13 additions
and
18 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
BIN
emul/forth/z80c.bin
+2
-17
forth/forth.asm
+1
-1
forth/icore.fs
+10
-0
forth/z80c.fs
BIN
emul/forth/z80c.bin
View File
+ 2
- 17
forth/forth.asm
View File
@@ -952,25 +952,10 @@ DUP:
push hl
jp next
; ( a b -- a b a )
.db "OVER"
.dw $-DUP
.db 4
OVER:
.dw nativeWord
pop hl ; B
pop de ; A
call chkPS
push de
push hl
push de
jp next
.fill 112
.fill 132
.db "_bend"
.dw $-
OVER
.dw $-DUP
.db 5
; Offset: 06ee
.out $
+ 1
- 1
forth/icore.fs
View File
@@ -98,7 +98,7 @@
BEGIN
( We take advantage of the fact that char MSB is
always zero to pre-write our null-termination )
OVER !
( a )
_c
OVER ! ( a )
1 _c + ( a+1 )
C< ( a c )
DUP _c WS?
+ 10
- 0
forth/z80c.fs
View File
@@ -31,6 +31,16 @@ CODE ROT
BC PUSHqq, ( A )
;CODE
( a b -- a b a )
CODE OVER
HL POPqq, ( B )
DE POPqq, ( A )
chkPS,
DE PUSHqq, ( A )
HL PUSHqq, ( B )
DE PUSHqq, ( A )
;CODE
( a b -- a b a b )
CODE 2DUP
HL POPqq, ( B )
Write
Preview
Loading…
Cancel
Save