mirror of
https://github.com/mauiaaron/apple2.git
synced 2025-01-13 12:31:25 +00:00
Use named registers
This commit is contained in:
parent
f3ea9fa256
commit
7fd9857102
@ -17,6 +17,7 @@
|
|||||||
#define __ASSEMBLY__
|
#define __ASSEMBLY__
|
||||||
#include "apple2.h"
|
#include "apple2.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
#include "cpu.h"
|
||||||
|
|
||||||
#define GLUE_FIXED_READ(func,address) \
|
#define GLUE_FIXED_READ(func,address) \
|
||||||
E(func) movb SN(address)(%edi),%al; \
|
E(func) movb SN(address)(%edi),%al; \
|
||||||
@ -59,30 +60,30 @@ E(func) addl SN(pointer),%edi; \
|
|||||||
// TODO FIXME : implement CDECL prologue/epilogues...
|
// TODO FIXME : implement CDECL prologue/epilogues...
|
||||||
#define GLUE_C_WRITE(func) \
|
#define GLUE_C_WRITE(func) \
|
||||||
E(func) pushl %eax; \
|
E(func) pushl %eax; \
|
||||||
pushl %ecx; \
|
pushl FF_Reg; \
|
||||||
pushl %edx; \
|
pushl SP_Reg; \
|
||||||
andl $0xff,%eax; \
|
andl $0xff,%eax; \
|
||||||
pushl %eax; \
|
pushl %eax; \
|
||||||
pushl %edi; \
|
pushl EffectiveAddr_E; \
|
||||||
call SN(c_##func); \
|
call SN(c_##func); \
|
||||||
popl %edx; /* dummy */ \
|
popl %edx; /* dummy */ \
|
||||||
popl %edx; /* dummy */ \
|
popl %edx; /* dummy */ \
|
||||||
popl %edx; \
|
popl SP_Reg; \
|
||||||
popl %ecx; \
|
popl FF_Reg; \
|
||||||
popl %eax; \
|
popl %eax; \
|
||||||
ret;
|
ret;
|
||||||
|
|
||||||
// TODO FIXME : implement CDECL prologue/epilogues...
|
// TODO FIXME : implement CDECL prologue/epilogues...
|
||||||
#define GLUE_C_READ(func) \
|
#define GLUE_C_READ(func) \
|
||||||
E(func) /*pushl %eax;*/ \
|
E(func) /*pushl %eax;*/ \
|
||||||
pushl %ecx; \
|
pushl FF_Reg; \
|
||||||
pushl %edx; \
|
pushl SP_Reg; \
|
||||||
pushl %edi; \
|
pushl EffectiveAddr_E; \
|
||||||
call SN(c_##func); \
|
call SN(c_##func); \
|
||||||
/*movb %al,12(%esp);*/ \
|
/*movb %al,12(%esp);*/ \
|
||||||
popl %edx; /* dummy */ \
|
popl %edx; /* dummy */ \
|
||||||
popl %edx; \
|
popl SP_Reg; \
|
||||||
popl %ecx; \
|
popl FF_Reg; \
|
||||||
/*popl %eax;*/ \
|
/*popl %eax;*/ \
|
||||||
ret;
|
ret;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user