From 64e441d0598f5ce71ea694e763e192ecc2eb0ffe Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Wed, 8 Apr 2020 16:12:34 -0400 Subject: [PATCH] Move SCPY from z80c to icore This way, it can be affected by memory mappers. --- emul/forth/z80c.bin | Bin 1836 -> 1841 bytes forth/icore.fs | 9 +++++++++ forth/z80c.fs | 18 ------------------ 3 files changed, 9 insertions(+), 18 deletions(-) diff --git a/emul/forth/z80c.bin b/emul/forth/z80c.bin index f2e548f38bbc94e87f447dbb90ee4f1aa4fb3c79..43464a6c705c74333d4ed905975ac6d95ce33e5e 100644 GIT binary patch delta 867 zcmXw1ziSh56#v}i`@Ks-dR37sk;o;A$(4xh;9!kE@S18s(lkv<1fkZNp+n?|bXE!bE;w-vb?`R&hyQl$goBIB(zpVcRwQwVc83I^}x%Xtfe z0TBRhwOq~@D<@$xrUzK2(OB^&oe{P`n7IoHUs95cK;w9p3&~Mo zjgp0Gp%PPjfFsfN$Hj%#d+Fjv(6J%*bQif%Y-2e5Mzxz`JZ(eR(7?G;@WeUI3c6ZL zcC|g-BjPS)HZId64{;n)tYKfbi~&W!Kuf--uZjq`Jc-;RpR zii-YYc}adWx?0SCBhR-EMA{tJ+tkeU05?7KhfK=~4zTE!9%R`)CAuGwGDs+k;-(sY z49TDR)Ai;HC(XCxwR7fkQ?b$l$;^w*U~HOxJ-uV}jh0H8a-mqsmrLb*|~@BqR)`D+sUA%@zH3VI|=DRqnItq8;N;h<#nA%l-$%(Yr|i delta 811 zcmX|9J!lhQ7=FIX_uVC-y|z*N6RBQO(WKN^2M0Bn+DpKIq-}aFkqWicLW@+6>S6~) z2M3o97Z;~yaxtKj;HFLr&IK_;rxYXxi9lQ-ro^Yy+qIcrbf zI0-p`-7mvvEXX|_4Q~1Q_Tl#*b`xBCN|Y3fmjHF-&qdCI)OC;Gjn;T%bx=bsjAlqjEGNOpFE!ZOERu> zbKO&EL4dKZ^>*?oYpscjs)_fSOA>8D7S2+Vizu4(7TD3oJy*v1L%K^_UDPa~lNZ8} z?!A<8QSm;@*xb18H~C2u>~t^7w$MfEl+_khjPa^O`Ya->{Q70Z5DsS{?RVwCqn>SqiIAB?(f6bM<_ctCS&+&!1->UIJ`r`!Z zT21i4KcY^(%W9T>b*-iM8a`qv`GS)xP8V}d1|bux#ZL6>97Yvv7;VaJ$K=Dd*IoGZxt0Y#`ooAc<|+6e&t%C5J^6T~7NU|9({! zCs}!ivRxXwg%Wf!=bK^UdfqAA#6tTYW}&6GbQ_nt@z}%*gD=w3{SErb*x~=xlK2vt eN%Co-=fM)b9@w~if$J=?s-^!5G=+^tvg{w0n5e=4 diff --git a/forth/icore.fs b/forth/icore.fs index 4e3af1e..5719aa4 100644 --- a/forth/icore.fs +++ b/forth/icore.fs @@ -181,6 +181,15 @@ 0x0e _c RAM+ ; +: SCPY + BEGIN ( a ) + _c DUP _c C@ ( a c ) + _c DUP _c C, ( a c ) + _c NOT IF _c DROP EXIT THEN + 1 _c + ( a+1 ) + AGAIN +; + : (entry) _c HERE _c @ ( h ) _c WORD ( h s ) diff --git a/forth/z80c.fs b/forth/z80c.fs index 5bf4ff6..d43b0f5 100644 --- a/forth/z80c.fs +++ b/forth/z80c.fs @@ -390,24 +390,6 @@ L1 FSET ( found ) DE PUSHqq, ;CODE -CODE SCPY - HL POPqq, - chkPS, - ( HERE == RAM+4 ) - DE RAMSTART 0x04 + LDdd(nn), - B 0 LDrn, -L1 BSET ( loop ) - A (HL) LDrr, - LD(DE)A, - HL INCss, - DE INCss, - B INCr, - A ORr, - JRNZ, L1 BWR ( loop ) - DE A LD(dd)r - RAMSTART 0x04 + DE LD(nn)dd, -;CODE - CODE (im1) IM1, EI,