VOGONS

Common searches


glorious qb87 on dosbox

Topic actions

First post, by dcouzin

User metadata
Rank Newbie
Rank
Newbie

From the English language Wikipedia article on DOSBox you'd think that DOSBox was for games while vDos was "for the running the more 'serious' DOS apps (not games)". Nevertheless the author of vDos just informed me that one needs DOSBox to run QB87.exe (because vDos doesn't support the low level Int 9 keyboard interrupt). I don't know what those words mean, since I'm a physical scientist. QB87 is the 1987 flavor of QuickBASIC that I've used since 1993 to write programs. It's the most 'serious' DOS app I know.

So I'm surprised that 'QB87' doesn't get a single hit in a search of this forum. I'm looking for confirmation that QB87 runs well under DOSBox, and for hints on getting it running.

QB87 was running well enough, and very fast, under the NTVDM included with 32-bit Windows 10. Now I've graduated to 64-bit Windows 10 and there's no NTVDM. I can't function professionally without QB87. My choices seem to be: 1. keep an old 32 bit Windows computer running; 2. make the new computer dual boot into 64- and 32-bit Windows; 3. find a DOS emulator for QB87. The 3rd choice seems the most elegant.

All advice appreciated.

DC

Reply 1 of 27, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

just try it. Follow the normal guide and try

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 2 of 27, by keenmaster486

User metadata
Rank l33t
Rank
l33t

I assume you mean Quick Basic version 3.00, since that's the one I know of that has QB87.EXE and was released in 1987.

What is your objection to running QB 4.5 (the last home market QB version), or PDS 7.1 (which is the same as QB 4.5 but with an improved IDE, slightly more efficient compiler, and some advanced keywords and memory options)? Or perhaps FreeBasic, which has an option to mimic almost perfectly the QB language syntax, and also runs cross-platform including DOS, Windows, and Linux, and has a good IDE in FBIDE?

In any case, I know that QB 4.5 and PDS 7.1 run perfectly in DOSBox, as I've developed large programs using that method. But at some point (for DOS development, that is) I moved over to writing my code in FBIDE on Windows or Linux, and then using the FBDOS (FreeBasic) compiler in DOSBox to compile and run for DOS. This way I can compile for either Windows/Linux or DOS in a few keystrokes, and develop cross-platform simultaneously.

World's foremost 486 enjoyer.

Reply 3 of 27, by dcouzin

User metadata
Rank Newbie
Rank
Newbie
keenmaster486 wrote:

I assume you mean Quick Basic version 3.00, since that's the one I know of that has QB87.EXE and was released in 1987.

To Keenmaster486: You're right, it's QuickBASIC version 3.00. I don't remember why, in 1993, our IT person gave me that 1987 version rather than the 1988 version 4.5, but I can still hear his words "compile, ellipsis". You'd expect an IT person to say "compile, dot-dot-dot". Anyhow, this refers to the menu for setting the compile options, such as whether to optimize for speed vs. size. Peeking at version 4.5, I find no menu for setting the compile options. They're not important for my programs anyhow.

Version 3.00 is certainly prettier, less tacky, than version 4.5, as this pair of screen shots shows:
at7fvb68mrp469v4g.jpg

It's great that you've had full success running version 4.5 in DOSBox. So version 3.00 might work there too, and otherwise what's a little dropshadow, ellipsis?

Thanks much.

Reply 4 of 27, by dcouzin

User metadata
Rank Newbie
Rank
Newbie

Thank you Dominus, thank you keenmaster486:
QB87 installed easily by following the friendly instructions at qbasic.net/en/qbasic-tutorials/dosbox/.
It runs, it calculates, unfortunately much too slowly for my engineering work.
I think I set DOSBox to maximum speed with cycles=max. Yet my programs run about 35× faster with NTVDM on an old 2 GHz CPU machine than with DOSBox on a new 1.6 GHz CPU machine.
Why-oh-why is DOSBox so much slower than NTVDM?

DC

