Page 1 of 3
DOSBox 0.63, BASIC, QuickBASIC 4.5 and Windows XP
Posted: Thu Dec 30, 2004 5:19 am
by Ralph
Dr_Davenstein, I decided to start a new thread here, with the DOSBox.exe subject, to try to help others that are having problems with running the Subject type of programs with Windows XP.
I went to the site you recommended, namely,
http://prdownloads.sourceforge.net/dosb ... irror=kent
downloaded DOSBox.exe, Version 0.63, and am very happy with it. It loads very nicely and works very well indeed.
Of course, it isn't "perfect", even though it nearly is! About the only problem I have encountered in its use so far is that I don't seem to be able to use my old "quick-keys" methods for highlighting (Shift+Arrow), or for cutting, copying and pasting (Shift+Delete, Ctrl+Insert, and Shift+Insert). To carry out these functions, I must select by using the cursor, then use the Main Menu's File, Cut, Copy and Paste, all of which slow me down considerably. Is there any hope that the quick-keys will be implemented in the near future?
I hope that this post will be of great help to those of you with Windows XP and BASIC-type graphics programs.
Posted: Thu Dec 30, 2004 6:44 am
by Buff1
Is this "DosBox" from Perfect Sync ?
If it is, their current version is at 1.11
I have Console Tools, Graphics Tools from them and they are quite good
plus they work closely with PowerBasic.
Posted: Thu Dec 30, 2004 9:12 pm
by Ralph
No, Buff1, as you can see from my original post, it was not downloaded from Perfect Sync. Furthermore, I indicated that what I downloaded is DOSBox Version 0.63.
Now, in using it, besides the quick-key methods that I cannot use, I just found out that the LPRINT command apparently doesn't connect with my default printer, but, while I'm in Microsoft Word 97, operating under Windows XP, I have no trouble.
Dos Perfect Sync's version 1.1 of DOSBox.exe take care of the above problems? If so, I'll be hurrying to download that version.
Regards,
Ralph
Posted: Fri Dec 31, 2004 12:36 am
by buff1
I've not really used P.S. DosBox except to see it a few years ago, so
can't say if it will fix the problems, however, DosPrint will allow you to
print to any printer. I use the windows version Dllprint.
Never used Lprint personally unless it was some sort of quick test of
something. Instead, always open printer as a file. That gives you access
to LPT1-3 in a MS-DOS environment.
Anyway, you can find links to Perfect Sync and to Lance's DosPrint
(Lance used to work for PowerBasic as a tech) at PowerBasic.com
Posted: Fri Dec 31, 2004 4:16 am
by Ralph
Buff1, I tried, in QuickBASIC running in the DOSBox environment:
OPEN "LPT1:" FOR OUTPUT AS #1, and it gave me, "Device unavailable"
LPRINT "TEST", and it gave me, "Device unavailable"
By the way, my HP LaserJet 4L is connected to LPT1:
Any other suggestsions? Maybae the good Dr will come to the rescue again?
Posted: Sat Jan 01, 2005 1:29 am
by buff1
If your printer is a "window-only" printer (bad choice) then the open statement might react that way, otherwise it should be ok.
open "LPT1:" for output as #1
print #1,"Hello"
print #1,chr$(12)
close #1
Posted: Sat Jan 01, 2005 1:31 am
by buff1
Also, be sure you have dos capture option set for that printer.
(mycomputer>printers)
Posted: Sat Jan 01, 2005 2:38 am
by Ralph
In your second-to-last post, you wrote this small program:
open "LPT1:" for output as #1
print #1,"Hello"
print #1,chr$(12)
close #1
and thought it should run fine. But, no, using stepping, at the first intent of running the first line, I get the "Device unavailable", so, that's that!
In you last post, you wrote:
buff1 wrote:Also, be sure you have dos capture option set for that printer.
(mycomputer>printers)
I don't understand your "dos capture option", as I am running under Windows XP. When I go to Control Panel, Printers and Faxes, I see my HP LaserJet 4L as the default printer.
I bought this printer new on 12/23/94 as my Christmas present to myself. It has worked fine with all the MS operating systems that I have had, of which I remember Windows 95 and 98. Recently, I bought a new computer, and it comes with Windows XP. I have no problem printing with MS Word and MS Excel, but I don't seem to be able to print wth QuickBASIC running in Windows XP, nor running in the DOSBox.exe Version .63 which I presently have. I'm seriously considering buying PowerBASIC, if I find that all the SCREEN and graphic functions, plus the LPRINT command, run seamlessly in that compiler.
To quote Gary Stout,
pwrbasc@warpnet.net,
pwrbasc@aol.com: "Since XP is NT based, I don't believe you have direct access to ports". Could this be the problem? I have also read of folks having trouble with QB programs that try to access some port or another, when running Windows XP.
Posted: Sat Jan 01, 2005 7:44 am
by buff1
Then either, it's a windows-only printer and the operating system is not
allowing a MS-DOS program to access it or
it is not located at 378.
Posted: Sat Jan 01, 2005 7:51 am
by buff1
There's another possibility if you are running a network.
There is a network command to redirect printer ports.
It's something like
NET LPT1 /SERVER/PRINTERS/HPLASER
where the /server/printers/hplaser is the network location of the printer.
but since im not running a network here, i havent used the command in
a while so my syntax may be off but you can search it out on the net.
Posted: Sat Jan 01, 2005 8:45 am
by Dr_Davenstein
You could probably send a print command to notepad... I'm not sure if that'll work right through DOS though.
Give me a sec...
Posted: Sat Jan 01, 2005 5:31 pm
by Ralph
buff1 wrote:Then either, it's a windows-only printer and the operating system is not
allowing a MS-DOS program to access it or
it is not located at 378.
Buff1, thank you for your suggestsions, but...
As to the printer being a "windows-only" printer, as I understand it, printers and all other periferals are what they are, and the manufacturer usually creates a series of programs, or "drivers", that act as "translators" between the operating system and the periferal. So, maybe my current drivers are Windows XP Home Edition based, and are not suitable for DOS?
As to the printer "not locaed at 378", well, I don't know what you mean. And, how does one go about finding out if it IS located at 378?
And, in your next post, you suggest that I am possibly running a network. No such luck, I am very straight-forward in my computer use. I have a computer, keyboard, monitor, loudspeakers and a mouse, not counting my printer.
Dr_Davenstein, I opened Notepad in Windows XP, wrote Test 2 on it, and did a File, Print, and I got the printout O.K. Then, I ran DOSBox, and entered the following three lines
mount c c:\windows
c:
Notepad
and got the message, "This program cannot be run in DOS mode". So, no luck with my current Notepad.exe Version 5.1.
Posted: Sun Jan 02, 2005 4:30 am
by buff1
378 is the traditional port address for LPT1
Start>Settings>control Panel>System>Device Manager Tab
Ports (Com and LPT) >Printer Port(LPT1)>properties>Resources>Input/Output Range
Should have 378-37F
Posted: Sun Jan 02, 2005 4:37 am
by buff1
If it's just text, you could print it through notepad.
open "somefile.txt" for output as #1
print #1,"Hello"
close #1
shell "Notepad somefile.txt"
Posted: Sun Jan 02, 2005 1:49 pm
by Ralph
Buff1, I got the result, from Device Manager: I/O 0378 037F, which is what you said it should be.
Next, I tried your program in QuickBASIC, running under DOSBox, and got the same answer as when I tried to run Notepad directly under DOSBox, "This program cannot be run in DOS mode".