'=========================================================================== ' Subject: RETURNS DESQVIEW VERSION Date: 04-16-96 (06:58) ' Author: Dave Navarro, Jr. Code: PB32 ' Origin: comp.lang.basic.misc Packet: NETWORK.ABC '=========================================================================== '> '> I search a method for detect DesqView and others populars multitask if present. ' DesqviewVer routine for PowerBASIC 3.2 or later ' Donated to the Public Domain by Dave Navarro, Jr. ' ' DESCRIPTION: ' Return the version of DesqView installed. ' ' EXAMPLE" ' DECLARE FUNCTION DesqviewVer() AS INTEGER ' IF ISTRUE(DesqviewVer) THEN ' PRINT "DesqView version";DesqviewVer/100;" installed" ' END IF FUNCTION DesqviewVer () AS INTEGER ! push DS ; save DS ! mov AX, &H1022 ; DesqView API Call ! xor BX, BX ; clear BX ! int &H15 ; through int 15 ! or BX, BX ; is DesqView installed? ! jne NoDesq ; no, exit ! mov AX, BX ; put version into AX ! push AX ; save minor version number for later ! mov CL, 100 ; prepare to muliply AL * 100 ! mul CL ; AX = AL * CL ! pop BX ; retrieve minor version ! mov BL, BH ; mov minor version to BL ! xor BH, BH ; zero out BH ! add AX, BX ; add major and minor parts ! jmp short Done ; NoDesq: ! xor AX, AX ; clear EX Done: ! mov FUNCTION, AX ; return version number ! pop DS ; restore DS END FUNCTION