Fixed issue with null vectors
This commit is contained in:
parent
ddac370775
commit
5167a103ec
|
@ -319,7 +319,7 @@ int
|
|||
uxn_eval(Uxn *u, Uint16 vec)
|
||||
{
|
||||
Uint8 instr;
|
||||
if(u->dev[0].dat[0xf])
|
||||
if(!vec || u->dev[0].dat[0xf])
|
||||
return 0;
|
||||
u->ram.ptr = vec;
|
||||
if(u->wst.ptr > 0xf8) u->wst.ptr = 0xf8;
|
||||
|
|
|
@ -228,7 +228,7 @@ int
|
|||
uxn_eval(Uxn *u, Uint16 vec)
|
||||
{
|
||||
Uint8 instr;
|
||||
if(u->dev[0].dat[0xf])
|
||||
if(!vec || u->dev[0].dat[0xf])
|
||||
return 0;
|
||||
u->ram.ptr = vec;
|
||||
if(u->wst.ptr > 0xf8) u->wst.ptr = 0xf8;
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
( dev/audio )
|
||||
|
||||
%4** { #20 SFT2 }
|
||||
%8** { #30 SFT2 }
|
||||
%MOD { DUP2 DIV MUL SUB }
|
||||
|
||||
( devices )
|
||||
|
@ -55,7 +53,7 @@ BRK
|
|||
|
||||
@on-frame ( -> )
|
||||
|
||||
( incr ) .timer LDZ #01 ADD .timer STZ
|
||||
( incr ) .timer LDZ INC .timer STZ
|
||||
( skip ) .timer LDZ #10 EQU #01 JCN [ BRK ]
|
||||
|
||||
( get note )
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
( GUI Shapes )
|
||||
|
||||
%RTN { JMP2r }
|
||||
%++ { #0001 ADD2 }
|
||||
%-- { #0001 SUB2 }
|
||||
%8++ { #0008 ADD2 }
|
||||
%2** { #10 SFT2 }
|
||||
|
@ -79,7 +78,7 @@ RTN
|
|||
( save ) OVR2 .Screen/y DEO2
|
||||
( draw ) .rect/x1 LDZ2 .Screen/x DEO2 .color LDZ DUP .Screen/pixel DEO
|
||||
( draw ) .rect/x2 LDZ2 .Screen/x DEO2 .Screen/pixel DEO
|
||||
( incr ) SWP2 ++ SWP2
|
||||
( incr ) SWP2 INC2 SWP2
|
||||
OVR2 OVR2 LTS2 ,&ver JCN
|
||||
POP2 POP2
|
||||
.rect/x1 LDZ2 .rect/x2 LDZ2
|
||||
|
@ -87,8 +86,8 @@ RTN
|
|||
( save ) OVR2 .Screen/x DEO2
|
||||
( draw ) .rect/y1 LDZ2 .Screen/y DEO2 .color LDZ DUP .Screen/pixel DEO
|
||||
( draw ) .rect/y2 LDZ2 .Screen/y DEO2 .Screen/pixel DEO
|
||||
( incr ) SWP2 ++ SWP2
|
||||
OVR2 OVR2 ++ LTS2 ,&hor JCN
|
||||
( incr ) SWP2 INC2 SWP2
|
||||
OVR2 OVR2 INC2 LTS2 ,&hor JCN
|
||||
POP2 POP2
|
||||
|
||||
RTN
|
||||
|
@ -103,10 +102,10 @@ RTN
|
|||
&hor
|
||||
( save ) OVR2 .Screen/x DEO2
|
||||
( draw ) .color LDZ .Screen/pixel DEO
|
||||
( incr ) SWP2 ++ SWP2
|
||||
( incr ) SWP2 INC2 SWP2
|
||||
OVR2 OVR2 LTS2 ,&hor JCN
|
||||
POP2 POP2 STH2r STH2r
|
||||
( incr ) SWP2 ++ SWP2
|
||||
( incr ) SWP2 INC2 SWP2
|
||||
OVR2 OVR2 LTS2 ,&ver JCN
|
||||
POP2 POP2 POP2 POP2
|
||||
|
||||
|
@ -119,7 +118,7 @@ RTN
|
|||
.circle/r LDZ2 2** .circle/d STZ2
|
||||
( draw ) ;&seg JSR2
|
||||
&loop
|
||||
( incr ) .circle/x LDZ2 ++ .circle/x STZ2
|
||||
( incr ) .circle/x LDZ2 INC2 .circle/x STZ2
|
||||
.circle/d LDZ2 #0001 LTS2 ,&else JCN
|
||||
( decr ) .circle/y LDZ2 -- .circle/y STZ2
|
||||
.circle/x LDZ2 .circle/y LDZ2 SUB2 4** .circle/d LDZ2 ADD2 .circle/d STZ2
|
||||
|
@ -167,7 +166,7 @@ RTN
|
|||
&loop
|
||||
( save ) OVR2 .Screen/x DEO2
|
||||
( draw ) STHkr .Screen/pixel DEO
|
||||
( incr ) SWP2 #0002 ++ SWP2
|
||||
( incr ) SWP2 #0002 INC2 SWP2
|
||||
LTH2k ,&loop JCN
|
||||
POP2 POP2 POPr
|
||||
|
||||
|
@ -179,7 +178,7 @@ RTN
|
|||
&loop
|
||||
( save ) OVR2 .Screen/y DEO2
|
||||
( draw ) STHkr .Screen/pixel DEO
|
||||
( incr ) SWP2 #0002 ++ SWP2
|
||||
( incr ) SWP2 #0002 INC2 SWP2
|
||||
LTH2k ,&loop JCN
|
||||
POP2 POP2 POPr
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ int
|
|||
uxn_eval(Uxn *u, Uint16 vec)
|
||||
{
|
||||
Uint8 instr;
|
||||
if(u->dev[0].dat[0xf])
|
||||
if(!vec || u->dev[0].dat[0xf])
|
||||
return 0;
|
||||
u->ram.ptr = vec;
|
||||
if(u->wst.ptr > 0xf8) u->wst.ptr = 0xf8;
|
||||
|
|
Loading…
Reference in New Issue