Windows NT 4.0 source code leak
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.

105 lines
3.3 KiB

4 years ago
  1. /*++
  2. Copyright (c) 1992 Microsoft Corporation
  3. Module Name:
  4. cmdcnst.h
  5. Abstract:
  6. This is the command string interpreter definitions
  7. Environment:
  8. kernel mode only
  9. Notes:
  10. This module is same file on Cirrus Minport Driver.
  11. Revision History:
  12. --*/
  13. //--------------------------------------------------------------------------
  14. // Definition of the set/clear mode command language.
  15. //
  16. // Each command is composed of a major portion and a minor portion.
  17. // The major portion of a command can be found in the most significant
  18. // nibble of a command byte, while the minor portion is in the least
  19. // significant portion of a command byte.
  20. //
  21. // maj minor Description
  22. // ---- ----- --------------------------------------------
  23. // 00 End of data
  24. //
  25. // 10 in and out type commands as described by flags
  26. // flags:
  27. //
  28. // xxxx
  29. // ||||
  30. // |||+-------- unused
  31. // ||+--------- 0/1 single/multiple values to output (in's are always
  32. // |+---------- 0/1 8/16 bit operation single)
  33. // +----------- 0/1 out/in instruction
  34. //
  35. // Outs
  36. // ----------------------------------------------
  37. // 0 reg:W val:B
  38. // 2 reg:W cnt:W val1:B val2:B...valN:B
  39. // 4 reg:W val:W
  40. // 6 reg:W cnt:W val1:W val2:W...valN:W
  41. //
  42. // Ins
  43. // ----------------------------------------------
  44. // 8 reg:W
  45. // a reg:W cnt:W
  46. // c reg:W
  47. // e reg:W cnt:W
  48. //
  49. // 20 Special purpose outs
  50. // 00 do indexed outs for seq, crtc, and gdc
  51. // indexreg:W cnt:B startindex:B val1:B val2:B...valN:B
  52. // 01 do indexed outs for atc
  53. // index-data_reg:W cnt:B startindex:B val1:B val2:B...valN:B
  54. // 02 do masked outs
  55. // indexreg:W andmask:B xormask:B
  56. //
  57. // F0 Nop
  58. //
  59. //---------------------------------------------------------------------------
  60. // some useful equates - major commands
  61. #define EOD 0x000 // end of data
  62. #define INOUT 0x010 // do ins or outs
  63. #define METAOUT 0x020 // do special types of outs
  64. #define NCMD 0x0f0 // Nop command
  65. // flags for INOUT major command
  66. //#define UNUSED 0x01 // reserved
  67. #define MULTI 0x02 // multiple or single outs
  68. #define BW 0x04 // byte/word size of operation
  69. #define IO 0x08 // out/in instruction
  70. // minor commands for metout
  71. #define INDXOUT 0x00 // do indexed outs
  72. #define ATCOUT 0x01 // do indexed outs for atc
  73. #define MASKOUT 0x02 // do masked outs using and-xor masks
  74. // composite inout type commands
  75. #define OB (INOUT) // output 8 bit value
  76. #define OBM (INOUT+MULTI) // output multiple bytes
  77. #define OW (INOUT+BW) // output single word value
  78. #define OWM (INOUT+BW+MULTI) // output multiple words
  79. #define IB (INOUT+IO) // input byte
  80. #define IBM (INOUT+IO+MULTI) // input multiple bytes
  81. #define IW (INOUT+IO+BW) // input word
  82. #define IWM (INOUT+IO+BW+MULTI) // input multiple words