GW-BASIC is a dialect of the programming language BASIC developed by Microsoft in the 1980s, and was included in most versions of MS-DOS. It is similar to Microsoft/IBM BASICA, but is a fully self-contained executable.
Questions tagged [gw-basic]
41 questions
2
votes
0 answers
How to read a protected .bas file which has "line buffer overflow"?
I have an old file which I'd like to read its code.
The file has no extension. Right click + open with notepad gives me something like that :
1 N¦öêS‚ `𨢾Œ2 € € 3
ôI¿Õ^J‚ á
So I've renamed and…

manny-
- 129
- 2
- 10
2
votes
4 answers
Qbasic : illegal file number in *line number*
I'm writing a program in GW-BASIC. For some reasons, I have the following error :
"Numéro de fichier illégal en 4712"
which can be translated in english by,
" illegal file number in 4712"
Here is a part of my code :
51 Chemin$ =…

manny-
- 129
- 2
- 10
2
votes
1 answer
Modify basic files used with gwbasic
I have a batch file which launches other .bas files with the help of gwbasic.
Here is the code of the batch file:
graphics
cd basic
gwbasic menut-hp/d
cd \
Then I have the possibility by typing 1 or 2 etc + ENTER to choose which program i want to…

manny-
- 129
- 2
- 10
2
votes
2 answers
Explicit line numbers and execution order
GW-BASIC and many other old BASIC dialects like C64 BASIC allowed you do something like this:
20 PRINT "World"
10 PRINT "Hello"
and that would result in the following output when the RUN command/statement was executed:
Hello
World
The LIST…
user539810
2
votes
2 answers
What is the error in following program in GW BASIC?
I was making a program which could tell if a given number is a prime number or not. No matter whether I enter a prime number or another number, it always shows "it is not a prime number". Is there any fault in it?
10 input "what is the number";a …

Sara Sameen
- 31
- 2
2
votes
3 answers
END command in GW-BASIC
I am using the AUTO command in GW-BASIC 3.23. After I type a program I want to run it. The END command won't return me to command level. I also tried CTRL-BREAK and Ctrl+C.

user3001551
- 25
- 7
2
votes
4 answers
How to exit a gw basic program at any time?
I am creating a game and i want that if the user hit F10 or any other function key then they the program should end.

Naushaad Abbas
- 73
- 2
- 6
2
votes
1 answer
How to change font and text size in gw basic?
How to change font and text size in gw basic?Is there a way to do it?

Naushaad Abbas
- 73
- 2
- 6
2
votes
1 answer
Printing to something besides LPT1 in GW Basic
I have a piece of software written in GWBASIC that currently is set up to just print locally to LPT1. It's been requested to have this piece of software instead print to some network printer.
I have no experience with GWBASIC (but some experience…

kmarks2
- 4,755
- 10
- 48
- 77
1
vote
4 answers
QBASIC: Execution of a GOTO Line if Condition Is Not Met
I am converting GW-BASIC code to C# and have very limited experience in BASIC languages in general. I am trying to understand how IF...THEN...GOTO statements behave. For example, I have the following statement:
85 IF M(3,1)>M(2,1) THEN 95
90…

Tom Miller
- 536
- 1
- 4
- 14
1
vote
1 answer
Im trying to make tetris in Basic , but I have encoutered a problem which i cant seem to solve
' Define the subroutine
SUB MySubroutine
PRINT "Hello, world!"
END SUB
' Call the subroutine
CALL MySubroutine
I wanted to try and make TetrisTetris in qbasic but I'm trying to figure out subs in QBasic and for some reason, there's an error…

Mirazz_Boi
- 13
- 1
- 3
1
vote
2 answers
Commands in GWBASIC
I am using GWBASIC and cannot figure out a few things. Like, when I'm saving a program after running it with F4, it says: File not found.
Secondly, when I'm using auto command it shows * with line numbers.
Finally, if I want to take program and its…

SidraM
- 305
- 2
- 4
- 15
1
vote
1 answer
why is the function CHDIR not working on the network ? Qbasic BasicA
I have a .bas file that I run using GWBASIC.EXE
The .bas file uses other files located in the path : \srv120 (T:)\Basic
(GWBASIC.EXE and the .bas file are also in the same directory T\Basic)
In the directory T\Basic, I've created another folder…

manny-
- 129
- 2
- 10
1
vote
1 answer
How MKI$ and CVI Functions works
I am working on GwBasic and want to know how 'CVI("aa")' returns '24929' is that converts each char to ASCII but code of "aa" is 9797.

Nauman Umer
- 1,006
- 1
- 11
- 21
1
vote
1 answer
assigning to arg inside function definition?
Trying to read some old BASIC code to do a port, and coming across this mind-bending concept:
1150 DEF FNB(Q)=Q+8*((Q=9)-(Q=0))
What... is going on here? How can you assign to the parameter like that? Why isn't this equivalent to Q+8*(9-0)?
I…

Grant Birchmeier
- 17,809
- 11
- 63
- 98