From f9c3a0444c5b68b81801d47db8602278a80ec033 Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Mon, 30 Mar 2020 13:57:06 -0400 Subject: [PATCH] forth: Forth-ify "DROP" --- emul/forth/z80c.bin | Bin 1287 -> 1300 bytes forth/forth.asm | 12 ++---------- forth/icore.fs | 10 +++++----- forth/z80c.fs | 5 +++++ 4 files changed, 12 insertions(+), 15 deletions(-) diff --git a/emul/forth/z80c.bin b/emul/forth/z80c.bin index 19c2a3f6f01141d42067828bd462ca2986611a16..94454433ab746c5bb0034b025ee10ccdb9cd3d00 100644 GIT binary patch delta 453 zcmXv~%}WA76o1Z)v$JEYCY4(nY|+vOUL)vBHZu@HZFj?CS%-)qB0CD^r95;9wtIg< z^#=rk(7kI!(yf#Cf~YrIm&Y*g_w|04@Ucy*ger~+E5?QVVmD; zYW5iTiXp%3Ws*P@d;*^OT3VYq#4nbM?z#!wfIGdy-*jckz#&y$C*2<;;yTs8$oTlw z10IY23HR|GL_G%YG+~=^kNw+v7+x8lbFUYrgK<1f&{i!1AGL&|t|UEJQkF zGw&BN%H=6+feBfJsyY`3p<%#=w7>vCOsN(%QQ3(A44WD1f delta 452 zcmX|-&r1S99L2xR%+Aj4!fMeE!KhUbk_fzHYz51N3PPyqrqHDfJamyzFOjfxu}%?f ze?k2NhNsR#cRP03tA~ir9jaNiuJ66?%;&v(^-8^sOXVsr2A?*&$cfFpY88!Pj`k07 z_AC$`3;_6&LiCQsAeXl@rD7>#Lx-63TEzHnp=8HF(!pU&;b`@&)@;=iL6CJwO9SE| z0?D!7JZ-cS^S)lAeYr+`k3x@fG-L(@ASFA<-N8|Os3hHEyy85{Ln%%t)=&U&R4rQ( zz&=tGo~K6x!jWC57E0+bP#qqW8XYQ=e>pO#gFb%5p|F=GW%SXz(xsv4yOX#lLOr4A zBT=B DROP ( exit : ) + _c R> _c DROP ( exit : ) ; IMMEDIATE ( Give ":" and ";" their real name ) diff --git a/forth/z80c.fs b/forth/z80c.fs index f91760c..e820fb9 100644 --- a/forth/z80c.fs +++ b/forth/z80c.fs @@ -39,6 +39,11 @@ CODE DUP HL PUSHqq, ( A ) ;CODE +( a -- ) +CODE DROP + HL POPqq, +;CODE + ( a b -- b a ) CODE SWAP HL POPqq, ( B )