Leaked source code of windows server 2003
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.

71 lines
2.7 KiB

  1. ;----------------------------------------------------------------------------;
  2. ; Define macros
  3. ;----------------------------------------------------------------------------;
  4. ShowStr MACRO str
  5. mov dx, offset str
  6. mov ah, 9
  7. int 21h
  8. ENDM
  9. BOP MACRO func
  10. db 0c4h,0c4h,func
  11. ; jmp cs:[pass_disp_add]
  12. ; int 44h
  13. ENDM
  14. ;----------------------------------------------------------------------------;
  15. ; Flags & Numeric Equates
  16. ;----------------------------------------------------------------------------;
  17. MAX_LOW EQU 25 ; Max low count
  18. MAX_CUL EQU 80 ; Max culumn count
  19. MaxFunc EQU 1Dh ; int 10h max function No.
  20. MaxCmd EQU 24 ; max command code for DOS 3.2+
  21. cr EQU 0Dh ; carriage return
  22. lf EQU 0Ah ; linefeed
  23. eom EQU '$' ; end-of-message signal
  24. space EQU 20h ; ascii space
  25. tab EQU 09h ; ascii tab
  26. VECTOR_SEG EQU 0000h ; Interrupt Vector segment
  27. WORK_SEG EQU 0040h ; BIOS work area segment
  28. FULLSCREEN EQU 1
  29. ; definition of a Request Header structure so that we can access its elements.
  30. ; this structure is not exhaustive at all: block device use some addresses for
  31. ; different purposes, and have data beyond the cmd_seg word.
  32. REQ_HEADER STRUC
  33. lengt DB ? ; request header length
  34. unit DB ? ; unit number (for Block Devs. only)
  35. ccode DB ? ; command code
  36. stat DW ? ; status word
  37. reserv DB 8 DUP(?) ; reserved for DOS us
  38. media DB ? ; Media ID (for Block Devs. only)
  39. xfer DW ? ; offset of data buffer
  40. xseg DW ? ; segment of data buffer
  41. cmd_off DW ? ; count of bytes in request, or
  42. cmd_seg DW ? ; segment of CONFIG.SYS line
  43. REQ_HEADER ENDS
  44. ; values for the different 'magic numbers' used with Device Drivers
  45. fNEXTLINK EQU -1 ; word to tell DOS to substitute by address of
  46. ; next device
  47. fCHARDEVICE EQU 8000h ; bit to define device as a character device
  48. fOPENCLOSE EQU 0040h ; bit to indicate that device supports open/close
  49. fDONE EQU 0100h ; Status Done bit meaning device is done
  50. fERROR EQU 8000h ; Status Error bit meaning error on operation
  51. fWRITE_E EQU 000Ah ; Write Fault Error bit
  52. fREAD_E EQU 000Bh ; Read Fault Error bit
  53. fUNKNOWN_E EQU 0003h ; Unknown Command Error bit
  54. ; values for the search flags used by Write Routine
  55. fDELETE EQU 2
  56. fINSERT EQU 4
  57. fSEARCH EQU 8