From 035532acf7615721bc622eefeb35092d306e2f87 Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Thu, 18 Jun 2020 07:50:20 -0400 Subject: [PATCH] z80: remove remaining indirections in execute calls We now have a stable ABI that is pretty cleared up... --- blk/283 | 24 ++++++++++++------------ blk/298 | 2 +- blk/299 | 2 +- blk/301 | 3 ++- emul/forth.bin | Bin 6188 -> 6186 bytes 5 files changed, 16 insertions(+), 15 deletions(-) diff --git a/blk/283 b/blk/283 index 0f3cbbd..5e993d6 100644 --- a/blk/283 +++ b/blk/283 @@ -1,14 +1,14 @@ H@ ORG ! -0 JPnn, ( 00, main ) NOP, NOP, NOP, ( 03, unused ) -NOP, NOP, ( 06, unused ) NOP, NOP, ( 08, LATEST ) +0 JPnn, ( 00, main ) NOP, NOP, NOP, ( unused ) +NOP, NOP, ( unused ) NOP, NOP, ( 08, LATEST ) NOP, NOP, NOP, NOP, NOP, NOP, NOP, ( 0a, unused ) -0 JPnn, ( 11, pushRS ) 0 JPnn, ( 14, popRS ) -NOP, NOP, NOP, ( 17, unused ) -0 JPnn, ( 1a, next ) 0 JPnn, ( unused ) -NOP, NOP, NOP, NOP, ( 20, unused ) -NOP, NOP, NOP, NOP, ( 24, unused ) -0 JPnn, ( RST 28 ) -NOP, NOP, NOP, NOP, NOP, ( 2b, unused ) -0 JPnn, ( RST 30 ) -0 JPnn, ( 33, execute ) NOP, NOP, ( unused ) -0 JPnn, ( RST 38 ) +0 JPnn, ( 11, pushRS ) 0 JPnn, ( 14, popRS ) +NOP, NOP, NOP, ( unused ) +0 JPnn, ( 1a, next ) NOP, NOP, NOP, ( unused ) +NOP, NOP, NOP, NOP, ( unused ) +NOP, NOP, NOP, NOP, ( unused ) +0 JPnn, ( RST 28 ) +NOP, NOP, NOP, NOP, NOP, ( unused ) +0 JPnn, ( RST 30 ) +NOP, NOP, NOP, NOP, NOP, ( unused ) +0 JPnn, ( RST 38 ) diff --git a/blk/298 b/blk/298 index 667e816..695ce64 100644 --- a/blk/298 +++ b/blk/298 @@ -3,7 +3,7 @@ lblofl BSET ( abortUnderflow ) HL PC 7 - LDddnn, DE RAMSTART 0x02 + LDdd(nn), ( RAM+02 == CURRENT ) lblfind @ CALLnn, - 0x33 BJP, ( 33 == execute ) + JR, L2 FWR ( execute, B301 ) diff --git a/blk/299 b/blk/299 index 5de7479..cc1b2c8 100644 --- a/blk/299 +++ b/blk/299 @@ -13,4 +13,4 @@ PC ORG @ 1 + ! ( main ) EXDEHL, HL L1 @ LDddnn, lblfind @ CALLnn, - 0x33 BJP, ( 33 == execute ) + JR, L1 FWR ( execute, B301 ) diff --git a/blk/301 b/blk/301 index 530932b..f942557 100644 --- a/blk/301 +++ b/blk/301 @@ -1,4 +1,5 @@ -lblexec BSET PC ORG @ 0x34 + ! ( execute. DE -> wordref ) +lblexec BSET L1 FSET ( B299 ) L2 FSET ( B298 ) + ( DE -> wordref ) ( We don't apply BIN( reliably on stable ABI stuff, we might need to adjust addr. Ugly, but well... ) BIN( @ [IF] diff --git a/emul/forth.bin b/emul/forth.bin index 34ebba9fb8f8eb37cc938d8d1564360951a6380d..5d9e5e410aee64387b67c146d7b983973dea0212 100644 GIT binary patch literal 6186 zcma)AeN5YTdjI}jY=bdiUh`I3JJ4W+Cn2rsknVIM*IqXr!>f{NX_IJ)1U>aOHv=6PHp0^6vMOmW$3CC$ z*G_UeX&MOpd!Fy}Jm2U2d44{3QWO07pEdGBh;t$BT#~qRZ>bZ7KbJjz_!-<4N(y0$ z%cWxR{`|T1!gFBQTL8rUed2zPc7GjFEx;8Ci)w#E<9L;NXzATv$c= zY2h-`PiyH@B0cjv*SYj5Ej_d9`gyuW{jUAA$rs-w3~_b-a*qflAL@v(nD;FjA*DV6)i#vrb$P6Ivvjd>U0Gi^yJWvB#CWZnQPkrcVj9Nu*<>K6i z^}l}YA6(viehPPZyFU}VUJjS>D^Fu4wmwf2bm;ZCSCx33c%Rr2lD=VQ4EWRAl zs8%InvG()N-FGSE^DAp#5AF&Ex|6}{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