uxn

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

commit 98da3cbe3170415fe8ce79a3b9bb5ea5cfe7ed63
parent ab889172cf3e3ad20d71f5dc93626aeddea6c577
Author: neauoire <aliceffekt@gmail.com>
Date:   Sun,  4 Apr 2021 10:03:20 -0700

Tiny optimization

Diffstat:
Mbuild.sh | 2+-
Msrc/uxn.c | 2+-
Msrc/uxn.h | 4++--
3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/build.sh b/build.sh @@ -28,7 +28,7 @@ else fi echo "Assembling.." -./bin/assembler projects/examples/dev.time.usm bin/boot.rom +./bin/assembler projects/software/left.usm bin/boot.rom echo "Running.." if [ "${2}" = '--cli' ]; diff --git a/src/uxn.c b/src/uxn.c @@ -145,7 +145,7 @@ opcuxn(Uxn *u, Uint8 instr) int stepuxn(Uxn *u, Uint8 instr) { - if(getflag(&u->status, FLAG_LIT2) || getflag(&u->status, FLAG_LIT1)) + if(u->status & 0x0c) lituxn(u, instr); else opcuxn(u, instr); diff --git a/src/uxn.h b/src/uxn.h @@ -17,8 +17,8 @@ typedef unsigned short Uint16; typedef signed short Sint16; #define FLAG_HALT 0x01 -#define FLAG_LIT1 0x02 -#define FLAG_LIT2 0x04 +#define FLAG_LIT1 0x04 +#define FLAG_LIT2 0x08 #define PAGE_DEVICE 0x0100 #define PAGE_VECTORS 0x0200