# Copyright (C) 2014-2015 Ben Kurtovic # Released under the terms of the MIT License. See LICENSE for details. # *** ASM Instruction Description File *** # This file is used to generate 'instructions.inc.c'. # `make` should trigger a rebuild when this file is modified; if not, use: # `python scripts/update_asm_instructions.py`. --- adc: args: yes cases: - type: [register, register] cases: - cond: [a, a] return: [0x8F] - cond: [a, b] return: [0x88] - cond: [a, c] return: [0x89] - cond: [a, d] return: [0x8A] - cond: [a, e] return: [0x8B] - cond: [a, h|ih] return: [0x8C] - cond: [a, l|il] return: [0x8D] - cond: [hl, bc] return: [0xED, 0x4A] - cond: [hl, de] return: [0xED, 0x5A] - cond: [hl, hl] return: [0xED, 0x6A] - cond: [hl, sp] return: [0xED, 0x7A] - type: [register, immediate] cases: - cond: [a, u8] return: [0xCE, u8] - type: [register, indirect_hl_or_indexed] cases: - cond: [a, _] return: [0x8E] add: args: yes cases: - type: [register, register] cases: - cond: [a, a] return: [0x87] - cond: [a, b] return: [0x80] - cond: [a, c] return: [0x81] - cond: [a, d] return: [0x82] - cond: [a, e] return: [0x83] - cond: [a, h|ih] return: [0x84] - cond: [a, l|il] return: [0x85] - cond: [hl|i, bc] return: [0x09] - cond: [hl|i, de] return: [0x19] - cond: [hl|i, hl] return: [0x29] - cond: [hl|i, sp] return: [0x39] - type: [register, immediate] cases: - cond: [a, u8] return: [0xC6, u8] - type: [register, indirect_hl_or_indexed] cases: - cond: [a, _] return: [0x86] # and: # args: no # return: error # bit: # args: no # return: error # call: # args: no # return: error ccf: args: no return: [0x3F] # cp: # args: no # return: error cpd: args: no return: [0xED, 0xA9] cpdr: args: no return: [0xED, 0xB9] cpi: args: no return: [0xED, 0xA1] cpir: args: no return: [0xED, 0xB1] cpl: args: no return: [0x2F] daa: args: no return: [0x27] # dec: # args: no # return: error di: args: no return: [0xF3] # djnz: # args: no # return: error ei: args: no return: [0xFB] # ex: # args: no # return: error exx: args: no return: [0xD9] halt: args: no return: [0x76] # im: # args: no # return: error # in: # args: no # return: error inc: args: yes cases: - type: [register] cases: - cond: [a] return: [0x3C] - cond: [b] return: [0x04] - cond: [c] return: [0x0C] - cond: [d] return: [0x14] - cond: [e] return: [0x1C] - cond: [h|ih] return: [0x24] - cond: [l|il] return: [0x2C] - cond: [bc] return: [0x03] - cond: [de] return: [0x13] - cond: [hl|i] return: [0x23] - cond: [sp] return: [0x33] - type: [indirect_hl_or_indexed] cases: - cond: [_] return: [0x34] ind: args: no return: [0xED, 0xAA] indr: args: no return: [0xED, 0xBA] ini: args: no return: [0xED, 0xA2] inir: args: no return: [0xED, 0xB2] # jp: # args: no # return: error # jr: # args: no # return: error # ld: # args: no # return: error ldd: args: no return: [0xED, 0xA8] lddr: args: no return: [0xED, 0xB8] ldi: args: no return: [0xED, 0xA0] ldir: args: no return: [0xED, 0xB0] neg: args: no return: [0xED, 0x44] nop: args: no return: [0x00] # or: # args: no # return: error otdr: args: no return: [0xED, 0xBB] otir: args: no return: [0xED, 0xB3] # out: # args: no # return: error outd: args: no return: [0xED, 0xAB] outi: args: no return: [0xED, 0xA3] # pop: # args: no # return: error # push: # args: no # return: error # res: # args: no # return: error # ret: # args: no # return: error reti: args: no return: [0xED, 0x4D] retn: args: no return: [0xED, 0x45] # rl: # args: no # return: error rla: args: no return: [0x17] # rlc: # args: no # return: error rlca: args: no return: [0x07] rld: args: no return: [0xED, 0x6F] # rr: # args: no # return: error rra: args: no return: [0x1F] # rrc: # args: no # return: error rrca: args: no return: [0x0F] # rrd: # args: no # return: error # rst: # args: no # return: error # sbc: # args: no # return: error scf: args: no return: [0x37] # set: # args: no # return: error # sl1: # args: no # return: error # sla: # args: no # return: error # sll: # args: no # return: error # sls: # args: no # return: error # sra: # args: no # return: error # srl: # args: no # return: error # sub: # args: no # return: error # xor: # args: no # return: error