DOSBox 0.63, BASIC, QuickBASIC 4.5 and Windows XP

Please use this Board for QBasic related requests ( file research, programming, etc.)

Moderators:Administrator, Global Moderator

buff1

Post by buff1 » Mon Jan 03, 2005 4:04 am

If I were you I would ask perfect sync about dos box, if that doesnt help
get PowerBasic PBcc (console compiler). XP is a pain in the ...

Ralph
QBasic God
Posts:134
Joined:Sat Nov 06, 2004 2:27 am
Location:Katy, Texas

Post by Ralph » Mon Jan 03, 2005 7:20 am

Thanks, Buff1, I looked into PowerBASIC CC, as well as other PB web page descriptions, and all I can gather is that PB is a very powerful text-oriented tool for TEXT applications, and from what PB commands I could see, I could not find LPRINT, SCREEN, DRAW, LINE, CIRCLE and similar BASIC and QuickBASIC graphic commands. After all, I, and many others like myself, I feel, are not interested in getting a more powerful BASIC-like program. What we want is a program that will let us run the old BASIC and/or QuickBASIC programs that we have been running and using with good results all these years, and that now Windows XP Home Edition does not allow us to use. The problem seems to be that XPHE does not allow using the above commands properly. I say "properly", because, these commands (except LPRINT) all work in XP, but the program, which starts out as a window, as it hits the SCREEN command, maximizes, shows the first screen correctly for a few seconds, then minimizes. And, one can't get it to to anything else but that first screen and minimize! That is what is frustrating, and makes one think that there must be a reasonably simple "fix" to this problem.

It was because of the above thinking that I started this thread, but, outside of Dr_Davenstein and you, Buff1, nobody else on this forum has even bothered to answer or give suggestions.

