;
;[1m[32m        ____     ___        ___     ___ ___ ___ ___ ____      ___ ___ ___[0m
;[1m[32m         /  /__//_         /__ /  //_ //__ /  //_    /  / / //_ //__//_  [0m
;[1m[32m        /  /  //__        ___//__//__/___//__//     /  /_/_//  //  \/__  [0m
;
;[1m[32m-----------------------------------------------------------------------------[0m
;   - FOR ABO'S CONTACT US AT:   BP:28 1170 WATERMAEL-BOITSFORT 1 BELGIUM!!...
;
;[1m[32m-----------------------------------------------------------------------------[0m
;                           - DON'T SEND ANY DISKS -
;
;[1m[32m-----------------------------------------------------------------------------[0m
;
;
;
;                      [33m THE LEGENDARY >> SUBSOFTWARE << IN 87/88/89/90/91!!...
;                      [1m[32m ------------------------------------------------------
;
;
;
/****************************************************************************
 * This ARexx script acts as a rudimentary virus checker. It will check the *
 * bootblocks of all disks that are currently in the disk drives, and give  *
 * you the option of installing any non-standard bootblocks. At the end of  *
 * the check a count is displayed of all disks checked, the number of       *
 * standard and non-standard bootblocks found, the number of non-bootable   *
 * disks and the number of disks installed.                                 *
 ****************************************************************************/

address 'dopus_rexx' /* Address the Directory Opus ARexx port */
options results      /* So we can receive return codes */
dopustofront         /* Bring the Directory Opus screen to the front */
                     /* if it's not already                          */

nst = 0 ; st = 0 ; nb = 0 ; ch = 0 ; inst = 0

do a = 0 to 3        /* Loop through drives DF0: to DF3: */
	busy on            /* Turn the busy pointer on */
	dr = 'DF'||a||':'  /* Build the DFx: string */
	install check dr   /* Check the bootblock! */
	d = result
	if d ~= -1 then ch = ch + 1  /* not -1 means the bootblock was read */
	if d = 0 then do
		mes = dr || ' has a non-standard bootblock!'  /* GASP! */
		nst = nst + 1
		status 69 set 'Install'    /* Set up the requester gadgets */
		status 70 set 'Leave'      /* appropriately                */
		request mes    /* Display the requester */
		if result = 1 then do    /* We've been asked to install the disk */
			busy on
			install dr
			inst = inst + 1
		end
		status 69 set 'Okay'      /* Restore the original */
		status 70 set 'Cancel'    /* requester gadgets */
  end
	if d = 1 then st = st + 1   /* Increment the standard bootblock tally */
	if d = 2 then nb = nb + 1   /* Increment the non-bootable tally */
end

stext = 'Checked : '||ch||'  Standard : '||st||'  Non-Standard : '||nst||'  Not Bootable : '||nb||'  Installed : '||inst
toptext stext     /* Display the statistics at the end */
busy off
