Fix NEXT jump (close #3).

This commit is contained in:
Lawrence Kesteloot 2023-08-28 21:58:51 -07:00
parent 98c79e5100
commit 00922326e7

2
main.c
View File

@ -1270,7 +1270,7 @@ static void compile_buffer(uint8_t *buffer, uint16_t line_number) {
c[7] = 3; // Skip over indirect jump.
// Jump to top of loop, indirectly through ptr1, which has the address.
c[8] = I_JMP_IND;
c[9] = (uint8_t) &ptr1 & 0x0F;
c[9] = (uint8_t) &ptr1 & 0xFF;
c[10] = (uint8_t) &ptr1 >> 8;
g_c = c + 11;
} else if (*s == T_DIM) {