mirror of https://github.com/FDOS/kernel.git
Use pascal calling conventions for execrh().
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@848 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
parent
00e9730e32
commit
a7ca14c46c
|
@ -467,7 +467,7 @@ COUNT block_error(request * rq, COUNT nDrive, struct dhdr FAR * lpDevice, int mo
|
||||||
WORD ASMCFUNC FAR clk_driver(rqptr rp);
|
WORD ASMCFUNC FAR clk_driver(rqptr rp);
|
||||||
|
|
||||||
/* execrh.asm */
|
/* execrh.asm */
|
||||||
WORD ASMCFUNC execrh(request FAR *, struct dhdr FAR *);
|
WORD ASMPASCAL execrh(request FAR *, struct dhdr FAR *);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* end of device.h
|
* end of device.h
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
%include "segs.inc"
|
%include "segs.inc"
|
||||||
|
|
||||||
segment HMA_TEXT
|
segment HMA_TEXT
|
||||||
; _execrh
|
; EXECRH
|
||||||
; Execute Device Request
|
; Execute Device Request
|
||||||
;
|
;
|
||||||
; execrh(rhp, dhp)
|
; execrh(rhp, dhp)
|
||||||
|
@ -41,47 +41,47 @@ segment HMA_TEXT
|
||||||
;
|
;
|
||||||
; The stack is very critical in here.
|
; The stack is very critical in here.
|
||||||
;
|
;
|
||||||
global _execrh
|
global EXECRH
|
||||||
global _init_execrh
|
global INIT_EXECRH
|
||||||
|
|
||||||
%macro EXECRH 0
|
%macro EXECRHM 0
|
||||||
push bp ; perform c entry
|
push bp ; perform c entry
|
||||||
mov bp,sp
|
mov bp,sp
|
||||||
push si
|
push si
|
||||||
push ds ; sp=bp-8
|
push ds ; sp=bp-8
|
||||||
|
|
||||||
lds si,[bp+8] ; ds:si = device header
|
lds si,[bp+4] ; ds:si = device header
|
||||||
les bx,[bp+4] ; es:bx = request header
|
les bx,[bp+8] ; es:bx = request header
|
||||||
|
|
||||||
|
|
||||||
mov ax, [si+6] ; construct strategy address
|
mov ax, [si+6] ; construct strategy address
|
||||||
mov [bp+8], ax
|
mov [bp+4], ax
|
||||||
|
|
||||||
push si ; the bloody fucking RTSND.DOS
|
push si ; the bloody fucking RTSND.DOS
|
||||||
push di ; driver destroys SI,DI (tom 14.2.03)
|
push di ; driver destroys SI,DI (tom 14.2.03)
|
||||||
|
|
||||||
call far[bp+8] ; call far the strategy
|
call far[bp+4] ; call far the strategy
|
||||||
|
|
||||||
pop di
|
pop di
|
||||||
pop si
|
pop si
|
||||||
|
|
||||||
|
|
||||||
mov ax,[si+8] ; construct 'interrupt' address
|
mov ax,[si+8] ; construct 'interrupt' address
|
||||||
mov [bp+8],ax ; construct interrupt address
|
mov [bp+4],ax ; construct interrupt address
|
||||||
call far[bp+8] ; call far the interrupt
|
call far[bp+4] ; call far the interrupt
|
||||||
|
|
||||||
sti ; damm driver turn off ints
|
sti ; damm driver turn off ints
|
||||||
cld ; has gone backwards
|
cld ; has gone backwards
|
||||||
pop ds
|
pop ds
|
||||||
pop si
|
pop si
|
||||||
pop bp
|
pop bp
|
||||||
ret
|
ret 8
|
||||||
%endmacro
|
%endmacro
|
||||||
|
|
||||||
_execrh:
|
EXECRH:
|
||||||
EXECRH
|
EXECRHM
|
||||||
|
|
||||||
segment INIT_TEXT
|
segment INIT_TEXT
|
||||||
|
|
||||||
_init_execrh:
|
INIT_EXECRH:
|
||||||
EXECRH
|
EXECRHM
|
||||||
|
|
|
@ -46,7 +46,7 @@ extern struct _KernelConfig InitKernelConfig;
|
||||||
#define fstrlen init_fstrlen
|
#define fstrlen init_fstrlen
|
||||||
|
|
||||||
/* execrh.asm */
|
/* execrh.asm */
|
||||||
WORD ASMCFUNC execrh(request FAR *, struct dhdr FAR *);
|
WORD ASMPASCAL execrh(request FAR *, struct dhdr FAR *);
|
||||||
|
|
||||||
/* asmsupt.asm */
|
/* asmsupt.asm */
|
||||||
VOID ASMPASCAL memset( void *s, int ch, size_t n);
|
VOID ASMPASCAL memset( void *s, int ch, size_t n);
|
||||||
|
|
Loading…
Reference in New Issue