Avoid combining literals across | or $ pads.

This commit is contained in:
Andrew Alderwick 2021-11-28 18:07:10 +00:00
parent 9415c4e04a
commit 6ba2af5c62
2 changed files with 4 additions and 0 deletions

View File

@ -641,9 +641,11 @@
#00 JMP2r
@asma-pad-absolute
;asma-flush-lit JSR2
#0000 ,asma-pad-helper JMP
@asma-pad-relative
;asma-flush-lit JSR2
;asma/addr LDA2
( fall through )

View File

@ -254,11 +254,13 @@ tokenize(char *w, FILE *f)
if(!sihx(w + 1))
return error("Invalid padding", w);
p.ptr = shex(w + 1);
litlast = 0;
break;
case '$': /* pad-relative */
if(!sihx(w + 1))
return error("Invalid padding", w);
p.ptr += shex(w + 1);
litlast = 0;
break;
case '@': /* label */
if(!makelabel(w + 1))