I'm just about to give up on doing anymore of the simple graphics I used to do in QB (I'm an engineer, and I use to draw beautiful x-y curve solutions for a number of problems), and resign myself to learn Visual Basic. :(

However, I did just start this thread on Dec 29, 2004, and today is only Jan 3, 2005, so, I think it would only be fair to wait at least for a month before really giving up on this :P
Ralph. Running QuickBASIC Version 4.5, Windows XP Home Edition, Version 2002, Service Pack 2, and HP LaserJet 4L printer.

Dr_Davenstein
QBasic God
Posts:166
Joined:Tue Mar 25, 2003 12:45 am
Location:U.S.A.
Contact:

Post by Dr_Davenstein » Mon Jan 03, 2005 10:51 am

There is a new compiler called FreeBasic. It's alot better than PowerBasic, in my opinion. It's almost 100% compatible with QB syntax too. It would be perfectly suited for plotting curves and such, and it's totally compatible with WinXP. Just think of it as QBasic for windows. I can help you out with that, if you want to try it. :P
Come check out [url=http://www.freebasic.net/forum/index.php]FreeBASIC[/url]. The syntax is based on QuickBasic, but it expands to use pointers, operator overloading, etc... The list goes on and on!

Ralph
QBasic God
Posts:134
Joined:Sat Nov 06, 2004 2:27 am
Location:Katy, Texas

Post by Ralph » Tue Jan 04, 2005 4:10 am

Nice of you to reply with some possible good news, Doctor! FreeBASIC (FB) sounds as if it could be the way for me to go.

I went to the FB site forum, and could not find any mention of results by any one using FB and Wndows XP Home Edition (XPHE) for curves and such, or with the graphics commands that I have described herein before. I did read that it was compatible with Windows 95, 98, ME, 2000, 2003 and XP. But, I didn't see the magical words, 'XP Home Edition". So, I remain doubtful as to how much I want to experiment with FB.

Doctor, you say, "...and it's totally compatible with WinXP". Have you yourself had any experience with FB running on XPHE, and using the above graphics? I have heard the XPHE has had problems with PowerBASIC, but not Windows XP Professional (XPP). Since mine is the Home Edition version, I try to stress it, so as not to be fooled by someone using XPP calling it simply XP.

But, you said you would be willing to help me. Probably the best help, I think, would be a positive statement that you have run FB on XPHE and that it DOES work with ALL the QB commands, including the graphics commands. That statement by you would send me off into downloading FB and giving it a fair tryout.
Ralph. Running QuickBASIC Version 4.5, Windows XP Home Edition, Version 2002, Service Pack 2, and HP LaserJet 4L printer.

Dr_Davenstein
QBasic God
Posts:166
Joined:Tue Mar 25, 2003 12:45 am
Location:U.S.A.
Contact:

Post by Dr_Davenstein » Tue Jan 04, 2005 5:48 am

I'm still using WinME, but I just bought my daughter a new computer for Christmas with WinXP Home Edition installed. Out of curiosity, I burned some demos to a cd and they ran fine on it. :D

One of the QB keywords that it doesn't support is LPRINT, but there is a much better way to do it with FB anyway. ;)
Come check out [url=http://www.freebasic.net/forum/index.php]FreeBASIC[/url]. The syntax is based on QuickBasic, but it expands to use pointers, operator overloading, etc... The list goes on and on!

Ralph
QBasic God
Posts:134
Joined:Sat Nov 06, 2004 2:27 am
Location:Katy, Texas

Post by Ralph » Tue Jan 04, 2005 6:01 am

Sounding better all the time! But, in my last post, I said, "a positive statement that you have run FB on XPHE and that it DOES work with ALL the QB commands, including the graphics commands." So, did you use SCREEN, LINE, CIRCLE, and such in the demos that ran fine in XPHE? I am almost, almost convinced to download FB and start experimeenting and learning what I nee to... Yes, just one hair's width away...
Ralph. Running QuickBASIC Version 4.5, Windows XP Home Edition, Version 2002, Service Pack 2, and HP LaserJet 4L printer.

Dr_Davenstein
QBasic God
Posts:166
Joined:Tue Mar 25, 2003 12:45 am
Location:U.S.A.
Contact:

Post by Dr_Davenstein » Wed Jan 05, 2005 3:32 am

Yep! Right now it supports Screen 12 & 13. You can also specify other arguments. For example, you can call...

Code: Select all

SCREEN 640, 480, 16, True
...which sets the screen's horizontal factor to 640, the vertical factor to 480, the bit-depth to 16 and sets full screen mode to True(-1).

It supports Line, Pset, Preset, Point, PMap, Window, View, Pcopy, Get, Put, Palette, Palette Using, Inp and Out. It also supports Circle, but Sterling is still optimizing the algo, so it doesn't support Ovals(ellipses) yet, but it will! :P

The best thing to keep in mind is that it's a Windows 32bit compiler, no DOS at all! You wont get any complaints from windows, unless you try do something illegal... i.e. trying to access a file record past the end of the file! :twisted:

Check this demo out...
http://qbnz.com/dr_davenstein/QBvsFB.zip
I wrote this code in QuickBasic 4.5 for an old-skool game(Rogue) I was re-making. I compiled it with FB and only had to change one line of code! :Y):

I bet the QB version wont even run on XP!
Come check out [url=http://www.freebasic.net/forum/index.php]FreeBASIC[/url]. The syntax is based on QuickBasic, but it expands to use pointers, operator overloading, etc... The list goes on and on!

Ralph
QBasic God
Posts:134
Joined:Sat Nov 06, 2004 2:27 am
Location:Katy, Texas

Post by Ralph » Wed Jan 05, 2005 5:46 am

I am now able to do everything fine, using DOSBox! The only thing so far that I cannot do, is use LPRINT ("This device is not connected") and SHELL "Notepad" (This is not a DOS program").

Running QB in DOSBox, the Alt+Enter to toggle between a full screen and a window works fine, also.

Exe programs compiled with QB also run properly under DOSBox.

And, I haven't got any of the old "runs for a few seconds and then minimizes" problem. :D

THANKS to Dr_Davenstein and Buff1 for sticking with me!

Dr., try your download on DOSBox, I'd bet it will run fine! Unless it has LPRINT, that is!
Ralph. Running QuickBASIC Version 4.5, Windows XP Home Edition, Version 2002, Service Pack 2, and HP LaserJet 4L printer.

Dr_Davenstein
QBasic God
Posts:166
Joined:Tue Mar 25, 2003 12:45 am
Location:U.S.A.
Contact:

Post by Dr_Davenstein » Fri Feb 04, 2005 10:48 am

Hmmm.... found this today. You interested in it?

The Unknown QB Programmer wrote:here's a post by myself from a while ago, shows how to change the print processor settings to let you print with lprint (using a lpt1 printer) in windows xp. (you woulnd't believe how long it took me to find this...)

"printing to lpt1 in win xp
by the unknown qb programmer

i did some setting experimentation and here are my results:

1) i opened qb and tried to do a lprint statement while having my lpt1 printer box open. i saw the document come up, but it just sat there.

2) i changed a setting

3) went back to qb, lprinted, and viola - it worked.

