Return info about the cursor on a specified video page
FT_GETVCUR( [ <nPage> ] ) -> <aCurInfo>
<nPage> is the video page to get the cursor information for.
Defaults to the current page, as returned by FT_GETVPG().
A four-element array (<aCurInfo>), set up as follows:
aCurInfo = Top line of cursor
aCurInfo = Bottom line of cursor
aCurInfo = Character row
aCurInfo = Character column
FT_GETVCUR() uses FT_INT86() to invoke interrupt 10h, function
3, to return the character cursor location for the specified
The top line and bottom line of cursor are set depending on
the current cursor mode, and are only meaningful in alphanumeric
For more information on graphics programming, cursors, and
cursor modes, refer to Richard Wilton's _Programmer's Guide to
PC and PS/2 Video Systems_ (Microsoft Press).
aCurInfo := getVCur( 1 ) // Get info on cursor pos in page 1
QOut("Row: " + str( aCurInfo ) + " Col: " + str( aCurInfo ) )
Author: Glenn Scott
Get the video mode
FT_GETMODE() -> nVMode
The video mode, as a numeric.
Use this function to find out what mode your display adapter is in.
Uses DOS interrupt 10h to get the mode. For a table of modes
available on various graphics adapters, refer to a book such
as Wilton's "Programmer's Guide to PC & PS/2 Video Systems"
function main( cMode )
FT_SETMODE( val( cMode ) )
QOut( "Video mode is: " + str( FT_GETMODE() ) )
return ( nil )
Author: Glenn Scott
Return the number of outstanding calls to DispBegin()
FT_DispCnt() --> nCount
Some routines (like exception handlers, for example) must be able to
guarantee that their output makes it to the screen. This can be
difficult if a call to DispBegin() is in effect, because any error
messages will be sent to Clipper's virtual screen buffer instead of
the actual physical screen. This function alleviates the problem by
allowing you to determine if screen output is being buffered, and if
so, how many DispEnd() calls are necessary to flush the buffer.
Although this function does not use "internals" in the conventional
sense, it still makes use of version-specific information in order
to locate the virtual screen buffer. DO NOT attempt to use this
function with any version of Clipper other than 5.01.
// Guarantee that the error message will reach the screen
while FT_DispCnt() > 0 ; dispend(); end
// Now it's okay to do the error message
ErrorMessage( "Something terrible has happened" )
Author: Ted Means
FT_CLS( <nTRow>, <nLCol>, <nBRow>, <nRCol>, <nColor> ) -> NIL
<nTRow>, <nLCol>, <nBRow> and <nRCol> are the screen coordinates
<nColor> is an integer representing the color attribute.
The formula is:
nFore + ( nBack * 16 )
The default is black.
This is a high speed function to clear the screen at the given
coordinates with the given color attribute. This does not change
Clipper's color settings. It uses direct video writes for speed.
FT_CLS( 0, 0, MaxRow(), MaxCol(), 165 )
This example will clear the entire screen with the colors
bright white on magenta.
Author: Robert A. DiFalco
Report the type of video adapter installed
FT_ADAPTER() -> nResult
Integer representing type of video adapter
0 - monochrome
1 - CGA
2 - EGA
3 - VGA
This function is valuable if you use a graphics library and need to
know what type of graphics adapter is installed.
The source code is written to adhere to Turbo Assembler's IDEAL mode.
To use another assembler, you will need to rearrange the PROC and
SEGMENT directives, and also the ENDP and ENDS directives (a very
iVideo := FT_ADAPTER()
CASE iVideo == 0
QOUT( "You have a monochrome adapter." )
CASE iVideo == 1
QOUT( "You have a CGA adapter." )
CASE iVideo == 2
QOUT( "You have an EGA adapter." )
CASE iVideo == 3
QOUT( "You have a VGA adapter." )
Author: Ted Means
See Also: FT_SETMODE()