Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : NFSRC21.ZIP
Filename : VIDMODE.PRG

 
Output of file : VIDMODE.PRG contained in archive : NFSRC21.ZIP
/*
* File......: VIDMODE.PRG
* Author....: Glenn Scott
* CIS ID....: 71620,1521
* Date......: $Date: 15 Aug 1991 23:06:12 $
* Revision..: $Revision: 1.3 $
* Log file..: $Logfile: E:/nanfor/src/vidmode.prv $
*
* This is an original work by Glenn Scott and is placed in the
* public domain.
*
* Modification history:
* ---------------------
*
* $Log: E:/nanfor/src/vidmode.prv $
*
* Rev 1.3 15 Aug 1991 23:06:12 GLENN
* Forest Belt proofread/edited/cleaned up doc
*
* Rev 1.2 14 Jun 1991 19:53:14 GLENN
* Minor edit to file header
*
* Rev 1.1 14 Jun 1991 18:00:42 GLENN
* Documentation change (minor), and checked for compatibility with new
* ft_int86().
*
* Rev 1.0 01 Apr 1991 01:02:30 GLENN
* Nanforum Toolkit
*
*/

#include "FTINT86.CH"

#define VIDEO 16
#define GETMODE 15


#ifdef FT_TEST
FUNCTION MAIN( cMode )

FT_SETMODE( val( cMode ) )
QOut( "Video mode is: " + str( FT_GETMODE() ) )
return ( nil )

#endif


/* $DOC$
* $FUNCNAME$
* FT_SETMODE()
* $CATEGORY$
* Video
* $ONELINER$
* Set the video mode
* $SYNTAX$
* FT_SETMODE( ) -> NIL
* $ARGUMENTS$
* is one of the DOS video modes.
* $RETURNS$
* NIL
* $DESCRIPTION$
* Use this function to put your display adapter into a video mode.
* Uses DOS interrupt 10h to set 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"
* (Microsoft Press)
* $EXAMPLES$
* FUNCTION Main( cMode )
*
* FT_SETMODE( VAL( cMode ) )
* QOUT( "Video mode is: " + STR( FT_GETMODE() ) )
* RETURN ( NIL )
* $SEEALSO$
* FT_ADAPTER()
* $END$
*/


FUNCTION FT_SETMODE( nMode )
LOCAL aRegs[ INT86_MAX_REGS ]

aRegs[ AX ] = nMode
FT_INT86( VIDEO, aRegs )

RETURN( NIL )



/* $DOC$
* $FUNCNAME$
* FT_GETMODE()
* $CATEGORY$
* Video
* $ONELINER$
* Get the video mode
* $SYNTAX$
* FT_GETMODE() -> nVMode
* $ARGUMENTS$
* None.
* $RETURNS$
* The video mode, as a numeric.
* $DESCRIPTION$
* 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"
* (Microsoft Press)
* $EXAMPLES$
* function main( cMode )
*
* FT_SETMODE( val( cMode ) )
* QOut( "Video mode is: " + str( FT_GETMODE() ) )
* return ( nil )
*
* $END$
*/



FUNCTION FT_GETMODE()
LOCAL aRegs[INT86_MAX_REGS]

aRegs[ AX ] := MAKEHI( GETMODE )
FT_INT86( VIDEO, aRegs )

RETURN ( LOWBYTE( aRegs[ AX ] ) )


  3 Responses to “Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : NFSRC21.ZIP
Filename : VIDMODE.PRG

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/