MS-DOS QBasic

MS-DOS QBasic is a good tool running on MS-DOS which lets you create and run BASIC or QBASIC programs. MS-DOS QBasic is an interpreter, that is to say, it doesn't compile programs into executable files; it only translates a program into executable computer code when you run the program. MS-DOS QBasic has a complete online help system. You can get help by pressing Shift + F1 while you are editing in MS-DOS QBasic.

MS-DOS QBasic is almost fully compatible with BASICA and GWBASIC. Some extended functions in Microsoft QuickBASIC are not supported by MS-DOS QBasic. You can create and run modular programs in MS-DOS QBasic, also you can create traditional BASIC programs. In QBasic, line numbers are not always necessary. You can use block loops and block IF...THEN...ELSE statements, so it is all right to say that QBasic instructions can be organized structurally. Additionally, it supports labels for GOTO statements. You can see all these in the following example:

J = 1
DO WHILE J < 2000
   I = 1
   DO WHILE I <= 10
      PRINT I; ", ";
      I = I + 1
      IF INKEY$ <> "" THEN GOTO BreakLoop1
   LOOP
   J = J + 1
LOOP

BreakLoop1:

FOR I = 1 TO 10
   PRINT I; ", ";
NEXT

IF I = 20 THEN
   IF J = 0 THEN
      PRINT "You win one point!"
   ELSE
      PRINT "You lose one point!"
   END IF
ELSE
   PRINT "Nothing happens."
END IF

There is one QBasic program mentioned in QBasic online help, but not included in MS-DOS 5.0 ~ 6.22 (it is included in the MS-DOS 6.22 supplementary pack). You can download it: REMLINE.BAS. Also there are some other interesting QBasic programs that you can download: NIBBLES.BAS, JULIA.BAS, GERMS.BAS, FNTOLOW.BAS, FUNCDRAW.BAS, CODEGEN.BAS, IPKEEPER.BAS. NIBBLES.BAS: A game by Microsoft. JULIA.BAS: A program drawing a picture that is created by a self-induced mathematical function. GERMS.BAS: A game of Dr Mario. FNTOLOW.BAS helps you to make filenames of your website into lowercase. FUNCDRAW.BAS draws a single input and single output numeric function. CODEGEN.BAS: Generating a password for you. IPKEEPER.BAS: Helping maintenance of the HOSTS file. In addition, I have another QBasic program pack, which contains more interesting programs. It's a pity that The Digital Foundry no longer provides QBasic program downloads.

Return to MS-DOS for Beginners