0
0
Fork 0
mirror of https://git.sr.ht/~rabbits/uxn synced 2024-11-27 08:13:01 +00:00

Reinstated check for labels in zero page

This commit is contained in:
Andrew Alderwick 2021-04-21 21:01:50 +01:00
parent 3474b3a4f1
commit e7f234f55b
2 changed files with 3 additions and 1 deletions

View file

@ -3,7 +3,7 @@
|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 ]
|0100
|0000
@dvd [ &x $2 &y $2 &dx $1 &dy $1 ]

View file

@ -233,6 +233,8 @@ parsetoken(char *w)
Label *l;
Macro *m;
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);
return ++l->refs;
} else if(w[0] == ',' && (l = findlabel(w + 1))) {