mirror of https://github.com/FDOS/kernel.git
Use pascal calling conventions for the remaining intr() functions (XMS
related) git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@851 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
parent
7012672d7d
commit
c5f6ed4aa8
|
@ -269,12 +269,17 @@ extern struct RelocationTable
|
|||
DOSTEXTFAR ASM _HMARelocationTableEnd[];
|
||||
|
||||
extern void FAR *DOSTEXTFAR ASM XMSDriverAddress;
|
||||
extern VOID ASMCFUNC FAR _EnableA20(VOID);
|
||||
extern VOID ASMCFUNC FAR _DisableA20(VOID);
|
||||
extern VOID ASMPASCAL FAR _EnableA20(VOID);
|
||||
extern VOID ASMPASCAL FAR _DisableA20(VOID);
|
||||
|
||||
extern void FAR * ASMCFUNC DetectXMSDriver(VOID);
|
||||
extern int ASMCFUNC init_call_XMScall(void FAR * driverAddress, UWORD ax,
|
||||
extern void FAR * ASMPASCAL DetectXMSDriver(VOID);
|
||||
extern int ASMPASCAL init_call_XMScall(void FAR * driverAddress, UWORD ax,
|
||||
UWORD dx);
|
||||
#ifdef __WATCOMC__
|
||||
#pragma aux (pascal) DetectXMSDriver modify exact [ax dx]
|
||||
#pragma aux (pascal) _EnableA20 modify exact [ax]
|
||||
#pragma aux (pascal) _DisableA20 modify exact [ax]
|
||||
#endif
|
||||
|
||||
#if defined(WATCOM) && 0
|
||||
ULONG ASMCFUNC FAR MULULUS(ULONG mul1, UWORD mul2); /* MULtiply ULong by UShort */
|
||||
|
|
|
@ -141,21 +141,23 @@ INIT_CALL_INTR:
|
|||
;
|
||||
; this calls HIMEM.SYS
|
||||
;
|
||||
global _init_call_XMScall
|
||||
_init_call_XMScall:
|
||||
push bp
|
||||
mov bp,sp
|
||||
|
||||
mov ax,[bp+8]
|
||||
mov dx,[bp+10]
|
||||
call far [bp+4]
|
||||
global INIT_CALL_XMSCALL
|
||||
INIT_CALL_XMSCALL:
|
||||
pop bx ; ret address
|
||||
pop dx
|
||||
pop ax
|
||||
pop cx ; driver address
|
||||
pop es
|
||||
|
||||
pop bp
|
||||
ret
|
||||
push cs ; ret address
|
||||
push bx
|
||||
push es ; driver address ("jmp es:cx")
|
||||
push cx
|
||||
retf
|
||||
|
||||
; void FAR *DetectXMSDriver(VOID)
|
||||
global _DetectXMSDriver
|
||||
_DetectXMSDriver:
|
||||
global DETECTXMSDRIVER
|
||||
DETECTXMSDRIVER:
|
||||
mov ax, 4300h
|
||||
int 2fh ; XMS installation check
|
||||
|
||||
|
|
|
@ -858,8 +858,8 @@ _XMSDriverAddress:
|
|||
dw 0 ; XMS driver, if detected
|
||||
dw 0
|
||||
|
||||
global __EnableA20
|
||||
__EnableA20:
|
||||
global _ENABLEA20
|
||||
_ENABLEA20:
|
||||
mov ah,5
|
||||
UsingXMSdriver:
|
||||
push bx
|
||||
|
@ -867,8 +867,8 @@ UsingXMSdriver:
|
|||
pop bx
|
||||
retf
|
||||
|
||||
global __DisableA20
|
||||
__DisableA20:
|
||||
global _DISABLEA20
|
||||
_DISABLEA20:
|
||||
mov ah,6
|
||||
jmp short UsingXMSdriver
|
||||
|
||||
|
@ -906,7 +906,7 @@ forceEnableA20retry:
|
|||
; ok, we have to enable A20 )at least seems so
|
||||
;
|
||||
|
||||
call far __EnableA20
|
||||
call far _ENABLEA20
|
||||
|
||||
jmp short forceEnableA20retry
|
||||
|
||||
|
@ -935,7 +935,7 @@ _ExecUserDisableA20:
|
|||
je noNeedToDisable
|
||||
NeedToDisable:
|
||||
push ax
|
||||
call far __DisableA20
|
||||
call far _DISABLEA20
|
||||
pop ax
|
||||
noNeedToDisable:
|
||||
iret
|
||||
|
|
Loading…
Reference in New Issue