home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / assemblr / mslang / as / devsym.asm < prev    next >
Assembly Source File  |  1985-08-05  |  3KB  |  59 lines

  1. SUBTTL DEVICE TABLE AND SRH DEFINITION
  2. PAGE
  3. ; The device table list has the form:
  4. SYSDEV  STRUC
  5. SDEVNEXT        DD      ?       ;Pointer to next device header
  6. SDEVATT         DW      ?       ;Attributes of the device
  7. SDEVSTRAT       DW      ?       ;Strategy entry point
  8. SDEVINT         DW      ?       ;Interrupt entry point
  9. SDEVNAME        DB      8 DUP (?) ;Name of device (only first byte used for block)
  10. SYSDEV  ENDS
  11.  
  12. ;Attribute bit masks
  13. DEVTYP  EQU     8000H           ;Bit 15 - 1  if Char, 0 if block
  14. DEVIOCTL EQU    4000H           ;Bit 14 - CONTROL mode bit
  15. ISFATBYDEV EQU  2000H           ;Bit 13 - Device uses FAT ID bytes, comp media.
  16. ISCIN   EQU     0001H           ;Bit 0 - This device is the console input.
  17. ISCOUT  EQU     0002H           ;Bit 1 - This device is the console output.
  18. ISNULL  EQU     0004H           ;Bit 2 - This device is the null device.
  19. ISCLOCK EQU     0008H           ;Bit 3 - This device is the clock device.
  20. ISIBM   EQU     0010H           ;Bit 4 - This device is special
  21.  
  22. ;Static Reguest Header
  23. SRHEAD  STRUC
  24. REQLEN  DB      ?               ;Length in bytes of request block
  25. REQUNIT DB      ?               ;Device unit number
  26. REQFUNC DB      ?               ;Type of request
  27. REQSTAT DW      ?               ;Status Word
  28.         DB      8 DUP(?)        ;Reserved for queue links
  29. SRHEAD  ENDS
  30.  
  31. ;Status word masks
  32. STERR   EQU     8000H           ;Bit 15 - Error
  33. STBUI   EQU     0200H           ;Bit 9 - Buisy
  34. STDON   EQU     0100H           ;Bit 8 - Done
  35. STECODE EQU     00FFH           ;Error code
  36. WRECODE EQU     0
  37.  
  38. ;Function codes
  39. DEVINIT EQU     0               ;Initialization
  40. DINITHL EQU     26              ;Size of init header
  41. DEVMDCH EQU     1               ;Media check
  42. DMEDHL  EQU     15              ;Size of media check header
  43. DEVBPB  EQU     2               ;Get BPB
  44. DEVRDIOCTL EQU  3               ;IOCTL read
  45. DBPBHL  EQU     22              ;Size of Get BPB header
  46. DEVRD   EQU     4               ;Read
  47. DRDWRHL EQU     22              ;Size of RD/WR header
  48. DEVRDND EQU     5               ;Non destructive read no wait (character devs)
  49. DRDNDHL EQU     14              ;Size of non destructive read header
  50. DEVIST  EQU     6               ;Input status
  51. DSTATHL EQU     13              ;Size of status header
  52. DEVIFL  EQU     7               ;Input flush
  53. DFLSHL  EQU     15              ;Size of flush header
  54. DEVWRT  EQU     8               ;Write
  55. DEVWRTV EQU     9               ;Write with verify
  56. DEVOST  EQU     10              ;Output status
  57. DEVOFL  EQU     11              ;Output flush
  58. DEVWRIOCTL EQU  12              ;IOCTL write
  59.