visitor (0 QPoints)
  • FR
  • EN
  • NL
  • DE
  • ES
315 experts, 1193 registered users, 1659 questions already answered
European Experts Exchange, the very best site for high-quality IT solutions

New Improved Search!

 


05/10/2011 1h30 : Steve Jobs is dead, the father of Apple ][ is gone, we are all orphaned.

Languages :: Pascal :: WinCRT Output using Turbo Pascal for Windows 1.5


By: MikeTucker U.S.A.  Date: 01/04/2003 00:00:00  English  Points: 75 Status: Answered
Quality : Excellent
I am trying to port to Turbo Pascal for Windows 1.5 a fairly large program that was originally written in Turbo Pascal for DOS. I need to do either colored characters or reverse video. I have been using the WinCRT unit to provide a 25 row by 80 column window. This works fine, but I can't get color or reverse video to work... I HAVE been able to get color to work using the SetTextColor procedure (using TextOut and pixel cursor addressing), but it doesn't work with the Write and Writeln (using 25 lines by 80 column cursor addressing) to the CRT. HELP!!???
By: VGR Date: 02/04/2003 03:44:00 English  Type : Comment
yes, because I'm afraid this inverse video worked with the old video units of TP accessing the video card directly. Apparently, there was no such support in TPW 1.5 and since then. AFAIK. I did the same work as you do, some years ago.

For the text color, either TextColor still works, or you've to use Pen.Color (this is basic Win API so it should be available in TPW 1.5)

I also strongly suggest you pass directly to Delphi 1 or 2
By: MikeTucker Date: 02/04/2003 15:50:00 English  Type : Comment
Yes, TextColor and BkColor will work, but display indexing is not on the 80 column by 25 line virtual CRT screen provided by the WinCRT unit. You must use cursor addressing based on the "pixel" addresses (I think). It may be possible to convert all 80 x 25 character addresses into pixel addresses?

I'm not familiar with Delphi...does it support TPW source code, or is a completely different language?

Thanks!
By: MannSoft Date: 03/04/2003 00:56:00 English  Type : Comment
Delphi is what Borland dropped Turbo Pascal for. It is essentially just Object Pascal.

It doesnt support TPW files since they are compiled units, but it'll work with a good majority of your old Turbo Pascal code, so long as it isnt DOS specific. I ported all my old stuff, and havent used Turbo Pascal in a long time.
By: VGR Date: 06/04/2003 04:31:00 English  Type : Answer
delphi DOES support TPW 1.5 "source files", because :
they either are Pascal (Turbo dialect, ie the core of Delphi), or they contain Win API calls, still available in Delphi even if usually people use the Borland "wrapper units"

IMHO, it should even compile and run without any modification.

T-Pascal for DOS is ano other story, for the reasons explained before (Int, Dos, Crt, etc are to be emulated on Windows - I did this partially)

Do register to be able to answer

EContact
browser fav
page generated in 339.876890 milliseconds

Why Google AdSense ads ?

compteur
 Ranking-Hits PageRank for this page