windows-nt/Source/XPSP1/NT/base/mvdm/wow16/system/vecsys.inc

45 lines
834 B
PHP
Raw Permalink Normal View History

2020-09-26 03:20:57 -05:00
;------------------------------------------------------------------
;
; HPsysCall(Service, Function, Subfunction)
;
; Purpose General purpose HP system calling routine
;
; Parameters Service - HP vector
; Function
; Subfunction - function numbers
;
; Results returns AH which is 0 for success
;
;-------------------------------------------------------------------
HPSysCall macro Device, Function, SubFunc
push ds
push bp
push ax
mov bx, offset RealMode_Word_Struc
pushf
pop RealMode_flags[bx]
mov RealMode_BP[bx], Device
mov RealMode_AH[bx], Function
mov RealMode_AL[bx], SubFunc
mov ax, ds
mov es, ax ; make es = ds
mov di, bx
mov bl, 6fh
xor bh, bh
xor cx, cx
mov ax, 0300h
int 31h
mov bx, offset RealMode_Word_Struc
mov ax, es
mov ds, ax
mov bx, RealMode_BX[bx]
pop ax
pop bp
pop ds
endm