BBS: Inland Empire Archive Date: 09-13-92 (09:50) Number: 374 From: STEVE MCCRYSTAL Refer#: NONE To: RICH WAUGH Recvd: NO Subj: Programmimg Conf: (2) Quik_Bas
;
In a msg of <13 Sep 92>, Rich Waugh writes to All:
;
Rich,
Part II...
QJ> Here is a program that will detect if it is running under DESQview.
QJ> Have fun with it.
'___ CUT HERE ---
DECLARE SUB qjDVINIT ()
DECLARE FUNCTION qjDVINST% ()
' QJDV.BAS v1.0 Released into the Public Domain
' Written by Quinn Tyler Jackson
'$INCLUDE: 'qb.BI'
DEFINT A-Z
CONST TRUE = -1
CONST FALSE = NOT TRUE
DIM SHARED InRegs AS RegTypeX
DIM SHARED OutRegs AS RegTypeX
' The code that follows is merely a test. To make this program into
' a support module, you must erase this silly code.
qjDVINIT
CLS
PRINT "Hello, and welcome to QJDV version 1.0"
PRINT
IF qjDVINST THEN
PRINT "This test is running under DESQView"
END
ELSE
PRINT "This test is not running under DESQview...."
END
END IF
END
SUB qjDVINIT
nul = qjDVINST
END SUB
FUNCTION qjDVINST
SHARED IN.DV
InRegs.AX = &H2B01
InRegs.cx = &H4445
InRegs.dx = &H5351
CALL InterruptX(&H21, InRegs, OutRegs)
IF OutRegs.AX MOD 256 <> &HFF THEN
IN.DV = TRUE
ELSE IN.DV = FALSE
END IF
qjDVINST = IN.DV
END FUNCTION
'-+---------------------
-[Steve]-
--- GoldED 2.40.P0623+
* Origin: -[Steve's Place]- New Berlin, WI (FidoNet 1:3641/1.202)

Books at Amazon:
Back to BASIC: The History, Corruption, and Future of the Language
Hackers: Heroes of the Computer Revolution (including Tiny BASIC)
Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution
The Advent of the Algorithm: The Idea that Rules the World
Moths in the Machine: The Power and Perils of Programming
Mastering Visual Basic .NET