ANSISYS.DEF 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. DEFINITION MODULE ANSISYS;
  2. (*
  3. Facilities of the ANSI.SYS device driver
  4. *)
  5. (* ---------------------------------------------------------------------- *)
  6. (* Cursor positioning *)
  7. PROCEDURE GotoRowCol (row, column : CARDINAL);
  8. (* Position to row, column.
  9. For CGA in 80x25 mode, if row or column is out of range, action is:
  10. row = 0: position to 1,column
  11. row > 25: ignore request!
  12. column = 0: position to row,1
  13. column > 80: position to row,80 *)
  14. PROCEDURE GetRowCol (VAR row, column : CARDINAL);
  15. (* Return current cursor position *)
  16. PROCEDURE Up (n : CARDINAL); (* Cursor up n rows *)
  17. PROCEDURE Down (n : CARDINAL); (* Cursor down n rows *)
  18. PROCEDURE Right (n : CARDINAL); (* Cursor right n columns *)
  19. PROCEDURE Left (n : CARDINAL); (* Cursor left n columns *)
  20. (* Preceding four requests are ignored if already at limit coordinate *)
  21. PROCEDURE Save; (* Save the cursor position for Restore *)
  22. PROCEDURE Restore; (* Restore cursor to last Save'd position *)
  23. (* ---------------------------------------------------------------------- *)
  24. (* Mode control *)
  25. TYPE
  26. Mode = (textMono40x25, textColour40x25, textMono80x25, textColour80x25,
  27. graphicsColour320x200x4, graphicsMono300x200, graphicsMono640x200,
  28. cursorWrap,
  29. um8, um9, um10, um11, um12, (* unused modes *)
  30. graphicsColour320x200, graphicsColour640x200x16,
  31. graphicsMono640x350, graphicsColour640x350x16,
  32. graphicsMono640x480, graphicsColour640x480x16,
  33. graphicsColour320x200x256);
  34. PROCEDURE SetMode (mode : Mode);
  35. (* Set video adapter to specified mode.
  36. ? Assume no effect if not a valid mode? *)
  37. PROCEDURE ResetMode (mode : Mode);
  38. (* Reset video adapter mode.
  39. Equivalent to SetMode except for cursorWrap (?).
  40. ? Assume no effect if not a valid mode? *)
  41. (* ---------------------------------------------------------------------- *)
  42. (* Attribute control *)
  43. (* Attribute values - defined as an enumeration for convenient import.
  44. - italic and rapidBlink have no effect on CGA(?);
  45. - underscore is "available only on the Monochrome Graphics Adapter", but
  46. produces dark blue on black on CGA;
  47. - allOff is grey on black; reverse is black on grey;
  48. - concealed is black on black;
  49. - colours are dark unless bold (high intensity) is also selected - as well
  50. as brightness, bold also produces changes in apparent colour: red-brown
  51. to red, brown to yellow, grey to white *)
  52. TYPE Attribute =
  53. (allOff, bold, faint, italic, underscore,
  54. blink, rapidBlink, reverse, concealed,
  55. ua9, (* unused attributes *)
  56. ua10, ua11, ua12, ua13, ua14, ua15, ua16, ua17, ua18, ua19,
  57. ua20, ua21, ua22, ua23, ua24, ua25, ua26, ua27, ua28, ua29,
  58. blackFG, redFG, greenFG, yellowFG, blueFG, magentaFG, cyanFG, whiteFG,
  59. u38, u39,
  60. blackBG, redBG, greenBG, yellowBG, blueBG, magentaBG, cyanBG, whiteBG);
  61. PROCEDURE SetAttribute (attribute : Attribute);
  62. (* Set given attribute.
  63. To come? Set AttibuteSet?
  64. *)
  65. (* ---------------------------------------------------------------------- *)
  66. (* Erasing *)
  67. PROCEDURE ClearScreen;
  68. (* Clear the screen (to current background colour) and home the cursor *)
  69. PROCEDURE EraseToEOL;
  70. (* Erase to end of line *)
  71. END ANSISYS.