Questions tagged [qbasic]

QBasic is a general-purpose interpreted programming language derived from QuickBasic 4.5. QBasic replaced GWBasic starting from MSDOS 5. It became popular, because it had a quite advanced IDE with a debugger and was delivered free with MSDOS, Windows 95 and 98. The well-known game 'Nibbles' was written in QBasic. QBasic was written by Paul Allen (Microsoft) in 1991. Also see [tag:quickbasic]

QBasic replaced GWBasic starting from MSDOS 5. It became popular, because it had a quite advanced IDE with a debugger and was delivered free with MSDOS, Windows 95 and 98. The well-known game 'Nibbles' was written in QBasic. QBasic was written by Paul Allen (Microsoft) in 1991.

You are able to make some code samples for your questions via Repl.it online interpreter for QBasic

Also see

178 questions
2
votes
1 answer

How do you run a batch file within QBasic?

I would like to know how to run a batch file within QBasic. And when I mean within I mean NOT in a new window. Can you help me out? I'm making a fake DOS.
BuzzyBlitz
  • 55
  • 3
2
votes
2 answers

How to parse a time in years in QBasic

How to parse a time (month/date/year) in Microsoft QBasic, needed for testing. s = 'PT1H28M26S' I would like to get: num_mins = 88
2
votes
2 answers

'Bad file mode' error OPEN statement read/write to serial (COM) port using VB6

I try to migrate an old QBasic program, for reading from a serial device (COM-port), to Visual Basic 6. I use this code (this original code should work for VB6 also): RESET OPEN "COM1:2400,E,7,2,CS,DS,CD" FOR RANDOM AS #1 PRINT #1, "SND1" LINE INPUT…
waanders
  • 8,907
  • 22
  • 70
  • 102
2
votes
2 answers

Bold Output Text in Qbasic

I'm trying to get bold specific text, inside an input text field. I'm not sure how to go about it since q basic code isn't interpreted inside a text field, I've tried 10 REM PROGRAM TO PRINT A BOLD STRING 15 CLS 18 PRINT "PLEASE INPUT YOUR MATRIC…
2
votes
1 answer

How can i create files (automatically) through a vb.net program that act as input for other programs?

I have a program that uses some user input to automatically create files I need for an upload process. The files are a .bas (qbasic program) and a .lot (a voxco automaton file). The files are created perfectly, the syntax is flawless. When I try to…
2
votes
2 answers

'modifying' an exe by working with bas using visbasic or q basic

all! I'm trying to run programs to control stepper motors. The PC and software and stepper motor controller I have already in place are pretty old and I'm new to almost everything I'm doing here-learning as I go sort of thing. I've 'coded' a bit in…
2
votes
3 answers

QBasic - How to get the value of F

I have the following formula: F = X / 1+4+9+16+....+n^2 How can I write a program in QBasic that find the result of F? Thanks.
Simplicity
  • 47,404
  • 98
  • 256
  • 385
2
votes
2 answers

Rewriting Basic Code without Label

I have some code that uses label, an example of it is below: SUB occupy (x) occupied(x) = 0 FOR i = 1 TO 40 IF armyloc(i) = x THEN occupied(x) = i GOTO holdup ELSE END IF NEXT i holdup: END SUB As you can see, it uses the label holdup to…
Dave Mackey
  • 4,306
  • 21
  • 78
  • 136
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
1 answer

QBasic Vs. QuickBASIC

I want to learn "old school" programming. A friend suggested Q BASIC. But another person told me Quick Basic. I want to practice programming in the OLD Dos operating system. What is the difference between the two Q Basic and Quick Basic?
Elmer Fudd
  • 21
  • 1
1
vote
3 answers

QuickBasic 4.5 Gravis Ultrasound Library

I am currently working on a small project in QuickBasic that requires the use of MIDI files. As the DOS environment I'm using DOSBox 0.74, which provides emulation of the Gravis Ultrasound card. So far, I've been able to access GUS only by using the…
Michael Bikovitsky
  • 903
  • 2
  • 10
  • 20
1
vote
1 answer

Sending Serial Data Between Two Virtual Machine in a Learning Practice

I am trying to send and receive data between two VM in Vm-Ware Workstation for learning purpose. I use Quick Basic IDE for progrmming serial COM Port.Operating system is Freedos in both VM's. Every VM uses a virtual port of windows host. The pair of…
1
vote
1 answer

Is there justifying strings to left and right statements in Turbo Pascal?

I searched in Turbo Pascal 6 the complete reference for "rset" and "lset" - statements of QB 4.5 for justifying strings inside their variables bytes - equivalents in Turbo Pascal and found no result as if Turbo Pascal doesn't need these statements…
Ahmed Crow
  • 101
  • 4
1
vote
1 answer

Why does this GOTO not work in BASIC 256?

2 Print "What is your name" input nameperson$ Print "What is your Dad's name" input ageperson$ Print "Your Name is ";nameperson$;" ";ageperson$ GOTO 2 Why does this code not work in BASIC 256? I have tried it in QB64 and it worked.
Barthdry
  • 7
  • 4