From 381a70839df13ec06683dc234faebb4571f4c85c Mon Sep 17 00:00:00 2001 From: drmortalwombat <90205530+drmortalwombat@users.noreply.github.com> Date: Mon, 13 Dec 2021 22:23:54 +0100 Subject: [PATCH] Fix dynamic code generator library --- include/c64/asm6502.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/include/c64/asm6502.h b/include/c64/asm6502.h index 5c707f2..61d1659 100644 --- a/include/c64/asm6502.h +++ b/include/c64/asm6502.h @@ -88,6 +88,12 @@ inline byte asm_np(byte * ip, AsmIns ins) return 1; } +inline byte asm_ac(byte * ip, AsmIns ins) +{ + ip[0] = (ins & 0xff) | 0x08; + return 1; +} + inline byte asm_zp(byte * ip, AsmIns ins, byte addr) { ip[0] = (ins & 0xff) | 0x04; @@ -162,9 +168,9 @@ inline byte asm_ix(byte * ip, AsmIns ins, byte addr) return 2; } -inline byte * asm_iy(byte * ip, AsmIns ins, byte addr) +inline byte asm_iy(byte * ip, AsmIns ins, byte addr) { - ip[0] = (ins & 0xff) | 0x01; + ip[0] = (ins & 0xff) | 0x10; ip[1] = addr; return 2; }