Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I exit Microsoft GW-BASIC, IBM BASICA, or other similar old dialects of BASIC?

Microsoft BASIC, GW-BASIC and BASICA all use a prompt that looks like this:

I can't figure out how to exit any of these. Typing END does not exit them. EXIT, QUIT, Q, Ctrl+C, and everything else that I can think of also does not work.

I'm sure there's a way to do this. I can't imagine everyone who used BASICA on DOS had to restart their machine every single time they wanted to exit the development environment.

So, how do I exit from the old BASIC editor prompt?

like image 769
MD XF Avatar asked May 30 '17 03:05

MD XF


2 Answers

GWBASIC and its clones (e.g., IBM's BASIC and BASICA) exited to the DOS prompt with the command system.

Although redirection was possible even in early versions of MS-DOS/PC-DOS, the BASIC interpreter bypassed using the standard input and output streams, and had its own Ctrl-Break/Ctrl-C handler, so neither of those keystrokes would terminate the interpreter.
The shell command started a fresh copy of the system command interpreter (usually COMMAND.COM), or executed a system command and then returned to BASIC, but did not remove the interpreter from memory.

like image 199
Jeff Zeitlin Avatar answered Nov 13 '22 12:11

Jeff Zeitlin


Type "system" and hit enter to exit GW-BASIC in DOS.

Type "shell" and hit enter to go to DOS but still have GW-BASIC in memory. Type "exit" while in DOS to return to GW-BASIC.

like image 29
Artix Avatar answered Nov 13 '22 11:11

Artix