Tiny optimization

This commit is contained in:
neauoire 2021-04-04 10:03:20 -07:00
parent ab889172cf
commit 98da3cbe31
3 changed files with 4 additions and 4 deletions

View File

@ -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' ];

View File

@ -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);

View File

@ -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