diff --git a/src/emulation.c b/src/emulation.c index c14c886..b57c4f1 100644 --- a/src/emulation.c +++ b/src/emulation.c @@ -41,14 +41,14 @@ emul_nop(rk65c02emu_t *e, instruction_t *i) /* PHA - push accumulator to stack */ void -emul_pha(rk6502emu_t *e, instruction_t *i) +emul_pha(rk65c02emu_t *e, instruction_t *i) { stack_push(e, e->regs.A); } /* PLA - pull from stack to accumulator */ void -emul_pla(rk65c02emu_t *e, instruciton_t *i) +emul_pla(rk65c02emu_t *e, instruction_t *i) { e->regs.A = stack_pop(e); diff --git a/src/emulation.h b/src/emulation.h index 2a03c91..e3d83b5 100644 --- a/src/emulation.h +++ b/src/emulation.h @@ -7,6 +7,8 @@ void emul_and(rk65c02emu_t *, instruction_t *); void emul_lda(rk65c02emu_t *, instruction_t *); void emul_nop(rk65c02emu_t *, instruction_t *); +void emul_pha(rk65c02emu_t *, instruction_t *); +void emul_pla(rk65c02emu_t *, instruction_t *); void emul_stp(rk65c02emu_t *, instruction_t *); #endif /* _EMULATION_H_*/ diff --git a/src/instruction.h b/src/instruction.h index 71760a2..ce7b5a5 100644 --- a/src/instruction.h +++ b/src/instruction.h @@ -46,6 +46,7 @@ void disassemble(bus_t *, uint16_t); uint8_t instruction_data_read_1(rk65c02emu_t *, instrdef_t *, instruction_t *); void instruction_status_adjust_zero(rk65c02emu_t *, uint8_t); void instruction_status_adjust_negative(rk65c02emu_t *, uint8_t); -//void instruction_execute(rk65c02emu_t *, instruction_t *); +void stack_push(rk65c02emu_t *, uint8_t); +uint8_t stack_pop(rk65c02emu_t *); #endif /* _INSTRUCTION_H_ */