mirror of
https://github.com/FDOS/kernel.git
synced 2025-07-23 13:54:30 +02:00
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[];
|
DOSTEXTFAR ASM _HMARelocationTableEnd[];
|
||||||
|
|
||||||
extern void FAR *DOSTEXTFAR ASM XMSDriverAddress;
|
extern void FAR *DOSTEXTFAR ASM XMSDriverAddress;
|
||||||
extern VOID ASMCFUNC FAR _EnableA20(VOID);
|
extern VOID ASMPASCAL FAR _EnableA20(VOID);
|
||||||
extern VOID ASMCFUNC FAR _DisableA20(VOID);
|
extern VOID ASMPASCAL FAR _DisableA20(VOID);
|
||||||
|
|
||||||
extern void FAR * ASMCFUNC DetectXMSDriver(VOID);
|
extern void FAR * ASMPASCAL DetectXMSDriver(VOID);
|
||||||
extern int ASMCFUNC init_call_XMScall(void FAR * driverAddress, UWORD ax,
|
extern int ASMPASCAL init_call_XMScall(void FAR * driverAddress, UWORD ax,
|
||||||
UWORD dx);
|
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
|
#if defined(WATCOM) && 0
|
||||||
ULONG ASMCFUNC FAR MULULUS(ULONG mul1, UWORD mul2); /* MULtiply ULong by UShort */
|
ULONG ASMCFUNC FAR MULULUS(ULONG mul1, UWORD mul2); /* MULtiply ULong by UShort */
|
||||||
|
@ -141,21 +141,23 @@ INIT_CALL_INTR:
|
|||||||
;
|
;
|
||||||
; this calls HIMEM.SYS
|
; this calls HIMEM.SYS
|
||||||
;
|
;
|
||||||
global _init_call_XMScall
|
global INIT_CALL_XMSCALL
|
||||||
_init_call_XMScall:
|
INIT_CALL_XMSCALL:
|
||||||
push bp
|
pop bx ; ret address
|
||||||
mov bp,sp
|
pop dx
|
||||||
|
pop ax
|
||||||
mov ax,[bp+8]
|
pop cx ; driver address
|
||||||
mov dx,[bp+10]
|
pop es
|
||||||
call far [bp+4]
|
|
||||||
|
|
||||||
pop bp
|
push cs ; ret address
|
||||||
ret
|
push bx
|
||||||
|
push es ; driver address ("jmp es:cx")
|
||||||
|
push cx
|
||||||
|
retf
|
||||||
|
|
||||||
; void FAR *DetectXMSDriver(VOID)
|
; void FAR *DetectXMSDriver(VOID)
|
||||||
global _DetectXMSDriver
|
global DETECTXMSDRIVER
|
||||||
_DetectXMSDriver:
|
DETECTXMSDRIVER:
|
||||||
mov ax, 4300h
|
mov ax, 4300h
|
||||||
int 2fh ; XMS installation check
|
int 2fh ; XMS installation check
|
||||||
|
|
||||||
|
@ -858,8 +858,8 @@ _XMSDriverAddress:
|
|||||||
dw 0 ; XMS driver, if detected
|
dw 0 ; XMS driver, if detected
|
||||||
dw 0
|
dw 0
|
||||||
|
|
||||||
global __EnableA20
|
global _ENABLEA20
|
||||||
__EnableA20:
|
_ENABLEA20:
|
||||||
mov ah,5
|
mov ah,5
|
||||||
UsingXMSdriver:
|
UsingXMSdriver:
|
||||||
push bx
|
push bx
|
||||||
@ -867,8 +867,8 @@ UsingXMSdriver:
|
|||||||
pop bx
|
pop bx
|
||||||
retf
|
retf
|
||||||
|
|
||||||
global __DisableA20
|
global _DISABLEA20
|
||||||
__DisableA20:
|
_DISABLEA20:
|
||||||
mov ah,6
|
mov ah,6
|
||||||
jmp short UsingXMSdriver
|
jmp short UsingXMSdriver
|
||||||
|
|
||||||
@ -906,7 +906,7 @@ forceEnableA20retry:
|
|||||||
; ok, we have to enable A20 )at least seems so
|
; ok, we have to enable A20 )at least seems so
|
||||||
;
|
;
|
||||||
|
|
||||||
call far __EnableA20
|
call far _ENABLEA20
|
||||||
|
|
||||||
jmp short forceEnableA20retry
|
jmp short forceEnableA20retry
|
||||||
|
|
||||||
@ -935,7 +935,7 @@ _ExecUserDisableA20:
|
|||||||
je noNeedToDisable
|
je noNeedToDisable
|
||||||
NeedToDisable:
|
NeedToDisable:
|
||||||
push ax
|
push ax
|
||||||
call far __DisableA20
|
call far _DISABLEA20
|
||||||
pop ax
|
pop ax
|
||||||
noNeedToDisable:
|
noNeedToDisable:
|
||||||
iret
|
iret
|
||||||
|
Loading…
x
Reference in New Issue
Block a user