Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
834 B

  1. ;------------------------------------------------------------------
  2. ;
  3. ; HPsysCall(Service, Function, Subfunction)
  4. ;
  5. ; Purpose General purpose HP system calling routine
  6. ;
  7. ; Parameters Service - HP vector
  8. ; Function
  9. ; Subfunction - function numbers
  10. ;
  11. ; Results returns AH which is 0 for success
  12. ;
  13. ;-------------------------------------------------------------------
  14. HPSysCall macro Device, Function, SubFunc
  15. push ds
  16. push bp
  17. push ax
  18. mov bx, offset RealMode_Word_Struc
  19. pushf
  20. pop RealMode_flags[bx]
  21. mov RealMode_BP[bx], Device
  22. mov RealMode_AH[bx], Function
  23. mov RealMode_AL[bx], SubFunc
  24. mov ax, ds
  25. mov es, ax ; make es = ds
  26. mov di, bx
  27. mov bl, 6fh
  28. xor bh, bh
  29. xor cx, cx
  30. mov ax, 0300h
  31. int 31h
  32. mov bx, offset RealMode_Word_Struc
  33. mov ax, es
  34. mov ds, ax
  35. mov bx, RealMode_BX[bx]
  36. pop ax
  37. pop bp
  38. pop ds
  39. endm
  40.