You are currently offline, waiting for your internet to reconnect

Saving GW-Basic/BASICA ASCII File to Use with QBasic

This article was previously published under Q80745
Retired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
If you try to run a program created with GW-Basic or BASICA inMS-DOS QBasic, the following error message may be displayed:
This message means that either a syntax modification may be needed tomeet QBasic language rules, or the file format is not ASCII. AllQBasic programs must be in ASCII format.

By default, GW-Basic and BASICA save programs in binary format thatQBasic cannot read. A program written in GW-Basic or BASICA must besaved in ASCII format before it can be loaded into QBasic.
To eliminate the error, do the following:

  1. Make a backup copy of the original program written in GW-Basic or BASICA.
  2. Locate GWBASIC.EXE or BASICA.EXE and execute the program.
  3. Use the LOAD (F3) command to load the program to be used in QBasic. For example, type the following:
    load "progname.bas"
  4. Use the LIST (F1) command to verify the program's contents.
  5. Use the SAVE (F4) command with the A option to save the program in ASCII format. For example, type the following:
    save "progname.bas",a
  6. Exit GW-Basic or BASICA with the SYSTEM command.
The program is now in ASCII format and can be used in QBasic.

To execute the program in QBasic, do the following:

  1. Run QBASIC.EXE.
  2. From the File menu, choose Open, and enter the program file that was saved in ASCII format.
  3. From the Run menu, choose Start.
If the text is garbled with control characters and character setcharacters, the program is probably not in ASCII format. Exit QBasicand save the file in ASCII as explained above.

For more information about BASICA and GW-Basic conversion, query onthe following words in the Microsoft Knowledge Base:
basica and qbasic
6.22 basic convert gwbasic.exe qbasic.exe basica.exe gw-basic 5.00 5.00a 6.00 6.20

Article ID: 80745 - Last Review: 11/16/2006 05:41:57 - Revision: 2.1

  • Microsoft MS-DOS 5.0 Standard Edition
  • Microsoft MS-DOS 5.0a
  • Microsoft MS-DOS 6.0 Standard Edition
  • Microsoft MS-DOS 6.2 Standard Edition
  • Microsoft MS-DOS 6.21 Standard Edition
  • Microsoft MS-DOS 6.22 Standard Edition
  • KB80745
kTracking = 1; var varCustomerTracking = 1; var Route = "76500"; var Ctrl = ""; document.write("