File tree 1 file changed +9
-2
lines changed 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -278,10 +278,17 @@ class BackendUXN : CompilerBackend {
278
278
}
279
279
280
280
switch (size) {
281
- case 1 : output ~= " LDA #00 SWP \n " ; break ;
281
+ case 1 : output ~= " LDA\n " ; break ;
282
282
case 2 : output ~= " LDA2\n " ; break ;
283
283
default : Error (node.error, " Bad variable type size" );
284
284
}
285
+
286
+ if ((size == 1 ) && var.type.isSigned) {
287
+ output ~= " LIT2r 00ff DUP #80 AND ?{ SWPr } STHr POPr SWP\n " ;
288
+ }
289
+ else if (size == 1 ) {
290
+ output ~= " #00 SWP\n " ;
291
+ }
285
292
}
286
293
287
294
void PushGlobalValue (
@@ -309,7 +316,7 @@ class BackendUXN : CompilerBackend {
309
316
}
310
317
311
318
if ((size == 1 ) && var.type.isSigned) {
312
- output ~= " LITr 00 LITr ff DUP #80 AND ?{ SWPr } STHr POPr SWP\n " ;
319
+ output ~= " LIT2r 00ff DUP #80 AND ?{ SWPr } STHr POPr SWP\n " ;
313
320
}
314
321
else if (size == 1 ) {
315
322
output ~= " #00 SWP\n " ;
You can’t perform that action at this time.
0 commit comments