mirror of
https://github.com/mauiaaron/apple2.git
synced 2024-09-28 16:54:51 +00:00
Use CPP macro for duplicate assembly
This commit is contained in:
parent
c13caa0798
commit
a4670b1eda
@ -54,6 +54,7 @@ GLUE_BANK_READ(iie_read_slotx,base_cxrom)
|
|||||||
|
|
||||||
uint32_t softswitches;
|
uint32_t softswitches;
|
||||||
|
|
||||||
|
const uint8_t *base_vmem = apple_ii_64k[0];
|
||||||
uint8_t *base_ramrd;
|
uint8_t *base_ramrd;
|
||||||
uint8_t *base_ramwrt;
|
uint8_t *base_ramwrt;
|
||||||
uint8_t *base_textrd;
|
uint8_t *base_textrd;
|
||||||
|
@ -26,6 +26,12 @@
|
|||||||
#define X86_CF_Bit 0x0 /* x86 carry */
|
#define X86_CF_Bit 0x0 /* x86 carry */
|
||||||
#define X86_AF_Bit 0x4 /* x86 adj (nybble carry) */
|
#define X86_AF_Bit 0x4 /* x86 adj (nybble carry) */
|
||||||
|
|
||||||
|
#define RestoreAltZP \
|
||||||
|
/* Apple //e set stack point to ALTZP (or not) */ \
|
||||||
|
movLQ SN(base_stackzp), _XAX; \
|
||||||
|
subLQ SN(base_vmem), _XAX; \
|
||||||
|
orLQ _XAX, SP_Reg_X;
|
||||||
|
|
||||||
#if __LP64__
|
#if __LP64__
|
||||||
# define SZ_PTR 8
|
# define SZ_PTR 8
|
||||||
# define ROR_BIT 63
|
# define ROR_BIT 63
|
||||||
|
@ -2119,10 +2119,7 @@ E(cpu65_run)
|
|||||||
movb SN(cpu65_current)+5, Y_Reg
|
movb SN(cpu65_current)+5, Y_Reg
|
||||||
movb SN(cpu65_current)+6, SP_Reg_L
|
movb SN(cpu65_current)+6, SP_Reg_L
|
||||||
#ifdef APPLE2_VM
|
#ifdef APPLE2_VM
|
||||||
// Apple //e machine specific set stack point to ALTZP (or not)
|
RestoreAltZP
|
||||||
movLQ SN(base_stackzp), _XAX
|
|
||||||
subLQ $SN(apple_ii_64k), _XAX
|
|
||||||
orLQ _XAX, SP_Reg_X
|
|
||||||
#endif
|
#endif
|
||||||
jmp continue1
|
jmp continue1
|
||||||
|
|
||||||
|
@ -111,9 +111,7 @@ E(func) pushLQ XY_Reg_X; \
|
|||||||
#define GLUE_C_READ_ALTZP(FUNC) _GLUE_C_READ(FUNC, \
|
#define GLUE_C_READ_ALTZP(FUNC) _GLUE_C_READ(FUNC, \
|
||||||
pushLQ _XAX; \
|
pushLQ _XAX; \
|
||||||
andLQ $0xFFFF, SP_Reg_X; \
|
andLQ $0xFFFF, SP_Reg_X; \
|
||||||
movLQ SN(base_stackzp), _XAX; \
|
RestoreAltZP \
|
||||||
subLQ $SN(apple_ii_64k), _XAX; \
|
|
||||||
orLQ _XAX, SP_Reg_X; \
|
|
||||||
popLQ _XAX; \
|
popLQ _XAX; \
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user