en:docs:tpro

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:docs:tpro [2025/02/08 06:15] prokusheven:docs:tpro [2025/02/08 13:36] (current) prokushev
Line 197: Line 197:
 Fill Number chs at Row,Col in Attr (video attribute) without snow Fill Number chs at Row,Col in Attr (video attribute) without snow
  
-procedure FastFillWindow(Number : Word; Ch : Char; Row, Col, Attr : Byte); +===== FastFillWindow =====
-  {-Fill Number chs at window Row,Col in Attr (video attribute) without snow}+
  
-procedure FastCenter(St string; Row, Attr : Byte); +<code pascal>procedure FastFillWindow(NumberWord; Ch: Char; Row, Col, Attr: Byte);</code>
-  {-Write St centered on window Row in Attr (video attribute) without snow}+
  
-procedure FastFlush(St : string; Row, Attr : Byte); +Fill Number chs at window Row,Col in Attr (video attribute) without snow
-  {-Write St flush right on window Row in Attr (video attribute) without snow}+
  
-procedure FastRead(Number, Row, Col : Byte; var St : string); +===== FastCenter =====
-  {-Read Number characters from the screen into St starting at Row,Col}+
  
-procedure FastReadWindow(Number, Row, Col : Byte; var St : string); +<code pascal>procedure FastCenter(St: string; Row, Attr: Byte);</code>
-  {-Read Number characters from the screen into St starting at window Row,Col}+
  
