Solved On xp machine, trying to print from a turbo pascal 4 program

December 11, 2019 at 10:30:20
Specs: Windows XP PRO 5.1.2600 Service Pack 3 Build 2600
x86 Family 6 Model 23 Stepping 10 GenuineIntel ~2499 Mhz
BIOS Version/Date Intel Corp. PRG3110H.86A.0065.2009.0421.1559, 4/21/2009
Total Physical Memory 4,096.00 MB
Available Physical Memory 2.62 GB
Total Virtual Memory 2.00 GB
Available Virtual Memory 1.96 GB
OS Name Microsoft Windows XP Professional
Version 5.1.2600 Service Pack 3 Build 2600
OS Manufacturer Microsoft Corporation
System Name MRG-SERVER
System Manufacturer INTEL
System Model DG31PR

As output device, neither PRN nor LST nor LPT1 work. Most produce runtime errors.


See More: On xp machine, trying to print from a turbo pascal 4 program

Report •

#1
December 11, 2019 at 11:03:20
Are you trying to print to a network or USB printer?

"Channeling the spirit of jboy..."


Report •

#2
December 11, 2019 at 14:03:11
Local printer. MS-WORD, EXCEL, PHOTOED print ok. It's an HP 2514. The plug going in
is three-pronged (USB, yes?). I even used TP4's PRINTER.TPL and tried writing to
"Lst". If I watch as I print, no job shows up in the queue.

It's not the end of the world. I can print to a text file and then print with WORD, but
it would be nice to print directly from the program.

Thanks so much for getting back to me.

Dale Armour


Report •

#3
December 11, 2019 at 14:28:36
✔ Best Answer
Is this the 'turbo pascal 4' released in 1987? If so there will be no USB support. Pascal will want an old fashioned serial or parallel printer connected to the lpt1 port. Also with those old dos programs you had to set up the printer within the software--you couldn't just connect one to the computer and have it work right.

Report •

Related Solutions

#4
December 11, 2019 at 14:38:40
My first answer about the printer was stupid. That was the power cord. The data input is a square little USB.

Again, PRN, LPT1 .. LPT3 (with or without colons) and unit PRINTER.TPU's Lst produced nothing in the queue, sometimes a Pascal runtime error.


Report •

#5
December 11, 2019 at 14:51:53
Yup, inside TURBO.EXE is "Copyright 1987". Do you think there is a way I could use
TP's exec command to use net services to get the job done?

Thanks for your reply.

Dale Armour


Report •

#6
December 11, 2019 at 17:14:15
I don't know enough to speculate on whether you can adapt it. Even running it in XP's command prompt would leave you with the printer recognition problem. Newer versions of Borland's turbo pascal seemed to offer support only up to windows 3.1, which wouldn't offer USB support either. They've gone on to Delphi which may be the closest Borland product that will work with XP. Another option would be Free Pascal:

https://free-pascal.informer.com/

If 'free' is used generically then there may be other downloads. Here's a 'Free Pascal for Windows XP"

https://allxpsoft.com/free-pascal-w...

There are multiple download links on those pages, only one of which is the actual product download. The others are ads and/or junk


Report •

#7
December 12, 2019 at 22:22:29
Hey, thanks! I'll look into it.

Meanwhile ... I have been able to write the data to a file, and then
exec('NOTEPAD.EXE,Outfile) and then print from NOTEPAD.

So, some success.
Thanks again,
Dale Armour


Report •

#8
December 12, 2019 at 22:58:59
You're welcome.

I think the easiest thing to do is to upgrade to a version of pascal that will run on XP. Other options are to install dos on a separate partition or drive or use software like DOSBox that simulates a dos environment within windows. But in each of those I think you'd still need to find a older printer that turbo pascal 4 will accept.


Report •

#9
December 13, 2019 at 09:59:23
An even better, simple solution to print from within TP4 to the default local printer.

exec('C:\WINDOWS\system32\notepad.exe',' /P '+Filename);

Works great.

Thanks everyone, for your knowledge and suggestions.

Dale Armour


Report •

Ask Question