mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-12 00:30:31 +00:00
Moved RET to the correct place, implemented POP AF.
This commit is contained in:
parent
c55e1c1d17
commit
5fe23113ec
@ -89,6 +89,7 @@ struct MicroOp {
|
|||||||
Move16,
|
Move16,
|
||||||
|
|
||||||
AssembleAF,
|
AssembleAF,
|
||||||
|
DisassembleAF,
|
||||||
|
|
||||||
None
|
None
|
||||||
} type;
|
} type;
|
||||||
@ -223,7 +224,7 @@ template <class T> class Processor: public MicroOpScheduler<MicroOp> {
|
|||||||
XX, /* 0xc6 ADD A, n */
|
XX, /* 0xc6 ADD A, n */
|
||||||
XX, /* 0xc7 RST 00h */
|
XX, /* 0xc7 RST 00h */
|
||||||
XX, /* 0xc8 RET Z */
|
XX, /* 0xc8 RET Z */
|
||||||
XX, /* 0xc9 RET */
|
Program(POP(pc_)), /* 0xc9 RET */
|
||||||
XX, /* 0xca JP Z */
|
XX, /* 0xca JP Z */
|
||||||
XX, /* 0xcb [CB page] */
|
XX, /* 0xcb [CB page] */
|
||||||
XX, /* 0xcc CALL Z */
|
XX, /* 0xcc CALL Z */
|
||||||
@ -248,8 +249,8 @@ template <class T> class Processor: public MicroOpScheduler<MicroOp> {
|
|||||||
XX, /* 0xe6 AND n */
|
XX, /* 0xe6 AND n */
|
||||||
XX, /* 0xe7 RST 20h */
|
XX, /* 0xe7 RST 20h */
|
||||||
XX, XX, XX, XX, XX, XX, XX, XX, // 0xe8
|
XX, XX, XX, XX, XX, XX, XX, XX, // 0xe8
|
||||||
Program(POP(pc_)), /* 0xf0 RET p */
|
XX, /* 0xf0 RET p */
|
||||||
XX, /* 0xf1 POP AF */
|
Program(POP(temporary_), {MicroOp::DisassembleAF}), /* 0xf1 POP AF */
|
||||||
XX, /* 0xf2 JP P */
|
XX, /* 0xf2 JP P */
|
||||||
XX, /* 0xf3 DI */
|
XX, /* 0xf3 DI */
|
||||||
XX, /* 0xf4 CALL P */
|
XX, /* 0xf4 CALL P */
|
||||||
@ -330,6 +331,10 @@ template <class T> class Processor: public MicroOpScheduler<MicroOp> {
|
|||||||
temporary_.bytes.high = a_;
|
temporary_.bytes.high = a_;
|
||||||
temporary_.bytes.low = get_flags();
|
temporary_.bytes.low = get_flags();
|
||||||
break;
|
break;
|
||||||
|
case MicroOp::DisassembleAF:
|
||||||
|
a_ = temporary_.bytes.high;
|
||||||
|
set_flags(temporary_.bytes.low);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
printf("Unhandled Z80 operation %d\n", operation->type);
|
printf("Unhandled Z80 operation %d\n", operation->type);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user