1
0
mirror of https://github.com/RevCurtisP/C02.git synced 2024-06-08 21:29:30 +00:00

Fixed bug parsing integer literals

This commit is contained in:
Curtis F Kaylor 2019-05-27 17:10:33 -04:00
parent ff0018c1d0
commit 71e15fb2d8

View File

@ -348,8 +348,8 @@ void prsxpi(char trmntr, int asmxpr) {
DEBUG("Parsing Integer Literal\n", 0)
int number = prsnum(0xFFFF); //Parse Number into value
if (asmxpr) {
sprintf(value, "%d", number & 0xFF); asmlin("LDX", value);
sprintf(value, "%d", number >> 8); asmlin("LDY", value);
sprintf(value, "#%d", number & 0xFF); asmlin("LDX", value);
sprintf(value, "#%d", number >> 8); asmlin("LDY", value);
}
} else if (isalph()) {
prsvar(FALSE, TRUE);