Last edited by dcouzin on 2018-12-15, 03:39. Edited 1 time in total.

Reply 5 of 27, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

DOSBOX is always slower because it is an emulator and emulates a Dos machine. NTVDM doesn't have to do that.
But that it is so slow is odd indeed

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 7 of 27, by doaks80

User metadata
Rank Member
Rank
Member

32 bit Windows inside VirtualBox running NTVDM?

k6-3+ 400 / s3 virge DX+voodoo1 / awe32(32mb)
via c3 866 / s3 savage4+voodoo2 sli / audigy1+awe64(8mb)
athlon xp 3200+ / voodoo5 5500 / diamond mx300
pentium4 3400 / geforce fx5950U / audigy2 ZS
core2duo E8500 / radeon HD5850 / x-fi titanium

Reply 8 of 27, by keenmaster486

User metadata
Rank l33t
Rank
l33t

DOSBox will be much, much slower than NTVDM.

In the Pentium 4 era, before I found out about DOSBox, I used NTVDM for everything. Quick Basic games I was writing would run so fast that I would have to put in massive timing loops just to make them run at a normal speed. I'm pretty sure it was almost the same speed as running native DOS on the same machine.

DOSBox, since it emulates the speed of about a Pentium or Pentium II at best, and a 386 or 486 under normal settings, will run things much slower but period-correct.

If you want massive speed, try installing DOS in a virtual machine, perhaps in VirtualBox. The advantage of installing Windows XP in your virtual machine and using NTVDM, though, would be that you could share files back and forth between host and guest.

DOSBox is easiest because you can just mount a folder on your hard drive instead of having to deal with virtual disks and virtual network drives.

World's foremost 486 enjoyer.

Reply 9 of 27, by dcouzin

User metadata
Rank Newbie
Rank
Newbie
Qbix wrote:

be sure to set core to dynamic as well.

Qbix: yes, core=dynamic made a big difference. Now comparing the DOSBox emulation on a 2 GHz CPU machine to NTVDM on a 1.6 GHz CPU machine, the latter is only about 13× faster. DOSBox is user friendly and fun, but since my BASIC programs are calculationally heavy, sometimes taking overnight to run, I can't afford such slow emulation.

Compiled QuickBASIC is actually right for these programs. When a colleague transformed one into Visual Basic it ran no faster. (This for single core CPU machines.)

Sigh!
DC

Last edited by dcouzin on 2018-12-15, 03:37. Edited 1 time in total.

Reply 10 of 27, by dcouzin

User metadata
Rank Newbie
Rank
Newbie
keenmaster486 wrote:

... If you want massive speed, try installing DOS in a virtual machine, perhaps in VirtualBox. The advantage of installing Windows XP in your virtual machine and using NTVDM, though, would be that you could share files back and forth between host and guest. ...

keenmaster486: this gives me a new choice #3: virtual machine. I'm familiar with multi-booting, from using a Mac, where it's simple. It's supposedly gotten simple with Windows computers too. Once booted into the 32-bit Windows partition, which could contain NTVDM, Excel, and little else, QuickBASIC would have easy access to a data partition. There is that advantage over running the DOS programs in a separate machine. There's the disadvantage that you're locked out of your personal 64-bit Windows partition. Are you any less "stuck in the workplace" when using a virtual machine?
Thanks,
DC

Last edited by dcouzin on 2018-12-15, 03:36. Edited 1 time in total.

Reply 11 of 27, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

If your program needs fullscreen support then the highest Windows you'll be able to run is Windows 7 32bit with XP video drivers or with the video card disabled. If it doesn't need fullscreen support then Windows 10 32bit should work. To access your data you can drag and drop between host and guest (If using Vmware) or share the folder where your data resides over the network or you can shut the VM down and mount the VM hard drive file with various programs.

I believe there are NTVDM alternativews for 64bit Windows but IIRC they are console only but I haven't checked them out recently. A long time ago solvbe rendered NTVDM programs to OpenGL but no one has bothered since due to emulation and virtualization taking over.

