Fixed issue with assembler segfault
This commit is contained in:
parent
c2a5c8cac2
commit
ebdb079cae
2
build.sh
2
build.sh
|
@ -28,7 +28,7 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Assembling.."
|
echo "Assembling.."
|
||||||
./bin/assembler projects/software/noodle.usm bin/boot.rom
|
./bin/assembler projects/software/left.usm bin/boot.rom
|
||||||
|
|
||||||
echo "Running.."
|
echo "Running.."
|
||||||
if [ "${2}" = '--cli' ];
|
if [ "${2}" = '--cli' ];
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
|
|
||||||
%8+ { #0008 ADD2 }
|
%8+ { #0008 ADD2 }
|
||||||
%8* { #0030 SFT2 }
|
%8* { #0030 SFT2 }
|
||||||
|
%MOD2 { #03 AND }
|
||||||
|
|
||||||
|
;cursor { x 2 y 2 blink 1 }
|
||||||
|
|
||||||
|
|
||||||
|0100 ;Console { pad 8 char 1 byte 1 short 2 }
|
|0100 ;Console { pad 8 char 1 byte 1 short 2 }
|
||||||
|0110 ;Screen { width 2 height 2 pad 4 y 2 x 2 color 1 }
|
|0110 ;Screen { width 2 height 2 pad 4 y 2 x 2 color 1 }
|
||||||
|
@ -15,6 +19,15 @@
|
||||||
|
|
||||||
@FRAME
|
@FRAME
|
||||||
|
|
||||||
|
( update cursor )
|
||||||
|
#02 ~cursor.blink #01 EQU ADD =Sprite.color
|
||||||
|
|
||||||
|
,cursor_icn =Sprite.addr
|
||||||
|
~cursor.blink MOD2 #00 EQU =cursor.blink
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
~Keys #00 EQU ^$end JNZ
|
~Keys #00 EQU ^$end JNZ
|
||||||
|
|
||||||
( enter key )
|
( enter key )
|
||||||
|
@ -34,6 +47,8 @@
|
||||||
|
|
||||||
BRK
|
BRK
|
||||||
|
|
||||||
|
@cursor_icn [ ffff ffff ffff ffff ]
|
||||||
|
|
||||||
@font ( spectrum-zx font )
|
@font ( spectrum-zx font )
|
||||||
[
|
[
|
||||||
0000 0000 0000 0000 0000 2400 7e3c 0000 0000 2400 3c42 0000 0000 6c7c 7c38 1000
|
0000 0000 0000 0000 0000 2400 7e3c 0000 0000 2400 3c42 0000 0000 6c7c 7c38 1000
|
||||||
|
|
|
@ -263,8 +263,8 @@ walktoken(char *w)
|
||||||
if(findopcode(w) || scmp(w, "BRK", 4))
|
if(findopcode(w) || scmp(w, "BRK", 4))
|
||||||
return 1;
|
return 1;
|
||||||
switch(w[0]) {
|
switch(w[0]) {
|
||||||
case '=': return 4 - (findlabeladdr(w + 1) < 0x0100); /* POK/STR helper (lit addr(1/2) str) */
|
case '=': return 4 - (findlabel(w + 1) && findlabeladdr(w + 1) < 0x0100); /* POK/STR helper (lit addr(1/2) str) */
|
||||||
case '~': return 4 - (findlabeladdr(w + 1) < 0x0100); /* PEK/LDR helper (lit addr(1/2) ldr) */
|
case '~': return 4 - (findlabel(w + 1) && findlabeladdr(w + 1) < 0x0100); /* PEK/LDR helper (lit addr(1/2) ldr) */
|
||||||
case ',': return 3; /* lit2 addr-hb addr-lb */
|
case ',': return 3; /* lit2 addr-hb addr-lb */
|
||||||
case '.': return 2; /* addr-hb addr-lb */
|
case '.': return 2; /* addr-hb addr-lb */
|
||||||
case '^': return 2; /* Relative jump: lit addr-offset */
|
case '^': return 2; /* Relative jump: lit addr-offset */
|
||||||
|
|
|
@ -436,6 +436,7 @@ datetime_poke(Uxn *u, Uint16 ptr, Uint8 b0, Uint8 b1)
|
||||||
m[ptr + 8] = (t->tm_yday & 0xff00) >> 8;
|
m[ptr + 8] = (t->tm_yday & 0xff00) >> 8;
|
||||||
m[ptr + 9] = t->tm_yday & 0xff;
|
m[ptr + 9] = t->tm_yday & 0xff;
|
||||||
m[ptr + 10] = t->tm_isdst;
|
m[ptr + 10] = t->tm_isdst;
|
||||||
|
(void)b0;
|
||||||
return b1;
|
return b1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue