'===========================================================================
' Subject: SLOW DOS, HORROR DIR COMMAND       Date: 09-02-97 (15:36)       
'  Author: Davey W. Taylor                    Code: QB, QBasic, PDS        
'  Origin: audio.squad@mailbox.swipnet.se   Packet: DOS.ABC
'===========================================================================
'ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ--ÄÄÄ--Ä -ù  ù
'³            ** SLOW DOS, HORROR DIR COMMAND **
'³                Created by Davey W Taylor
'³
'³   This is a very slow version of the standard DOS Shell.
'³  When using the command DIR it displays an error message
'³    and starts an infinate loop: the computer must be
'³     rebooted... I have also included the SAY command
'³        to show the usage of the par$ variable.
'ÀÄÄÄÄÄ--ÄÄù-  ù   ù

PRINT
'PRINT "Slow DOS with horror DIR command!"
'PRINT "Type EXIT to quit"
PRINT
DO

 SHELL "CD>~diskop.tmp"                'Write CD(Current Directory :) to file
 OPEN "~diskop.tmp" FOR INPUT AS #1
  LINE INPUT #1, n$                    'Read current dir
 CLOSE #1
 PRINT n$ + ">";                       'Print prompt
 LINE INPUT "", n$                     'Get command
 n$ = n$ + " "

 cmd$ = LEFT$(n$, INSTR(n$, " ") - 1)  'Get the command
 par$ = MID$(n$, INSTR(n$, " ") + 1)   'Get the command parameters

 SELECT CASE UCASE$(cmd$)              'Check command
  CASE "EXIT"                          'Quit on EXIT
   END
  CASE "SAY"                           'Say something
   PRINT par$
  CASE "DIR"                           'Scare user on DIR
   PRINT "Hard Drive Failure... Please Reboot!!!": DO: LOOP
  CASE ELSE                            'Execute command on all others
   SHELL n$
 END SELECT

LOOP
