Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run GW-Basic under Ubuntu?

Tags:

gw-basic

Well, I suddenly missed GW-Basic very much, so I want to install one in my new Ubuntu box. I have a long time not programmed for GW-Basic, so I don't know if there comes new releases. I copied GWBASIC.EXE from my old DOS 3.3 box, but it seems not start using Wine. I guess it's 16-bit so Wine will not support it.

Is there something like 286 emulator? Or should I have to run some expensive VM like Vmware? Oh no.

like image 650
Xiè Jìléi Avatar asked Apr 08 '11 09:04

Xiè Jìléi


People also ask

How do I run a GW-BASIC program?

GW-BASIC Operator To enter a problem, respond to the Ok prompt with a question mark (?), followed by the statement of the problem you want to solve, and press the RETURN key. In GW-BASIC, the question mark can be used interchangeably with the keyword PRINT. The answer is then displayed.

Which shortcut key is used to run a program in GW-BASIC?

Answer. F2 keyTo run the program, simply press the F2 key, which is assigned to the RUN command.

Why do we use GW-BASIC?

GW-BASIC was designed for the IBM PC and is similar to IBM BASICA language, but is a self-contained executable and unlike other BASIC derived languages; it doesn't need the ROM BASIC. Some of the GW-BASIC features include: CLS command for clearing the screen. PRINT USING and LPRINT commands.


1 Answers

DOSbox works for running gwbasic, and many old dos programs.

To install it: sudo apt-get install dosbox

To run it: dosbox gwbasic.exe

Caveats: DOSbox emulates the CPU, so it runs apps slower than on Wine or as a native app. However, anything that originally ran on a 486 should run fine with DOSbox.

Speaking of gwbasic, by default it saves the source in a binary format. You can save in a text format with the a (ascii) switch, like this:

save "filename",a

As far as a basic interpreter that runs gwbasic code on Ubuntu, I haven't found one yet, but I am still looking.

like image 136
Gordon Avatar answered Mar 28 '23 01:03

Gordon