From d8f27c84ab62206d10bb1f1ac7835b01aa60edd5 Mon Sep 17 00:00:00 2001 From: neauoire Date: Mon, 18 Apr 2022 09:28:14 -0700 Subject: [PATCH] Swapped opcodes --- etc/drifblim.rom | Bin 1420 -> 1399 bytes src/uxn.c | 10 +++++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/etc/drifblim.rom b/etc/drifblim.rom index 3b992bbceef225ac7b4e93b4b66a8ea68ce385db..33340996f10627ea930443d25c8aa3d48d8d1cb4 100644 GIT binary patch literal 1399 zcmYjQL2MgE6dil*jh%Sbh1l4w8sgbn8>e#D4kV53iZpI*NJ1WSJ>~z>RlaC~A@h-eeH`Ny_Hwy!>3Q%+yq)EgEpycOEkSx;aLI$`82!xcRbnDnNtyDPCaRc0a4W7u zrr>d2`B+gKb72!-Oe?dhg5SFRCzDL*&%x_1a!4k~YJ#Sd*IhME%fVzq{;%Zlb4o@@ z$pgBf9pR>)375+{%Kx$3*Cj;z%?aHS9_5KU9^|`)sdk&Ho4tajr%lRTZF_hyK_;(v z|1;k4=wtszJfaU|4P8*sIi6VfJc1bupGK%Auxw#l1#;Q`V$LF56`0a19NJlwvN3IE zhhDDe;7>BoCM@*~i(pC773#k~$nT`nX#fh{K3nE1#(ME~2Tm9PF0f@e{Ue&a zSD>v$frrEm0R$sZ2v`9yi-aT^-9o(GBjz3+Pmq+RgEJN;cuu7l*Z_<@D)?QYhdB#_ z+;;=Nkdt82F!fBVk0xny1WYR_ZTRFC>)@3T>Z8$<9c+Yfwx3+m8>1(wx2N2$$**!k zr1k4!EEy;YMA(iVouuW@Y!SuCG2wl#ZAUni{SRXRyOk0(1ACNXu3Hc_DJuax+t ziQM1-N<(|Gi<>x0`31^D+>dRE{BDVr-Eypu?t*!7`VUE9n;;DDTjff1zEZ7~E0yN*k;UbO%KVA) zQl-`?S8I*t>#ZY=H!rSTW%BKJ*}3=D+4=Sc+gLl#F0H-KHoVKMeC5j8xGqY^Zk0Ap0-;VPB@RjK+D?j6kmAsMps$)J z1u00CdX`m{1&fgo6-X~#MO8&MAQrHQ#Fj-=g(?!8W`RVJz^q`wBHU*aQ5K&2d2jAL z_nbQx$_r>4V1ls>UVKSKqE*M8mM(M{brGyOg1zx7LejtH#1>efE|gJ61fq^70^d18 ziFPt<4G5;-;eb%ecr*ZpkckHuy70Tfk-n>;$H3{P*>6M4K;oW;R}8@}CXp}&%Zi}u z1UMAzA0xvWhE5wTxdhP##o$8U5c;A|2OVLw8k_y(S-p;JbIYWU1YL17uU{-}VUCcxKoO;_#3!5GAuIiB2$e zPz1S?Bq{JDD-<>;vsjB=X4xzY4oc05j6lkg3=w911%#r0gQMio+FXoiJv z&156@zcC&YLIe?vKtMBtU?$N?V7BSiI^p;5t-X8TQ&R=X%Hd_RiSm0LG+}Ga0^bI zh$9=P)uq3MA0*y3QzU4q!)9Z7&zwonQ1MP`NiFzfp<0-}R4SI-nbLHjRJmFz&X&u? z>e!W;>9H$sR>vo+;}cV*iA&QHm2!nbcdk;Mn{>%9PrCU^HSdlU+_7Tbbt^NYQ!|rp zVKzVQ7R&juV!3j;I$C~fWpSPH_djIUKU!r=wKcZ3xWsNOe$3Xqn=F6p*5b_tzIZ*s qZmV~D)K4y|pQqFZj=I&SZVjtn52@duQg?0j$7|}ryXrwwjs64dPs2$7 diff --git a/src/uxn.c b/src/uxn.c index 9436e14..3136af0 100644 --- a/src/uxn.c +++ b/src/uxn.c @@ -55,11 +55,11 @@ uxn_eval(Uxn *u, Uint16 pc) else { a = u->ram[pc]; PUSH8(src, a) pc++; } break; case 0x01: /* INC */ POP(a) PUSH(src, a + 1) break; case 0x02: /* POP */ POP(a) break; - case 0x03: /* DUP */ POP(a) PUSH(src, a) PUSH(src, a) break; - case 0x04: /* NIP */ POP(a) POP(b) PUSH(src, a) break; - case 0x05: /* SWP */ POP(a) POP(b) PUSH(src, a) PUSH(src, b) break; - case 0x06: /* OVR */ POP(a) POP(b) PUSH(src, b) PUSH(src, a) PUSH(src, b) break; - case 0x07: /* ROT */ POP(a) POP(b) POP(c) PUSH(src, b) PUSH(src, a) PUSH(src, c) break; + case 0x03: /* NIP */ POP(a) POP(b) PUSH(src, a) break; + case 0x04: /* SWP */ POP(a) POP(b) PUSH(src, a) PUSH(src, b) break; + case 0x05: /* ROT */ POP(a) POP(b) POP(c) PUSH(src, b) PUSH(src, a) PUSH(src, c) break; + case 0x06: /* DUP */ POP(a) PUSH(src, a) PUSH(src, a) break; + case 0x07: /* OVR */ POP(a) POP(b) PUSH(src, b) PUSH(src, a) PUSH(src, b) break; /* Logic */ case 0x08: /* EQU */ POP(a) POP(b) PUSH8(src, b == a) break; case 0x09: /* NEQ */ POP(a) POP(b) PUSH8(src, b != a) break;