Reinstated check for labels in zero page
This commit is contained in:
parent
3474b3a4f1
commit
e7f234f55b
|
@ -3,7 +3,7 @@
|
||||||
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
|
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
|
||||||
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ]
|
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ]
|
||||||
|
|
||||||
|0100
|
|0000
|
||||||
|
|
||||||
@dvd [ &x $2 &y $2 &dx $1 &dy $1 ]
|
@dvd [ &x $2 &y $2 &dx $1 &dy $1 ]
|
||||||
|
|
||||||
|
|
|
@ -233,6 +233,8 @@ parsetoken(char *w)
|
||||||
Label *l;
|
Label *l;
|
||||||
Macro *m;
|
Macro *m;
|
||||||
if(w[0] == '.' && (l = findlabel(w + 1))) { /* zero-page */
|
if(w[0] == '.' && (l = findlabel(w + 1))) { /* zero-page */
|
||||||
|
if(l->addr > 0xff)
|
||||||
|
return error("Address is not in zero page", w);
|
||||||
pushbyte(l->addr, 1);
|
pushbyte(l->addr, 1);
|
||||||
return ++l->refs;
|
return ++l->refs;
|
||||||
} else if(w[0] == ',' && (l = findlabel(w + 1))) {
|
} else if(w[0] == ',' && (l = findlabel(w + 1))) {
|
||||||
|
|
Loading…
Reference in New Issue