4DOS Check RBBS Merge John Walker 2/23/94 Julie's Dad (215) 542-1511 10:101/7@BusiLink This merge will detect if RBBS is running under 4DOS and display the version at startup and with the Stat. Utilities menu option. I wrote this merge not because I like advertising 4DOS but because I want to make more mods to RBBS that take advanatage of 4DOS and I needed a flag in the code to tell me when 4DOS is loaded and what version. This merge was written against the BUSIMOD version of RBBS. The following are the mods: 1) Two varables are added to the RBBS-VAR.BAS include file Find: MinsRemaining ' Dgs008 Insert: MinsRemaining, _ ' Dgs008/JBW Z4DOS, _ ' JBW Z4DOSversion$ ' JBW 2) The Subroutine Sysinfo in the RBBSSUB1.BAS file is modified as shown in the file SYSINFO.BAS 3) The information is displayed by making a Mod in the RBBSSUB6.BAS file as follows: Find: IF ZDOSversion$ <> "" THEN _ ' SIN174/RM042401 ZOutTxt$ = ZFG5$ + "Running under " + ZFG7$ + "DOS Version " + ZDOSversion$ _ ' SIN174 ELSE _ ' SIN174/RM042401 ZOutTxt$ = ZFG5$ + "Running under " + ZFG7$ + "OS/2 Version " + ZOS2version$ ' SIN174/RM042401/RM07249302 IF ZDVversion$ <> "" THEN _ ' SIN174 ZOutTxt$ = ZOutTxt$ + ZFG5$ + " and " + ZFG7$ + "DESQview Version " + _ ' SIN174 ZDVversion$ + ZEmphasizeOff$ _ ' SIN174 ELSE _ ' SIN174 ZOutTxt$ = ZOutTxt$ + ZEmphasizeOff$ ' SIN174 CALL QuickTPut1 (ZOutTxt$) ' SIN174 Insert: IF ZDOSversion$ <> "" THEN _ ' SIN174/RM042401 ZOutTxt$ = ZFG5$ + "Running under " + ZFG7$ + "DOS Version " + ZDOSversion$ _ ' SIN174 ELSE _ ' SIN174/RM042401 ZOutTxt$ = ZFG5$ + "Running under " + ZFG7$ + "OS/2 Version " + ZOS2version$ ' SIN174/RM042401/RM07249302 IF Z4DOS THEN ZOutTxt$ = ZOutTxt$ + ZFG5$ + " and " + ZFG7$ + "4DOS Version " + Z4DOSversion$ ' JBW IF ZDVversion$ <> "" THEN _ ' SIN174 ZOutTxt$ = ZOutTxt$ + ZFG5$ + " and " + ZFG7$ + "DESQview Version " + _ ' SIN174 ZDVversion$ + ZEmphasizeOff$ _ ' SIN174 ELSE _ ' SIN174 ZOutTxt$ = ZOutTxt$ + ZEmphasizeOff$ ' SIN174 CALL QuickTPut1 (ZOutTxt$) ' SIN174 4) The code that does the check for 4DOS is found in a new file 4DOSCK.BAS. it requires the Micro$oft include file QBX.BI because it uses a call to Interrupt. Also because of this you must add the QBX.LIB to the libraries when you link. These are the Micro$oft Professional BASIC ver 7.1 Libraries and include files they have equivilents for QuickBasic but I don't know the names now. No Garenties are stated or implied for this merge. Merging is a risky business but fun! I have tested this in the following configurations and they seem to work: MS-DOS 5.0 with 4DOS 4.02, MS-DOS 5.0 with 4DOS 5.0, and MS-DOS 5.0 with no 4DOS. Since the 4DOS documentation states that INT 2Fh maybe 0 under some versions of DOS I have included a little test file VER4DOS.EXE that executes the merge code in isolation if you want to see if your DOS can do an INT 2Fh sucessfully. Since I don't know what versions of DOS this applies to I don't know what the program will do when it finds one. I suspect BASIC will detect the problem and issue a runtime error, if not an INT to a 0 vector I think will boot the computer. The safest way I know to do this is to copy VER4DOS to a bootable floppy and try it after a fresh boot. Again you assume all risks. Enjoy. Files: 4DOSCK.TXT - Information on 4DOS check Merge - Your Reading it QBX.BI - Include header file required to compile 4DOSCK.BAS VER4D.BAS - Source for Test Program VER4D.EXE - Test Program to test INT 2Fh 4DOSCK.BAS - Source of Basic Subroutine to Check for 4DOS 4DOSCK.OBJ - OBject File for Linking into RBBS - BUSIMODS SYSINFO.BAS - The Moded version of SYSINFO subroutine found in RBBSSUB1.BAS MAKEIT.BAT - Batch file to Compile and Link VER4DOS and 4DOSCK