uxn

Varvara Ordinator, written in ANSI C(SDL2)
git clone https://git.eamoncaddigan.net/uxn.git
Log | Files | Refs | README | LICENSE

commit 9164b7f9fea0b2e513cec4a425872b820e444af3
parent 0c188ef3fafa7e3a248f14a6f4eef48b5ba2bad4
Author: neauoire <aliceffekt@gmail.com>
Date:   Wed, 12 May 2021 12:13:28 -0700

Reverted patch to sft16

Diffstat:
Mbuild.sh | 2+-
Mprojects/demos/bifurcan.usm | 8+++-----
Msrc/uxn.c | 2+-
3 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/build.sh b/build.sh @@ -42,7 +42,7 @@ then fi echo "Assembling.." -./bin/uxnasm projects/examples/devices/screen.usm bin/boot.rom +./bin/uxnasm projects/demos/bifurcan.usm bin/boot.rom echo "Running.." if [ "${2}" = '--cli' ]; diff --git a/projects/demos/bifurcan.usm b/projects/demos/bifurcan.usm @@ -63,7 +63,7 @@ BRK ;draw-cursor JSR2 .Mouse/state DEI #00 EQU ,&no-touch JCN - ( incr ) .style LDZ #01 ADD #04 MOD .style STZ + ( incr ) .style LDZ #01 ADD #03 MOD .style STZ ( bg ) ;tiles .style LDZ #10 MUL TOS ADD2 ;cover-pattern JSR2 ( fg ) ;redraw JSR2 ( release ) #00 .Mouse/state DEO @@ -114,7 +114,7 @@ RTN .Screen/addr DEO2 ( draw ) #21 .Screen/color DEO ( incr ) SWP #01 ADD SWP - DUP2 LTH ,&loop JCN + LTHk ,&loop JCN POP2 POPr @@ -171,6 +171,4 @@ RTN 0718 2040 4080 8080 0101 0102 0204 18e0 0808 0810 e304 0808 - 0808 0804 e310 0808 - 0000 0000 0000 0001 - ffff ffff ffff ffff ] + 0808 0804 e310 0808 ] diff --git a/src/uxn.c b/src/uxn.c @@ -99,7 +99,7 @@ void op_div16(Uxn *u) { Uint16 a = pop16(u->src, 0), b = pop16(u->src, 1); push1 void op_and16(Uxn *u) { Uint16 a = pop16(u->src, 0), b = pop16(u->src, 1); push16(u->src, b & a); } void op_ora16(Uxn *u) { Uint16 a = pop16(u->src, 0), b = pop16(u->src, 1); push16(u->src, b | a); } void op_eor16(Uxn *u) { Uint16 a = pop16(u->src, 0), b = pop16(u->src, 1); push16(u->src, b ^ a); } -void op_sft16(Uxn *u) { Uint16 a = pop16(u->src, 0), b = pop16(u->src, 1); push16(u->src, b >> (a & 0x0007) << ((a & 0x0070) >> 4)); } +void op_sft16(Uxn *u) { Uint16 a = pop16(u->src, 0), b = pop16(u->src, 1); push16(u->src, b >> (a & 0x000f) << ((a & 0x00f0) >> 4)); } void (*ops[])(Uxn *u) = { op_brk, op_lit, op_nop, op_pop, op_dup, op_swp, op_ovr, op_rot,