mirror of
https://github.com/mauiaaron/apple2.git
synced 2025-01-12 06:29:58 +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;
|
||||
|
||||
const uint8_t *base_vmem = apple_ii_64k[0];
|
||||
uint8_t *base_ramrd;
|
||||
uint8_t *base_ramwrt;
|
||||
uint8_t *base_textrd;
|
||||
|
@ -26,6 +26,12 @@
|
||||
#define X86_CF_Bit 0x0 /* x86 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__
|
||||
# define SZ_PTR 8
|
||||
# define ROR_BIT 63
|
||||
|
@ -2119,10 +2119,7 @@ E(cpu65_run)
|
||||
movb SN(cpu65_current)+5, Y_Reg
|
||||
movb SN(cpu65_current)+6, SP_Reg_L
|
||||
#ifdef APPLE2_VM
|
||||
// Apple //e machine specific set stack point to ALTZP (or not)
|
||||
movLQ SN(base_stackzp), _XAX
|
||||
subLQ $SN(apple_ii_64k), _XAX
|
||||
orLQ _XAX, SP_Reg_X
|
||||
RestoreAltZP
|
||||
#endif
|
||||
jmp continue1
|
||||
|
||||
|
@ -111,9 +111,7 @@ E(func) pushLQ XY_Reg_X; \
|
||||
#define GLUE_C_READ_ALTZP(FUNC) _GLUE_C_READ(FUNC, \
|
||||
pushLQ _XAX; \
|
||||
andLQ $0xFFFF, SP_Reg_X; \
|
||||
movLQ SN(base_stackzp), _XAX; \
|
||||
subLQ $SN(apple_ii_64k), _XAX; \
|
||||
orLQ _XAX, SP_Reg_X; \
|
||||
RestoreAltZP \
|
||||
popLQ _XAX; \
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user