BBS: Inland Empire Archive Date: 12-30-92 (09:24) Number: 377 From: LUIS ESPINOZA Refer#: NONE To: SCOTT WUNSCH Recvd: NO Subj: 4DOS and detecting it Conf: (2) Quik_Bas
Greetings, Scott! On (27 Dec 92) Scott Wunsch wrote to Luis Espinoza... SW> Salutations, Luis! SW> SW> On 24 Dec 92, Luis Espinoza entered the following ASCII codes for SW> the express viewing pleasure of Jeffery Foy... SW> SW> LE> Try something like: SW> LE> SW> LE> a$=Environ$("COMSPEC") SW> LE> if instr(a$,"4DOS") then FFos=1 else FFos=0 SW> SW> Uh-uh. Some of the real 4DOS maniacs will delete COMMAND.COM and SW> rename 4DOS to that name for the sake of some of the dumb programmes SW> out there that insist that a command processor _must_ be called SW> COMMAND.COM ;). Ok, ok, so I try to take the easy way out. So how about this. It will return (-1) if 4DOS is installed. But in version 3.0 it might crash the system. Luis DECLARE FUNCTION Chk4Dos% () '$INCLUDE: 'QBX.BI' PRINT Chk4Dos FUNCTION Chk4Dos% DIM r AS RegType r.ax = &HD44D r.bx = 0 Interrupt &H2F, r, r Chk4Dos% = (r.ax = &H44DD) END FUNCTION --- PPoint 1.33 * Origin: The Rubber Room (1:207/213.5)
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