65oo2/lib/op.h

46 lines
1,004 B
C

#ifndef OP_H
# define OP_H 1
# include <stdint.h>
# define OP_MAX 256
# define OP_ADDR_IMPL 0
# define OP_ADDR_REL 1 << 0
# define OP_ADDR_IMM 1 << 1
# define OP_ADDR_IND 1 << 2
# define OP_ADDR_ABS 1 << 3
# define OP_ADDR_X 1 << 4
# define OP_ADDR_Y 1 << 5
# define OP_BRK_impl 0x00
# define OP_ORA_x_ind 0x01
# define OP_PHP_impl 0x08
# define OP_ORA_imm 0x09
# define OP_ORA_abs 0x0D
# define OP_ASL_abs 0x0E
# define OP_BPL_rel 0x10
# define OP_ORA_ind_y 0x11
# define OP_CLC_impl 0x18
# define OP_ORA_abs_y 0x19
# define OP_ORA_abs_x 0x1D
# define OP_ASL_abs_x 0x1E
# define OP_JSR_abs 0x20
# define OP_AND_x_ind 0x21
# define OP_PLP_impl 0x28
# define OP_AND_imm 0x29
# define OP_ROL_a 0x2A
# define OP_BIT_abs 0x2C
# define OP_AND_abs 0x2D
# define OP_ROL_abs 0x2E
# define OP_BMI_rel 0x30
# define OP_AND_ind_y 0x31
extern const uint8_t opcode_addr[];
extern const char *opcode_str[];
#endif /* !OP_H */