Recent

Author Topic: Trying to port an old turbo pascal software  (Read 4585 times)

cpiga

  • Newbie
  • Posts: 2
Trying to port an old turbo pascal software
« on: February 17, 2017, 12:56:22 pm »
Hello, I have an old turbo pascal compiled software that run only on 16bit dos platform. I have also the source code and I'm trying to recompile it to run on 32bit platform. The problem is that I have one unit in tpu format. The name is win.tpu. There is some free pascal equivalent to this unit? There is some utility that i can use to reverse enigneer this binary unit to rewrite it in free pascal? There is no way to understand what this unit do?
Thanks
Carlo

derek.john.evans

  • Guest
Re: Trying to port an old turbo pascal software
« Reply #1 on: February 17, 2017, 01:09:54 pm »
Mmmm, Windows?

cpiga

  • Newbie
  • Posts: 2
Re: Trying to port an old turbo pascal software
« Reply #2 on: February 17, 2017, 01:24:30 pm »
The idea is to run the application in a dos console window. Actually it run in a freedos virtual machine. It is a purelly dos software.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11458
  • FPC developer.
Re: Trying to port an old turbo pascal software
« Reply #3 on: February 17, 2017, 01:30:48 pm »
No, tpu's are worthless with FPC and can't be converted or used in any way on any of FPC's supported targets.

sky_khan

  • Guest
Re: Trying to port an old turbo pascal software
« Reply #4 on: February 17, 2017, 02:22:55 pm »
Did you try removing it from uses list where it is used ? Try it and you will  have an idea what is missing if there is any.
« Last Edit: February 17, 2017, 02:25:05 pm by SkyKhan »

Bart

  • Hero Member
  • *****
  • Posts: 5290
    • Bart en Mariska's Webstek
Re: Trying to port an old turbo pascal software
« Reply #5 on: February 17, 2017, 04:48:35 pm »
The problem is that I have one unit in tpu format. The name is win.tpu.

This unit (delivered with TP 6.0 and maybe also with later versions) was never available with sourcecode, IIRC there was a TPU and an OBJ file.

Almost all my DOS programs used it.
It had very nice routines for saving and resoring screens and fast writing of strings to the screen (faster than crt unit).

I still have a collection of old TP programs, but the lack of the win unit makes it difficult to port them tp fpc.

Bart

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11458
  • FPC developer.
Re: Trying to port an old turbo pascal software
« Reply #6 on: February 17, 2017, 06:45:39 pm »
Well that sounds like the video unit then,but with a bit crt functionality on top of it.

Was the win unit a separate textwindow unit, or a int 2F win 3.x console interface? (IOW does it work in plain dos ?)

Bart

  • Hero Member
  • *****
  • Posts: 5290
    • Bart en Mariska's Webstek
Re: Trying to port an old turbo pascal software
« Reply #7 on: February 17, 2017, 11:21:51 pm »
Was the win unit a separate textwindow unit, or a int 2F win 3.x console interface? (IOW does it work in plain dos ?)

It works in plain DOS.
It re-implemented some crt routines.
It had procedures called
  • FrameWin
  • ReadWin
  • WriteWin
  • WriteChar
  • WriteStr
  • SaveWin
  • RestoreWin

I.e. WriteStr would let you write a string of 80 chars starting at X=1 and it would not cause the cursor to go to the next line.
IIRC the entire implementation was done in TASM and linked via the WIN.OBJ file.
The routines were extremely fast, especially on older hardware.

If I'm not mistaken then TV made extensive use of this unit.

Bart

molly

  • Hero Member
  • *****
  • Posts: 2330
Re: Trying to port an old turbo pascal software
« Reply #8 on: February 17, 2017, 11:49:10 pm »
I was unable to find me my TP version that ships with unit win but, i was able to find this.

So, basically a crt implementation on steroids with some additional routines ?

In which case: isn't there already something like that available for FPC ? (perhaps something not being fully cross-platform though).

 

TinyPortal © 2005-2018