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.

77 lines
2.8 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_ROW EQU 25 ; Max row count
  18. MAX_COL EQU 80 ; Max column 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. MAJOR_VER equ 1
  30. MINOR_VER equ 0
  31. CP_JP equ 932
  32. CP_KO equ 949
  33. CP_US equ 437
  34. ; definition of a Request Header structure so that we can access its elements.
  35. ; this structure is not exhaustive at all: block device use some addresses for
  36. ; different purposes, and have data beyond the cmd_seg word.
  37. REQ_HEADER STRUC
  38. lengt DB ? ; request header length
  39. unit DB ? ; unit number (for Block Devs. only)
  40. ccode DB ? ; command code
  41. stat DW ? ; status word
  42. reserv DB 8 DUP(?) ; reserved for DOS us
  43. media DB ? ; Media ID (for Block Devs. only)
  44. xfer DW ? ; offset of data buffer
  45. xseg DW ? ; segment of data buffer
  46. cmd_off DW ? ; count of bytes in request, or
  47. cmd_seg DW ? ; segment of CONFIG.SYS line
  48. REQ_HEADER ENDS
  49. ; values for the different 'magic numbers' used with Device Drivers
  50. fNEXTLINK EQU -1 ; word to tell DOS to substitute by address of
  51. ; next device
  52. fCHARDEVICE EQU 8000h ; bit to define device as a character device
  53. fOPENCLOSE EQU 0040h ; bit to indicate that device supports open/close
  54. fDONE EQU 0100h ; Status Done bit meaning device is done
  55. fERROR EQU 8000h ; Status Error bit meaning error on operation
  56. fWRITE_E EQU 000Ah ; Write Fault Error bit
  57. fREAD_E EQU 000Bh ; Read Fault Error bit
  58. fUNKNOWN_E EQU 0003h ; Unknown Command Error bit
  59. ; values for the search flags used by Write Routine
  60. fDELETE EQU 2
  61. fINSERT EQU 4
  62. fSEARCH EQU 8