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.

103 lines
3.3 KiB

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