diff options
author | leo <leo@azuminha.com> | 2023-11-20 13:23:48 -0300 |
---|---|---|
committer | leo <leo@azuminha.com> | 2023-11-20 13:23:48 -0300 |
commit | 312f231d5d3b4523a5763eb01981885d0a66b8cd (patch) | |
tree | 1e7ade8b82f95fc56d12a4e41f16535634042eff /opcode_pc.h | |
parent | 3dec06f9af2854969805cc3267a6095158a298dd (diff) |
and, asl, enable/disable flags
Diffstat (limited to 'opcode_pc.h')
-rw-r--r-- | opcode_pc.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/opcode_pc.h b/opcode_pc.h index 8a95db8..7a79bbe 100644 --- a/opcode_pc.h +++ b/opcode_pc.h @@ -9,12 +9,14 @@ enum _INSTRUCTION{ BRK, STA, INX, + AND, + ASL, }; struct _OPCODE{ enum _INSTRUCTION instruction; enum adressing_mode mode; - int bytes; + uint8_t bytes; }OPCODE[0xFF]; void init_opcode_pc(){ @@ -41,6 +43,21 @@ void init_opcode_pc(){ OPCODE[0x91] = (struct _OPCODE){STA, Indirect_Y, 2}; /*INX*/ OPCODE[0xE8] = (struct _OPCODE){INX, NoneAddressing, 1}; + /*AND*/ + OPCODE[0x29] = (struct _OPCODE){AND, Immediate, 2}; + OPCODE[0x25] = (struct _OPCODE){AND, ZeroPage, 2}; + OPCODE[0x35] = (struct _OPCODE){AND, ZeroPage_X, 2}; + OPCODE[0x2D] = (struct _OPCODE){AND, Absolute, 3}; + OPCODE[0x3D] = (struct _OPCODE){AND, Absolute_X, 3}; + OPCODE[0x39] = (struct _OPCODE){AND, Absolute_Y, 3}; + OPCODE[0x21] = (struct _OPCODE){AND, Indirect_X, 2}; + OPCODE[0x31] = (struct _OPCODE){AND, Indirect_Y, 2}; + /*ASL*/ + OPCODE[0x0A] = (struct _OPCODE){ASL, NoneAddressing, 1}; + OPCODE[0x06] = (struct _OPCODE){ASL, ZeroPage, 2}; + OPCODE[0x16] = (struct _OPCODE){ASL, ZeroPage_X, 2}; + OPCODE[0x0E] = (struct _OPCODE){ASL, Absolute, 3}; + OPCODE[0x1E] = (struct _OPCODE){ASL, Absolute_X, 3}; } #endif
\ No newline at end of file |