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