Fake DOS Emulator - QBasic Source Code

Back to: Main Programming Page

Ah, the good old days of DOS. Who didn't try to write one of these fake DOS Emulators? This is a pretty simple one - it has a list of 10 comments that it will choose from randomly, plus a couple of built in responses to specific commands. And then at the very end, it tells you it's fed up and makes your screen go blank. The program kind of lost its magic after Windows 95 came out, but I figured, what the hell, maybe I can still find that unsuspecting user who hasn't upgraded to a graphical operating system, yet.

 

Source Code:

'
'
'         Fake Dos for QBasic
'
'This program looks like DOS, but it has some suprises in store for the
'unsuspecting user.  Pressing Ctrl-Pause or Ctrl-Break will end the program.
'Press "F5" to start the program.
'
'Programmed by Jeff Lewis
'
'
'
'
'
'
'
'
'
'
'
'



CLS
count = 0

a:
count = count + 1
INPUT "C:\", c$

IF count = 1 OR count = 2 THEN
GOTO first
END IF

IF count = 20 THEN
GOTO almost
END IF

IF count = 21 THEN
GOTO finished
END IF

IF c$ = "help" OR c$ = "Help" OR c$ = "HELP" THEN
GOTO help
END IF

a = INT(10 * RND)
SELECT CASE a

CASE 0
PRINT "NO!"

CASE 1
PRINT "What do I look like, a slave?"

CASE 2
PRINT "Do it yourself"

CASE 3
PRINT c$; ", "; c$; ".  Is that all you ever want?"

CASE 4
PRINT "Why don't you figure out how to do that without me."

CASE 5
PRINT "Go "; c$; " yourself."

CASE 6
PRINT "Why do you always expect me to do these things?"

CASE 7
PRINT "I'm getting sick and tired of your laziness!"

CASE 8
PRINT "What's in it for me?"

CASE 9
PRINT "I ain't doin' no more work without somethin' in return."

END SELECT
PRINT
GOTO a

help:
PRINT "Go get the manual, don't ask me!"
PRINT
GOTO a

almost:
PRINT "I'm warning you, just one more time and you'll be sorry."
PRINT
GOTO a

first:
PRINT
PRINT
GOTO a

finished:
PRINT "That's it!  No more!"
PRINT
FOR ctr = 1 TO 5000
NEXT ctr
CLS

DO
ctr = 4
LOOP UNTIL ctr = 9000

'Hit [Page Up] a few times to get back to the beginning.