From e569e406650f52bacec35a8c3f8baf82c6a3dbbd Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Mon, 20 Apr 2020 23:18:57 -0400 Subject: [PATCH] Forth-ify 2DUP 2OVER 2SWAP 2DROP was left in boot.z80 because it's used in icore. --- emul/forth/z80c.bin | Bin 2240 -> 2162 bytes forth/boot.z80 | 41 ----------------------------------------- forth/core.fs | 18 +++++++++++------- 3 files changed, 11 insertions(+), 48 deletions(-) diff --git a/emul/forth/z80c.bin b/emul/forth/z80c.bin index e260c9c54e49fd8c0487c0aff005de74b96c7772..1e712c7c28aee7000c255644bb411c0723f74b27 100644 GIT binary patch delta 981 zcmYjPO-K}B7=FKRzL{N3M{RS(B3PH8U9oVXgV^qhqf@Qu&N?%)^dn;aEK8wc76|6r zF~O6Nr|lS>mY@!?NCaIC?;S!x_7I*Fyl&4oqts<)-sk<9=Xu`ud)rCtrw|X>RxU(p z$Km16>-6I)4Q7X%KCkdsytK{@x;Hv_-_c3cBNU_^VNh&odilj%cf5^)z#2X5foYq~ zBoGTP9-6RiGwXKyHRJzdtrXA?#2F^X=8Frn@n+KWQ^ZxKVEFh%#%;l%g!m|GCH_^3 zQYPz~cFs0kQq&4tV+IWxmhDDC>4Va)8k7nW(~p!QMkf8w5n%#PH+p!=3wo26h=X6f zG>O#I((LriObdQpW)bS5oLYdo3QK`PgnDUXDD3wQqSf-iO{Vni4SnokS}&NC-Axp_DusnBbibcVO-=hHZZfbb$OB78+Kn zSnxVX-v()Ei(y%Amv^=t$N{kEh1K4%?E;aEE;^8Xy12NKjC=TTC9>Gyrnx%pH*qAvy&<1zsMOcZ@2F1YRu1;_C8)Ts9ts-6PmupN1 iq`d{r7Z}D3b_OqgAyDez{-ne;rUo7Q1(T=l5c>}sEF)BY9%|{s)6q3oHM0A!kUdB)Jz0HICU4! zyWMy*yV{j7f)r_2g>=;lx{z324cbk3CDHAAzB4s%&h|d<&-c8~`y91?Y0T z#Jj5BzxL98ZNIkHO`~Bw4$#q6tpX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