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);
|
||||
|
||||
/* execrh.asm */
|
||||
WORD ASMCFUNC execrh(request FAR *, struct dhdr FAR *);
|
||||
WORD ASMPASCAL execrh(request FAR *, struct dhdr FAR *);
|
||||
|
||||
/*
|
||||
* end of device.h
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
%include "segs.inc"
|
||||
|
||||
segment HMA_TEXT
|
||||
; _execrh
|
||||
; EXECRH
|
||||
; Execute Device Request
|
||||
;
|
||||
; execrh(rhp, dhp)
|
||||
|
@ -41,47 +41,47 @@ segment HMA_TEXT
|
|||
;
|
||||
; The stack is very critical in here.
|
||||
;
|
||||
global _execrh
|
||||
global _init_execrh
|
||||
global EXECRH
|
||||
global INIT_EXECRH
|
||||
|
||||
%macro EXECRH 0
|
||||
%macro EXECRHM 0
|
||||
push bp ; perform c entry
|
||||
mov bp,sp
|
||||
push si
|
||||
push ds ; sp=bp-8
|
||||
|
||||
lds si,[bp+8] ; ds:si = device header
|
||||
les bx,[bp+4] ; es:bx = request header
|
||||
lds si,[bp+4] ; ds:si = device header
|
||||
les bx,[bp+8] ; es:bx = request header
|
||||
|
||||
|
||||
mov ax, [si+6] ; construct strategy address
|
||||
mov [bp+8], ax
|
||||
mov [bp+4], ax
|
||||
|
||||
push si ; the bloody fucking RTSND.DOS
|
||||
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 si
|
||||
|
||||
|
||||
mov ax,[si+8] ; construct 'interrupt' address
|
||||
mov [bp+8],ax ; construct interrupt address
|
||||
call far[bp+8] ; call far the interrupt
|
||||
mov [bp+4],ax ; construct interrupt address
|
||||
call far[bp+4] ; call far the interrupt
|
||||
|
||||
sti ; damm driver turn off ints
|
||||
cld ; has gone backwards
|
||||
pop ds
|
||||
pop si
|
||||
pop bp
|
||||
ret
|
||||
ret 8
|
||||
%endmacro
|
||||
|
||||
_execrh:
|
||||
EXECRH
|
||||
EXECRH:
|
||||
EXECRHM
|
||||
|
||||
segment INIT_TEXT
|
||||
|
||||
_init_execrh:
|
||||
EXECRH
|
||||
INIT_EXECRH:
|
||||
EXECRHM
|
||||
|
|
|
@ -46,7 +46,7 @@ extern struct _KernelConfig InitKernelConfig;
|
|||
#define fstrlen init_fstrlen
|
||||
|
||||
/* execrh.asm */
|
||||
WORD ASMCFUNC execrh(request FAR *, struct dhdr FAR *);
|
||||
WORD ASMPASCAL execrh(request FAR *, struct dhdr FAR *);
|
||||
|
||||
/* asmsupt.asm */
|
||||
VOID ASMPASCAL memset( void *s, int ch, size_t n);
|
||||
|
|
Loading…
Reference in New Issue