0
0
Fork 0
mirror of https://git.sr.ht/~rabbits/uxn synced 2024-11-30 17:53:01 +00:00

Implemented : for ; without LIT2

This commit is contained in:
Andrew Alderwick 2021-04-20 21:05:34 +01:00
parent 65c3a72730
commit f06a600231

View file

@ -212,6 +212,7 @@ walktoken(char *w)
case ']': return 0;
case '.': return 2; /* zero-page: LIT addr-lb */
case ',': return 2; /* relative: LIT addr-rel */
case ':': return 2; /* absolute: addr-hb addr-lb */
case ';': return 3; /* absolute: LIT addr-hb addr-lb */
case '$': return shex(w + 1);
case '#': return slen(w + 1) == 4 ? 3 : 2;
@ -239,6 +240,9 @@ parsetoken(char *w)
return error("Address is too far", w);
pushbyte((Sint8)off, 1);
return ++l->refs;
} else if(w[0] == ':' && (l = findlabel(w + 1))) { /* absolute */
pushshort(l->addr, 0);
return ++l->refs;
} else if(w[0] == ';' && (l = findlabel(w + 1))) { /* absolute */
pushshort(l->addr, 1);
return ++l->refs;