📄 emu65816.hpp
字号:
/*
*/
#pragma pack (push,4)
struct regpack {
dword PC; // 24-bit complete program counter
union { // Y index register - Used as a pointer, OR as an offset into an array
dword Y_dummy;
word Y;
byte Y_lo;
};
union { // X index register - ''
dword X_dummy;
word X;
byte X_lo;
};
struct {
byte DBR_dummy1; // Must be 0 for assembly to work
byte DBR_dummy2;
byte DBR; // Data Bank - Selects bank of data access (certain addr. modes)
byte DBR_dummy3;
};
union {
dword D_dummy;
word D; // Direct register - Pointer used to offset direct addressing (bank 0)
};
union { // 8/16 bit accumulator - Used for math and stuff
dword A_dummy;
word A;
byte A_lo;
};
union {
byte P; // Status register - i.e. Flags
// 7 6 5 4 3 2 1 0 Negative, oVerflow, 16-bit accuMulator, 16-bit
// N V M X D I Z C indeX, bcD mode, Interrupt Disable, Zero, Carry
dword P_dummy; // Note: if E=1, X is the B(Hardware Break?) flag, and M is always 1
};
union {
dword S_dummy;
word S; // Stack register. (bank 0)
};
union {
dword E_dummy;
boolean E; // Emulation mode flag
};
};
#pragma pack (pop)
extern "C" {
extern struct regpack __cdecl reg; // Set of registers when not running.
void __cdecl doemulate (void);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -