From ae14c55feb4ff4582844b778a5aded2846821161 Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Mon, 20 Apr 2020 23:30:08 -0400 Subject: [PATCH] boot: a little dereferencing to make things a bit faster --- emul/forth/z80c.bin | Bin 2162 -> 2159 bytes forth/boot.z80 | 8 +++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/emul/forth/z80c.bin b/emul/forth/z80c.bin index 1e712c7c28aee7000c255644bb411c0723f74b27..c421fc7d2a07b0597fc952318df9747e8d03dc60 100644 GIT binary patch delta 1041 zcmYjPO-~b16uoce&9qb*%7>L`jOD{f2{bH7GzBG08L>%eVP+7m9|T)K69b5BEHTxM z7+CH^X`7|Pq2F9HEnz( z`D|ogR-a|lYn|P!wekD*#wptV+0t^SSN;f;Fgx zMa85m$^JpdAk7GqpI&j3+U6$aA5FGLYRL~QAhD~KZB-LT%w-%OwQVcqwtF=r|6@V& z89V#{%xzQmXL6Bh(v3aDB}O108BMq~Ad2#Lyj)N|sLhl}xt2X_TP~5d%JR&lelu;m z%^2yeTBn(G$xqDKRi{AN>-`RL6ZqwT#A7n(>ODpZ=BpGkNR7|sCbHQY99?8#YN8=+ z8tPUVYAH-zw5$}_J+0t@U?WjhMVZ4gfs}v*=#8?dL=kzWv_i z`IZ*tOKce`O^Wgo%WFj@*h8{=m6cE<`j+tL<$hIS1x&ugR?*_oM>6nkOPf-rVeW!qHnS?_XC`Ny}Lp-YTaV&8P}&B6-|o&m5db%+I7R+4&7ruU?#HrX4w zh~71weCEGJ2~w4SV15I|#3I2OxloD&%h$n`UwP;Y6@+PGwi51r5mQGowQ$Q!r`;y0 zPyw<7toi5$4O>?XabR&U45Wh^O(0>d=iUd=4zKT?@B7X>=iKj)ci-zNzoBx8 z#IKxv;W@|dedy|8?d6NKQ$9^QKik^wv|TUjWZp32W477IT&KQ%IZLRgEW7UGGu9;M zS0#h44E0}4>!j*_a?@+Ypy1-v(!-gKPy@Mv)e7vInKC`3;H-#qd@PkRlXi#GGx|T~ zC6~Ud9D+GGJ2#&Vc}UX_a4s}@Q(mT0XH7M#Prtisfpo}=LgNg|}Rx9wRICMwqNP@mYS8A z%)PJ?kJJlOClK(V#G~od;du*(io~Cflr5!#T;iS0Xyk}X=FiL#o=NxlNJcEJv?pg2 z9-(bztkl3sL=($vMYg6npEF=1O~0!K@$wmQ*E&A?O50);@Wn)Lj`pi9lAn0RpmcoX zW;;5aKyrdf0}nWqH2nbAt(p1drNgx^F_zDS5hER>W+G|%aM?%`iWl$pGhPWd};YTuOK{beH1!}5_a-7 z=pXp8YnEndkUl(Y4)ir3^jXCx`)Q4W&~aI(r}}v^(DYp9vGwxXjk$QfIn8nC!)ms; Xk3XTHHI20t9+~P+(>J6%*+c9vr}gf) diff --git a/forth/boot.z80 b/forth/boot.z80 index 2126c87..1171b52 100644 --- a/forth/boot.z80 +++ b/forth/boot.z80 @@ -281,6 +281,7 @@ PC ORG @ 0x1b + ! ( next ) IY INCss, ( continue to execute ) +L3 BSET PC ORG @ 0x34 + ! ( execute ) ( DE points to wordref ) EXDEHL, @@ -292,6 +293,7 @@ PC ORG @ 0x34 + ! ( execute ) ( DE points to PFA ) JP(HL), +L1 BSET PC ORG @ 0x0f + ! ( compiledWord ) ( Execute a list of atoms, which always end with EXIT. DE points to that list. What do we do: @@ -308,7 +310,7 @@ PC ORG @ 0x0f + ! ( compiledWord ) D (HL) LDrr, HL INCss, HL PUSHqq, IY POPqq, ( --> IP ) - 0x33 JPnn, ( 33 == execute ) + JR, L3 BWR ( execute ) PC ORG @ 0x0c + ! ( cellWord ) ( Pushes PFA directly ) @@ -330,7 +332,7 @@ PC ORG @ 0x2c + ! ( doesWord ) E (HL) LDrr, HL INCss, D (HL) LDrr, - 0x0e JPnn, ( 0e == compiledWord ) + JR, L1 BWR ( compiledWord ) ( Core words ) KEY and EMIT are not defined here. There're @@ -340,7 +342,7 @@ PC ORG @ 0x2c + ! ( doesWord ) CODE EXECUTE DE POPqq, chkPS, - 0x33 JPnn, ( 33 == execute ) + JR, L3 BWR ( execute ) ( a b c -- b c a ) CODE ROT