-procedure ReadAttribute(Number, Row, Col : Byte; var St : string)+Write St centered on window Row in Attr (video attributewithout snow
-  {-Read Number attributes from the screen into St starting at Row,Col}+
  
-procedure ReadAttributeWindow(Number, Row, Col : Byte; var St : string); +===== FastFlush =====
-  {-Read Number attributes from the screen into St starting at window Row,Col}+
  
-procedure WriteAttribute(St : String; Row, Col : Byte); +<code pascal>procedure FastFlush(St: string; Row, Attr: Byte);</code>
-  {-Write string of attributes St at Row,Col without changing characters}+
  
-procedure WriteAttributeWindow(St : String; Row, Col : Byte); +Write St flush right on window Row in Attr (video attribute) without snow
-  {-Write string of attributes St at window Row,Col without changing characters}+
  
-procedure ChangeAttribute(Number : Word; Row, Col, Attr : Byte); +===== FastRead =====
-  {-Change Number video attributes to Attr starting at Row,Col}+
  
-procedure ChangeAttributeWindow(Number : Word; Row, Col, Attr : Byte); +<code pascal>procedure FastRead(NumberRow, Col: Byte; var St: string);</code>
-  {-Change Number video attributes to Attr starting at window Row,Col}+
  
-procedure MoveScreen(var Source, Dest; Length : Word); +Read Number characters from the screen into St starting at Row,Col
-  {-Move Length words from Source to Dest without snow}+
  
-procedure FlexWrite(St : string; Row, Col : Byte; var FAttrs : FlexAttrs); +===== FastReadWindow =====
-  {-Write St at Row,Col with flexible color handling}+
  
-procedure FlexWriteWindow(St : string; Row, Col : Byte; var FAttrs FlexAttrs); +<code pascal>procedure FastReadWindow(Number, Row, Col: Byte; var Ststring);</code>
-  {-Write a string flexibly using window-relative coordinates.}+
  
-function SaveWindow(XLowYLow, XHigh, YHigh : Byte; Allocate : Boolean; +Read Number characters from the screen into St starting at window Row,Col
-                    var Covers : Pointer) : Boolean; +
-  {-Allocate buffer space if requested and save window contents}+
  
-procedure RestoreWindow(XLowYLowXHigh, YHigh : Byte+===== ReadAttribute ===== 
-                        Deallocate : Boolean; var Covers Pointer); +<code pascal>procedure ReadAttribute(NumberRowCol: Byte; var Ststring);</code>
-  {-Restore screen contents and deallocate buffer space if requested}+
  
-procedure StoreWindowCoordinates(var WC : WindowCoordinates); +Read Number attributes from the screen into St starting at Row,Col
-  {-Store the window coordinates for the active window}+
  
-procedure RestoreWindowCoordinates(WC : WindowCoordinates); +===== ReadAttributeWindow =====
-  {-Restore previously saved window coordinates}+
  
-function PackWindow(XLowYLowXHigh, YHigh : Byte) : PackedWindowPtr; +<code pascal>procedure ReadAttributeWindow(NumberRowCol: Byte; var St: string);</code>
-  {-Return a pointer to a packed window, or nil if not enough memory}+
  
-procedure DispPackedWindow(PWP : PackedWindowPtr); +Read Number attributes from the screen into St starting at window Row,Col
-  {-Display the packed window pointed to by PWP}+
  
-procedure DispPackedWindowAt(PWP : PackedWindowPtr; Row, Col : Byte); +===== WriteAttribute =====
-  {-Display the packed window pointed to by PWP at Row,Col. If necessary, +
-   the coordinates are adjusted to allow it to fit on the screen.}+
  
-procedure MapPackedWindowColors(PWP PackedWindowPtr); +<code pascal>procedure WriteAttribute(StString; Row, Col: Byte);</code>
-  {-Map the colors in a packed window for improved appearance on mono/B&W +
-   displays}+
  
-procedure DisposePackedWindow(var PWP : PackedWindowPtr); +Write string of attributes St at Row,Col without changing characters
-  {-Dispose of a packed windowsetting PWP to nil on exit}+
  
-procedure WritePackedWindow(PWP : PackedWindowPtr; FName : string); +===== WriteAttributeWindow =====
-  {-Store the packed window pointed to by PWP in FName}+
  
-function ReadPackedWindow(FName string) PackedWindowPtr; +<code pascal>procedure WriteAttributeWindow(StString; Row, ColByte);</code>
-  {-Read the packed window stored in FName into memory}+
  
-function CreateLibrary(var F : file; Name : string+Write string of attributes St at window Row,Col without changing characters
-                       Entries : Byte) : DirectoryPtr; +
-  {-Create a library with the specified # of directory entries}+
  
-function OpenLibrary(var F : file; Name : string) : DirectoryPtr; +===== ChangeAttribute =====
-  {-Open the specified library and return a pointer to its directory}+
  
-procedure CloseLibrary(var F filevar DP DirectoryPtr); +<code pascal>procedure ChangeAttribute(NumberWordRow, Col, AttrByte);</code>
-  {-Close library F and deallocate its directory}+
  
-procedure PackLibrary(LName : string); +Change Number video attributes to Attr starting at Row,Col
-  {-Pack a library to remove deleted entries.}+
  
-procedure AddWindowToLibrary(PWP : PackedWindowPtr; var F : file; +===== ChangeAttributeWindow =====
-                             DP : DirectoryPtr; WinName : LibName); +
-  {-Add a packed window to the specified library}+
  
-function ReadWindowFromLibrary(var F fileDP DirectoryPtr; +<code pascal>procedure ChangeAttributeWindow(NumberWordRow, Col, AttrByte);</code>
-                               WinName : LibName: PackedWindowPtr; +
-  {-Read a packed window from a library}+
  
-procedure DeleteWindowFromLibrary(var F : file; DP : DirectoryPtr; +Change Number video attributes to Attr starting at window Row,Col
-                                  WinName : LibName); +
-  {-Delete a packed window from the specified library}+
  
-function MapColor(c : Byte) : Byte; +===== MoveScreen =====
-  {-Map a video attribute for visibility on mono/bw displays}+
  
-procedure SetBlink(Status Boolean); +<code pascal>procedure MoveScreen(var Source, Dest; Length Word);</code>
-  {-Enable text mode attribute blinking if On is True}+
  
-procedure SetCrtBorder(Attr : Byte); +Move Length words from Source to Dest without snow
-  {-Set border to background color if card type and mode allow}+
  
-function Font8x8Selected : Boolean; +===== FlexWrite =====
-  {-Return True if EGA or VGA is active and in 8x8 font}+
  
-procedure SelectFont8x8(Status Boolean); +<code pascal>procedure FlexWrite(St string; Row, Col : Byte; var FAttrs : FlexAttrs);</code>
-  {-Toggle 8x8 font on or off}+
  
-function HercPresent : Boolean; +Write St at Row,Col with flexible color handling
-  {-Return true if a Hercules graphics card is present}+
  
-procedure SwitchInColorCard(ColorOn : Boolean); +===== FlexWriteWindow =====
-  {-Activate or deactivate colors on a Hercules InColor card}+
  
-function HercGraphicsMode Boolean; +<code pascal>procedure FlexWriteWindow(St :stringRow, Col: Byte; var FAttrs: FlexAttrs);</code>
-  {-Return True if a Hercules card is in graphics mode}+
  
-function HercModeTestWorks : Boolean; +Write a string flexibly using window-relative coordinates.
-  {-Return True if HercGraphicsMode will work}+
  
-procedure SetHercMode(GraphMode : Boolean; GraphPage : Byte); +===== SaveWindow =====
-  {-Set Hercules card to graphics mode or text mode, and activate specified +
-   graphics page (if switching to graphics mode).}+
  
-function ReadKeyWord Word; +<code pascal>function SaveWindow(XLow, YLow, XHigh, YHigh ByteAllocate : Boolean; var Covers : Pointer) : Boolean;</code>
-  {-Waits for keypress, then returns scan and character codes together}+
  
-function CheckKbd(var KeyCode : Word) : Boolean; +Allocate buffer space if requested and save window contents
-  {-Returns True (and the key codes) if a keystroke is waiting}+
  
-function KbdFlags : Byte; +===== RestoreWindow =====
-  {-Returns keyboard status flags as a bit-coded byte}+
  
-procedure StuffKey(Word); +<code pascal>procedure RestoreWindow(XLow, YLow, XHigh, YHigh Byte; Deallocate : Boolean; var Covers : Pointer);</code>
-  {-Stuff one key into the keyboard buffer}+
  
-procedure StuffString(S : string); +Restore screen contents and deallocate buffer space if requested
-  {-Stuff the contents of S into the keyboard buffer}+
  
-procedure ReInitCrt; +===== StoreWindowCoordinates =====
-  {-Reinitialize CRT unit's internal variables. For TSR's or programs with +
-   DOS shells. May reset: CurrentMode, ScreenWidth, ScreenHeight, +
-   WindMin/WindMax, CurrentPage, CurrentDisplay, CheckSnow, and VideoSegment}+
  
-{$ifdef WIN32} +<code pascal>procedure StoreWindowCoordinates(var WC WindowCoordinates);</code>
-procedure SetSafeCPSwitching(FBoolean); +
-procedure SetUseACP(F: Boolean); +
-{$ENDIF}+
  
 +Store the window coordinates for the active window
  
-procedure AssignConToCrt;+===== RestoreWindowCoordinates =====
  
-procedure ClrScr; +<code pascal>procedure RestoreWindowCoordinates(WC : WindowCoordinates);</code>
-  {-Clears the screen and returns the cursor to the upper-left corner}+
  
-procedure TextBackground(Color: Byte); +Restore previously saved window coordinates
-  {-Selects the background color}+
  
-procedure TextColor(Color: Byte); +===== PackWindow =====
-  {-Selects the foreground character color}+
  
-procedure Window(X1,Y1,X2,Y2: Byte); +<code pascal>function PackWindow(XLowYLowXHighYHigh : Byte) : PackedWindowPtr;</code>
-  {-Defines a text window on the screen}+
  
-procedure GotoXY(X,Y: Byte); +Return a pointer to a packed window, or nil if not enough memory
-  {-Moves the cursor to the given coordinates within the screen}+
  
-function WhereX: Byte; +===== DispPackedWindow =====
-  {-Returns the X coordinate of the current cursor location}+
  
-function WhereYByte; +<code pascal>procedure DispPackedWindow(PWP PackedWindowPtr);</code>
-  {-Returns the Y coordinate of the current cursor location}+
  
-procedure ClrEol; +Display the packed window pointed to by PWP
-  {-Clears all characters from the cursor position to the end of the line } +
-  { without moving the cursor.                                            }+
  
-function KeyPressed: Boolean; +===== DispPackedWindowAt =====
-  {-Determines if a key has been pressed on the keyboard and returns True } +
-  { if a key has been pressed                                             }+
  
-function ReadKeyChar; +<code pascal>procedure DispPackedWindowAt(PWP : PackedWindowPtr; Row, Col Byte);</code>
-  {-Reads a character from the keyboard and returns a character or an     } +
-  { extended scan code.                                                   }+
  
-procedure TextMode (Mode: word); +Display the packed window pointed to by PWP at Row,Col. If necessary, the coordinates are adjusted to allow it to fit on the screen.
-procedure InsLine; +
-  {-Inserts an empty line at the cursor position}+
  
-procedure DelLine; +===== MapPackedWindowColors =====
-  {-Deletes the line containing the cursor}+
  
-procedure LowVideo; +<code pascal>procedure MapPackedWindowColors(PWP : PackedWindowPtr);</code>
-  {-Selects low intensity characters}+
  
-procedure HighVideo; +Map the colors in a packed window for improved appearance on mono/B&W displays
-  {-Selects high-intensity characters}+
  
-procedure NormVideo; +===== DisposePackedWindow =====
-  {-Selects normal intensity characters}+
  
-procedure Delay(MS: Word); +<code pascal>procedure DisposePackedWindow(var PWP PackedWindowPtr);</code>
-procedure Sound(Hz: Word); +
-procedure NoSound; +
-procedure AssignCrt(var FText); +
-  {-Associates a text file with CRT device.}+
  
-procedure PlaySound(Freq,Duration: Longint); +Dispose of a packed window, setting PWP to nil on exit 
-  {-Setups window coordinates }+ 
 +===== WritePackedWindow ===== 
 + 
 +<code pascal>procedure WritePackedWindow(PWP : PackedWindowPtr; FName : string);</code> 
 + 
 +Store the packed window pointed to by PWP in FName 
 + 
 +===== ReadPackedWindow ===== 
 + 
 +<code pascal>function ReadPackedWindow(FName : string) : PackedWindowPtr;</code> 
 + 
 +Read the packed window stored in FName into memory 
 + 
 +===== CreateLibrary ===== 
 + 
 +<code pascal>function CreateLibrary(var F : file; Name : string; Entries : Byte) : DirectoryPtr;</code> 
 + 
 +Create a library with the specified # of directory entries 
 + 
 +===== OpenLibrary ===== 
 + 
 +<code pascal>function OpenLibrary(var F : file; Name : string) : DirectoryPtr;</code> 
 + 
 +Open the specified library and return a pointer to its directory 
 + 
 +===== CloseLibrary ===== 
 + 
 +<code pascal>procedure CloseLibrary(var F : file; var DP : DirectoryPtr);</code> 
 + 
 +Close library F and deallocate its directory 
 + 
 +===== PackLibrary ===== 
 + 
 +<code pascal>procedure PackLibrary(LName : string);</code> 
 + 
 +Pack a library to remove deleted entries. 
 + 
 +===== AddWindowToLibrary ===== 
 + 
 +<code pascal>procedure AddWindowToLibrary(PWP : PackedWindowPtr; var F : file; DP : DirectoryPtr; WinName : LibName);</code> 
 + 
 +Add a packed window to the specified library 
 + 
 +===== ReadWindowFromLibrary ===== 
 + 
 +<code pascal>function ReadWindowFromLibrary(var F : file; DP : DirectoryPtr; WinName : LibName) : PackedWindowPtr;</code> 
 + 
 +Read a packed window from a library 
 + 
 +===== DeleteWindowFromLibrary ===== 
 + 
 +<code pascal>procedure DeleteWindowFromLibrary(var F : file; DP : DirectoryPtr; WinName : LibName);</code> 
 + 
 +Delete a packed window from the specified library 
 + 
 +===== MapColor ===== 
 + 
 +<code pascal>function MapColor(c : Byte) : Byte;</code> 
 + 
 +Map a video attribute for visibility on mono/bw displays 
 + 
 +===== SetBlink ===== 
 + 
 +<code pascal>procedure SetBlink(Status : Boolean);</code> 
 + 
 +Enable text mode attribute blinking if On is True 
 + 
 +===== SetCrtBorder ===== 
 + 
 +<code pascal>procedure SetCrtBorder(Attr : Byte);</code> 
 + 
 +Set border to background color if card type and mode allow 
 + 
 +===== Font8x8Selected ===== 
 + 
 +<code pascal>function Font8x8Selected : Boolean;</code> 
 + 
 +Return True if EGA or VGA is active and in 8x8 font 
 + 
 +===== SelectFont8x8 ===== 
 + 
 +<code pascal>procedure SelectFont8x8(Status : Boolean);</code> 
 + 
 +Toggle 8x8 font on or off 
 + 
 +===== HercPresent ===== 
 + 
 +<code oascal>function HercPresent : Boolean;</code> 
 + 
 +Return true if a Hercules graphics card is present 
 + 
 +===== SwitchInColorCard ===== 
 + 
 +<code pascal>procedure SwitchInColorCard(ColorOn : Boolean);</code> 
 + 
 +Activate or deactivate colors on a Hercules InColor card 
 + 
 +===== HercGraphicsMode ===== 
 + 
 +<code pascal>function HercGraphicsMode : Boolean;</code> 
 + 
 +Return True if a Hercules card is in graphics mode 
 + 
 +===== HercModeTestWorks ===== 
 + 
 +<code pascal>function HercModeTestWorks : Boolean;</code> 
 + 
 +Return True if HercGraphicsMode will work 
 + 
 +===== SetHercMode ===== 
 + 
 +<code pascal>procedure SetHercMode(GraphMode : Boolean; GraphPage : Byte);</code> 
 + 
 +Set Hercules card to graphics mode or text mode, and activate specified graphics page (if switching to graphics mode). 
 + 
 +===== ReadKeyWord ===== 
 + 
 +<code pascal>function ReadKeyWord : Word;</code> 
 + 
 +Waits for keypress, then returns scan and character codes together 
 + 
 +===== CheckKbd ===== 
 + 
 +<code pascal>function CheckKbd(var KeyCode : Word) : Boolean;</code> 
 + 
 +Returns True (and the key codes) if a keystroke is waiting 
 + 
 +===== KbdFlags ===== 
 + 
 +<code pascal>function KbdFlags : Byte;</code> 
 + 
 +Returns keyboard status flags as a bit-coded byte 
 + 
 +===== StuffKey ===== 
 + 
 +<code pascal>procedure StuffKey(W : Word);</code> 
 + 
 +Stuff one key into the keyboard buffer 
 + 
 +===== StuffString ===== 
 + 
 +<code pascal>procedure StuffString(S : string);</code> 
 + 
 +Stuff the contents of S into the keyboard buffer 
 + 
 +===== ReInitCrt ===== 
 + 
 +<code pascal>procedure ReInitCrt;</code> 
 + 
 +Reinitialize CRT unit's internal variables. For TSR's or programs with DOS shells. May reset: CurrentMode, ScreenWidth, ScreenHeight, WindMin/WindMax, CurrentPage, CurrentDisplay, CheckSnow, and VideoSegment 
 + 
 +===== SetSafeCPSwitching ===== 
 + 
 +<code psacal>procedure SetSafeCPSwitching(F: Boolean);</code> 
 + 
 +===== SetUseACP ===== 
 + 
 +<code pascal>procedure SetUseACP(F: Boolean);</code> 
 + 
 + 
 +===== AssignConToCrt ===== 
 + 
 +<code pascal>procedure AssignConToCrt;</code> 
 + 
 +===== ClrScr ===== 
 + 
 +<code psacal>procedure ClrScr;</code> 
 + 
 +Clears the screen and returns the cursor to the upper-left corner 
 + 
 +===== TextBackground ===== 
 + 
 +<code pascal>procedure TextBackground(Color: Byte);</code> 
 + 
 +Selects the background color 
 + 
 +===== TextColor ===== 
 + 
 +<code pascal>procedure TextColor(Color: Byte);</code> 
 + 
 +Selects the foreground character color 
 + 
 +===== Window ===== 
 + 
 +<code pascal>procedure Window(X1,Y1,X2,Y2: Byte);</code> 
 + 
 +Defines a text window on the screen 
 + 
 +===== GotoXY ===== 
 + 
 +<code pascal>procedure GotoXY(X,Y: Byte);</code> 
 + 
 +Moves the cursor to the given coordinates within the screen 
 + 
 +===== WhereX ===== 
 + 
 +<code pascal>function WhereX: Byte;</code> 
 + 
 +Returns the X coordinate of the current cursor location 
 + 
 +===== WhereY ===== 
 + 
 +<code pascal>function WhereY: Byte;</code> 
 + 
 +Returns the Y coordinate of the current cursor location 
 + 
 +===== ClrEol ===== 
 + 
 +<code pascal>procedure ClrEol;</code> 
 + 
 +Clears all characters from the cursor position to the end of the line without moving the cursor. 
 + 
 +===== KeyPressed ===== 
 + 
 +<code pascal>function KeyPressed: Boolean;</code> 
 + 
 +Determines if a key has been pressed on the keyboard and returns True if a key has been pressed 
 + 
 +===== ReadKey ===== 
 + 
 +<code pascal>function ReadKey: Char;</code> 
 + 
 +Reads a character from the keyboard and returns a character or an extended scan code. 
 + 
 +===== TextMode ===== 
 + 
 +<code pascal>procedure TextMode (Mode: word);</code> 
 + 
 +===== InsLine ===== 
 + 
 +<code pascal>procedure InsLine;</code> 
 + 
 +Inserts an empty line at the cursor position 
 + 
 +===== DelLine ===== 
 + 
 +<code pascal>procedure DelLine;</code> 
 + 
 +Deletes the line containing the cursor 
 + 
 +===== LowVideo ===== 
 + 
 +<code pascal>procedure LowVideo;</code> 
 + 
 +Selects low intensity characters 
 + 
 +===== HighVideo ===== 
 + 
 +<code pascal>procedure HighVideo;</code> 
 + 
 +Selects high-intensity characters 
 + 
 +===== NormVideo ===== 
 + 
 +<code pascal>procedure NormVideo;</code> 
 + 
 +Selects normal intensity characters 
 + 
 +===== Delay ===== 
 + 
 +<code pascal>procedure Delay(MS: Word);</code> 
 + 
 +===== Sound ===== 
 + 
 +<code pascal>procedure Sound(Hz: Word);</code> 
 + 
 +===== NoSound ===== 
 + 
 +<code pascal>procedure NoSound;</code> 
 + 
 +===== AssignCrt ===== 
 + 
 +<code pascal>procedure AssignCrt(var F: Text);</code> 
 + 
 +Associates a text file with CRT device. 
 + 
 +===== PlaySound ===== 
 + 
 +<code pascal>procedure PlaySound(Freq,Duration: Longint);</code> 
 + 
 +Setups window coordinates  
 + 
 +===== GetLastMode ===== 
 + 
 +<code pascal>procedure GetLastMode;</code>
  
-procedure GetLastMode;