bsnes/higan/processor/spc700/memory.hpp

20 lines
422 B
C++
Raw Normal View History

2011-11-17 12:05:35 +00:00
alwaysinline uint8 op_readpc() {
return op_read(regs.pc++);
}
2011-11-17 12:05:35 +00:00
alwaysinline uint8 op_readsp() {
return op_read(0x0100 | ++regs.s);
}
2011-11-17 12:05:35 +00:00
alwaysinline void op_writesp(uint8 data) {
return op_write(0x0100 | regs.s--, data);
}
2011-11-17 12:05:35 +00:00
alwaysinline uint8 op_readdp(uint8 addr) {
return op_read((regs.p.p << 8) + addr);
}
2011-11-17 12:05:35 +00:00
alwaysinline void op_writedp(uint8 addr, uint8 data) {
return op_write((regs.p.p << 8) + addr, data);
}