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 /CPU.h | |
parent | 3dec06f9af2854969805cc3267a6095158a298dd (diff) |
and, asl, enable/disable flags
Diffstat (limited to 'CPU.h')
-rw-r--r-- | CPU.h | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -1,6 +1,15 @@ #ifndef _CPU #define _CPU +#define CARRY 0b00000001 +#define ZERO 0b00000010 +#define INTERRUPT_DISABLE 0b00000100 +#define DECIMAL_MODE 0b00001000 +#define BREAK 0b00010000 +#define BREAK2 0b00100000 +#define OVERFLOW 0b01000000 +#define NEGATIV 0b10000000 + struct CPU{ uint8_t register_a; uint8_t register_x; @@ -37,5 +46,10 @@ void lda(struct CPU *cpu, enum adressing_mode mode); void interpret(struct CPU *cpu); uint16_t mem_read_u16(struct CPU *cpu, uint16_t pos); uint16_t get_operand_address(struct CPU *cpu, enum adressing_mode mode); +void and(struct CPU *cpu, enum adressing_mode mode); +void enable_flag(struct CPU *cpu, uint8_t flag); +void disable_flag(struct CPU *cpu, uint8_t flag); +void asl(struct CPU *cpu, enum adressing_mode mode); + #endif
\ No newline at end of file |