windows-nt/Source/XPSP1/NT/base/mvdm/wow16/system/vecsys.inc
2020-09-26 16:20:57 +08:00

45 lines
834 B
PHP
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

;------------------------------------------------------------------
;
; 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