If you want to go the Linux only route then you can try dosemu2 (uses the host processor and I think you need a 32bit Linux Distro?) or ReactOS NTVDM (can't remember if that emulates the CPU or not).

How To Ask Questions The Smart Way
Make your games work offline

Reply 12 of 27, by dcouzin

User metadata
Rank Newbie
Rank
Newbie
DosFreak wrote:

If your program ... doesn't need fullscreen support then Windows 10 32bit should work. ...

DosFreak: Windows 10 32-bit NTVDM works beautifully for my programs. Sound fails, but I don't need it.

My adventure with QB87 began on Windows 3.1. I believe 3.1 had a genuine DOS mode, but later Windows had NTVDM, which was efficient and made good use of increasing CPU power. It's horrible that Microsoft abandoned NTVDM for their 64-bit systems. I assume that the 32-bit NTVDM used just one core. To write a new NTVDM for newer multi-core processors would have taken some work.

Did the NTVDM64 project peter out in 2014? I'll look into VirtualBox and its DOS possibilities.

Thanks,
DC

Reply 13 of 27, by keenmaster486

User metadata
Rank l33t
Rank
l33t

Be aware, ReactOS NTVDM is just a modified version of DOSBox.

Another option could be to create a small FAT32 partition, with bootable DOS, on your hard drive alongside your Windows partition. Then you could put all your QB programs on that partition, and boot using it whenever you need to run Quick Basic. It wouldn't be able to access the NTFS partition but Windows would be able to see the DOS partition.

World's foremost 486 enjoyer.

Reply 14 of 27, by dcouzin

User metadata
Rank Newbie
Rank
Newbie
keenmaster486 wrote:

Be aware, ReactOS NTVDM is just a modified version of DOSBox.

Thank you for that warning. I did another speed-test on a QB87 compiled program more typical of my work than the previous test program was. Running time in DOSBox was 19.4× running time with NTVDM. (The former runs in Win 10 64-bit on a modern 1.6 GHz CPU machine; the latter runs in Win 10 32-bit on an old 2.0 GHz CPU machine. Assuming that being multi-core does not advantage the modern machine, it's really a 15.5× speed advantage.) Yet I find that having QB87 in DOSBox has some use. I have smaller QB87 programs too, to solve smaller problems. They might take a tenth of a second -- like no time -- to run on the old machine. It's no problem if they take 2 seconds on the new machine.

keenmaster486 wrote:

Another option could be to create a small FAT32 partition, with bootable DOS, on your hard drive alongside your Windows partition. Then you could put all your QB programs on that partition, and boot using it whenever you need to run Quick Basic. It wouldn't be able to access the NTFS partition but Windows would be able to see the DOS partition.

I have enough room on my SSD to create a 30 GB or 40 GB partition with bootable Windows 32-bit that runs QB87 in NTVDM. That partition could include Excel too, which I use to massage the data generated by QB87, and then modify the program, again and again. Also the partition could hold some pleasures, like internet, to occupy me during the long runs. However, are you implying that a FAT32 partition with bootable DOS would run QB87 noticeably faster than NTVDM under Windows does? Has anyone compared NTVDM speeds to pure DOS speeds?

DC

Last edited by dcouzin on 2018-12-17, 02:04. Edited 1 time in total.

Reply 15 of 27, by keenmaster486

User metadata
Rank l33t
Rank
l33t

Pretty sure pure DOS would be at least a little bit faster than NTVDM.

I might again mention the possibility of using FreeBasic, which has compilers for both DOS and Windows, a very good IDE, and the option to be almost 100% syntax-compatible with Quick Basic. It also, by my tests in DOS, creates executables that are some 20 or 30 times faster than their QB counterparts. No joke, it's very efficient.

World's foremost 486 enjoyer.

Reply 16 of 27, by dcouzin

User metadata
Rank Newbie
Rank
Newbie
keenmaster486 wrote:

...I might again mention the possibility of using FreeBasic, which has compilers for both DOS and Windows, a very good IDE, and the option to be almost 100% syntax-compatible with Quick Basic. It also, by my tests in DOS, creates executables that are some 20 or 30 times faster than their QB counterparts. No joke, it's very efficient.

keenmaster486: WOW, your FreeBASIC suggestion opens a universe of new possibilities.
The newbie naturally wanted the compiler and IDE integrated, and running under Windows. Paul Squires has offered up a WinFBE Suite v.1.8.7 including the FreeBASIC-1.06.0 compiler and his WinFBE64 IDE at github.com/PaulSquires/WinFBE/releases. By simply entering '-lang qb' in the IDE's compiler options, I could run my little QB87-coded, trig-function-based speed test, and it ran 4.5× faster than QB87 ever ran it!

Comparative speeds for that test program:
QB87 running in DOSBox in Windows on my new computer: speed = 1
QB87 running in NTDVM in Windows on my old computer: speed = 13
FreeBASIC running in Windows on my new computer: speed = 58

The FreeBASIC is using just 10% of CPU on the new computer so apparently not utilizing multiple cores. Perhaps with fiddling in the compiler options it would. New computer has 1.6 GHz CPU; old computer has 2.0 GHz CPU. I should try FreeBASIC on the old computer, which has 1 core, and see.

Now the big question is whether the option '-lang qb' will encompass the spaghetti code of my larger QB87 programs. Fingers crossed.

Thanks much,
DC

Last edited by dcouzin on 2018-12-18, 21:28. Edited 1 time in total.

Reply 17 of 27, by dcouzin

User metadata
Rank Newbie
Rank
Newbie

The FreeBASIC compiler balked at just one thing in my big QB87 program. QuickBASIC allows use of real variable 'X' even if array variable 'X()' is used too. Why not? Well, FreeBASIC isn't so free about syntax. With that changed, FreeBASIC executed the program marvelously fast. Comparative speeds for this most relevant program:

  • QB87 running in DOSBox in Windows on my old computer: speed = 1
    QB87 running in DOSBox in Windows on my new computer: speed = 3.1
    QB87 running in NTDVM in Windows on my old computer: speed = 84
    FreeBASIC running in Windows on my old computer: speed = 425
    FreeBASIC running in Windows on my new computer: speed = 1150

On the same old computer FreeBASIC runs the program 5× faster than QB87 in NTDVM does, 425× faster than QB87 in DOSBox does.
On the same new computer FreeBASIC runs the program 370× faster than QB87 in DOSBox does.

FreeBASIC, and QB87 running in DOSBox, each run about 3× faster on the new computer than on the old one.

Caution: all these trials were run with little experience of either FreeBASIC or DOSBox.

During this week on this forum I came to see that DOSBox runs QuickBASIC compilations seriously slowly. A virtual machine, like NTVDM, runs them much faster. However if one has the QuickBASIC source code, and is able to make small syntax modifications, FreeBASIC compilations run circles around QuickBASIC ones (which need NTVDM and BRUN3087). With FreeBASIC I'm running my old programs 14× faster than I ran them before, and probably about 5× faster than had I pursued the dual boot or VirtualBox options. QB87 is pretty, as the posted screen shot shows, but not glorious.

Great thanks to keenmaster486 who guided me here.

DC

Reply 19 of 27, by dcouzin

User metadata
Rank Newbie
Rank
Newbie

keenmaster486: I was lucky to find the FreeBASIC suite whole, in order figure out how to make it go.
Have you heard of QB64? Its IDE looks much like QB4.5's (which I earlier poo-pooed). It's more tolerant of QuickBASIC syntax than FreeBASIC's '-lang qb' is. So far, it's accepted all my code. However its compilations (of my code) run 2.5× slower than FreeBASIC's.
QB64 is truly retro, while FreeBASIC, seeing itself as corrective to QuickBASIC, and having a future, begrudges the '-lang qb' option.

DC