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 #00 JMP2r
@asma-pad-absolute @asma-pad-absolute
;asma-flush-lit JSR2
#0000 ,asma-pad-helper JMP #0000 ,asma-pad-helper JMP
@asma-pad-relative @asma-pad-relative
;asma-flush-lit JSR2
;asma/addr LDA2 ;asma/addr LDA2
( fall through ) ( fall through )

View File

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