From: Lukas Krickl Date: Sun, 26 Nov 2023 07:13:16 +0000 (+0100) Subject: Added all instructions X-Git-Url: https://git.krickl.dev/?a=commitdiff_plain;h=94f4d69f72062702d83f2d83b6e33bc090feb883;p=ulas%2F.git Added all instructions --- diff --git a/src/ulas.c b/src/ulas.c index 5b70611..d4de43e 100644 --- a/src/ulas.c +++ b/src/ulas.c @@ -1485,7 +1485,7 @@ int ulas_asmregisr8(enum ulas_asmregs reg) { // prefixed , reg #define ULAS_INSTR_PREBITR8(name, base_op, bit, reg_right) \ { \ - (name), {(bit), ',', (reg_right), 0}, { 0xCB, base_op, 0 } \ + (name), {(bit), ',', (reg_right), 0}, { 0xCB, base_op, 0 } \ } #define ULAS_INSTR_PREBITR8D(name, base_op, bit) \ @@ -1695,7 +1695,33 @@ const struct ulas_instr ULASINSTRS[] = { ULAS_INSTR_PRER8D("sra", 0x18), ULAS_INSTR_PRER8D("swap", 0x30), ULAS_INSTR_PRER8D("srl", 0x38), + ULAS_INSTR_PREBITR8D("bit", 0x40, '0'), + ULAS_INSTR_PREBITR8D("bit", 0x48, '1'), + ULAS_INSTR_PREBITR8D("bit", 0x50, '2'), + ULAS_INSTR_PREBITR8D("bit", 0x58, '3'), + ULAS_INSTR_PREBITR8D("bit", 0x60, '4'), + ULAS_INSTR_PREBITR8D("bit", 0x68, '5'), + ULAS_INSTR_PREBITR8D("bit", 0x70, '6'), + ULAS_INSTR_PREBITR8D("bit", 0x78, '7'), + + ULAS_INSTR_PREBITR8D("res", 0x80, '0'), + ULAS_INSTR_PREBITR8D("res", 0x88, '1'), + ULAS_INSTR_PREBITR8D("res", 0x90, '2'), + ULAS_INSTR_PREBITR8D("res", 0x98, '3'), + ULAS_INSTR_PREBITR8D("res", 0xA0, '4'), + ULAS_INSTR_PREBITR8D("res", 0xA8, '5'), + ULAS_INSTR_PREBITR8D("res", 0xB0, '6'), + ULAS_INSTR_PREBITR8D("res", 0xB8, '7'), + + ULAS_INSTR_PREBITR8D("set", 0xC0, '0'), + ULAS_INSTR_PREBITR8D("set", 0xC8, '1'), + ULAS_INSTR_PREBITR8D("set", 0xD0, '2'), + ULAS_INSTR_PREBITR8D("set", 0xD8, '3'), + ULAS_INSTR_PREBITR8D("set", 0xE0, '4'), + ULAS_INSTR_PREBITR8D("set", 0xE8, '5'), + ULAS_INSTR_PREBITR8D("set", 0xF0, '6'), + ULAS_INSTR_PREBITR8D("set", 0xF8, '7'), {NULL}};