the setting i changed:

go to start, control panel, printers and faxes, right click on your printer attached to lpt1, click properties, advanced, print processor. you should now be looking at a window with two columns - the first one says winprint and the second one has a bunch of options. change that one from raw to text, hit ok, ok. wait about 30 seconds for the window to close. ta-da! you can now use your lpt1 printer in qb. unfortunately, this doesn't work for usb printers - qb sends data directly to lpt1, apparently. even if your default printer isn't the one attached to lpt1, it will still send it to your lpt1 printer. this also enables open "lpt1:" for output as #freefile. i tried printing graphics with text mode enabled, and it worked on my lexmark z11.

while i was looking at these settings, i also figured out something else.

go to start, control panel, printers and faxes, right click on your printer attached to whereever, click properties, help, help topics, search tab, search for "text". display the second to last topic, something about control codes. scroll down a bit and you will see a list of codes. i haven't checked all of them, but if you send chr$(&h##) (without the brackets) to the printer, i know for sure that the carriage return and form feed ones work. the others probably work too."

a note, if you want to print stuff from windows again, you should change the print processor back to raw mode. although you could set up your system to have one printer on the parallel port for qb printing, and one on the usb port for windows printing, if you're planning on using it a lot.

taken from http://www.network54.com/Forum/message? ... 1089857099
Come check out [url=http://www.freebasic.net/forum/index.php]FreeBASIC[/url]. The syntax is based on QuickBasic, but it expands to use pointers, operator overloading, etc... The list goes on and on!

Ralph
QBasic God
Posts:134
Joined:Sat Nov 06, 2004 2:27 am
Location:Katy, Texas

Post by Ralph » Sat Feb 05, 2005 10:11 pm

Thank you, Dr. Yes, I am interested in the information you posted.

First, I followed the instructions, ending with changing RAW to TEXT.
Then, I tried out a simple LPRINT program in QB 4.5. It sent something to the printer, but, of course, my HP LaserJet LP wouldn't print until I sent it a formfeed. Then, it printed fine. So, I confirmed that the change in the properties of the printer attached to the LPT1 port allows me to use LPRINT correctly in QB 4.5, running in Windows XP HE.

Second, I opened MS Word and wrote a line or two, then sent it to the printer. No problem! Great, so, it seems as if I can leave the change I made, without having to change the TEXT back to the RAW for Windows programs. :D , :D and one more :D Wheepee!
Ralph. Running QuickBASIC Version 4.5, Windows XP Home Edition, Version 2002, Service Pack 2, and HP LaserJet 4L printer.

Dr_Davenstein
QBasic God
Posts:166
Joined:Tue Mar 25, 2003 12:45 am
Location:U.S.A.
Contact:

Post by Dr_Davenstein » Sun Feb 06, 2005 2:03 am

Aha!!! Very cool. This information may be of use to me later. I'm teaching my daughter how to program in QBasic... and her PC is running WinXP Home Edition. :())):
Come check out [url=http://www.freebasic.net/forum/index.php]FreeBASIC[/url]. The syntax is based on QuickBasic, but it expands to use pointers, operator overloading, etc... The list goes on and on!

Ralph
QBasic God
Posts:134
Joined:Sat Nov 06, 2004 2:27 am
Location:Katy, Texas

FreeBASIC compiler

Post by Ralph » Fri Feb 11, 2005 4:33 am

Hello, Dr_Davenstein!

I tried a QB program running through QuickBASIC 4.5, "mounted" on DOSBox 0.63. It ran, at the speed of a slow-moving snail!

Next, I ran your freeBasic-compiled QBPath.exe. It seems to run fine, except that it runs at rocket speed on my Intel Pentium 4, 2.3 GHZ machine! And, it runs for a few seconds, then...yes, minimizes!

So, is the freeBASIC compiler for me? I sure hope so, since it is a 32-bit, Windows-based program, and seems to be just the ticket for me, judging from your reports on previous tests on your daughter's Windows XP HE computer.

In an earlier post in this thread, you stated that you would be willing to help out, if I decided to go the freeBASIC compiler route. O.K., I have downloded freeBasic, and done the extractions. The only exe file I see is fbc.exe and, when I double click it, it seems to open for a split second, and...that's all I get. It looks like a quick flash!

EDITED LATER: I have now learned to go to the Command line, enter
c:\path\fbc.exe filename.bas
and, I now have both filename.bas and filename.exe! Great, I now "know" how to use the freeBASIC compiler (fbc.exe)!


I know that I just don't know what I'm doing with this compiler, but, then, I'm spoiled with QuickBASIC 4.5, in which I can run QB, then look for a bas program, open it, edit it (if I wish), run it and, finally, produce an exe file.

How does one manage fbc.exe? Can one run bas files without converting into an exe file? Or is the fbc.exe only useful in producing exe files? If so, how does one go about this? I see a large number of EXAMPLES in that folder in freeBASIC. I tried to run the first one in QB, and I got an error in the first DIM statement, so, I stopped, went to QuickBasic Cafe, and wrote this post.

ADDED LATER: I guess I can still ask, is it possible to run fbc.exe and load a filename.bas, as in QuickBASIC, and be able to edit the file? (Probably not, as I am finding out that fbc.exe is really for more advanced programmers than me :(

Sure hope you can help me once again, Dr.!
Ralph. Running QuickBASIC Version 4.5, Windows XP Home Edition, Version 2002, Service Pack 2, and HP LaserJet 4L printer.

Ralph
QBasic God
Posts:134
Joined:Sat Nov 06, 2004 2:27 am
Location:Katy, Texas

Post by Ralph » Thu Jun 23, 2005 6:29 am

Dr_Davenstein and Buff1:
Here I am, after experimenting some more...

I found an old 3 1/2" floppy disk with the name "DOS for Windows 95", and about 17 files. I deleted files that looked as if they were not necessary to run DOS, and found that I clould start DOS with these five files:
These two are visible:
COMMAND.EXE
SYS.COM
And, these three are hidden:
EBD.SYS
IO.SYS
MSDOS.SYS

And, I have enough storage space to copy qb.exe, plus a few more things, which allow me to run qb and .bas programs, as well as .bas programs compiled with qb into .exe files. AT LONG LAST, I CAN SEE THE GRAPHICS!

So, I now have a simple solution.
1. Put my new DOS disk in the a:\ drive.
2. Restart my computer
It now boots up in DOS, using the a:\ drive, and stays in DOS, so I can run the graphics files as in yore!

I think this is going to e my permanent solution!
Ralph. Running QuickBASIC Version 4.5, Windows XP Home Edition, Version 2002, Service Pack 2, and HP LaserJet 4L printer.

Dr_Davenstein
QBasic God
Posts:166
Joined:Tue Mar 25, 2003 12:45 am
Location:U.S.A.
Contact:

Post by Dr_Davenstein » Fri Jun 24, 2005 6:50 am

d**n! Mine doesn't even have a floppy drive. :lol:
Come check out [url=http://www.freebasic.net/forum/index.php]FreeBASIC[/url]. The syntax is based on QuickBasic, but it expands to use pointers, operator overloading, etc... The list goes on and on!

Ralph
QBasic God
Posts:134
Joined:Sat Nov 06, 2004 2:27 am
Location:Katy, Texas

Post by Ralph » Fri Jun 24, 2005 8:48 pm

When my last computer fried, I insisted on getting one with a 3 1/2" floppy, because I had a bunch of programs on 3 1/2". It did cost me a pretty penny, but, there you are... It does come with a DVD, R/W, TV program, and Windows XP Home Edition. Plus, for a two-year warranty, I had ato buy Norton virus protection! Anyway, I bought it, and, it is a nice computer, including an Intel 3 MZ Pentium.
Ralph. Running QuickBASIC Version 4.5, Windows XP Home Edition, Version 2002, Service Pack 2, and HP LaserJet 4L printer.

Post Reply