Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2007-01

an old Turbo-Pascal source

5 messages · 5 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Friedrich Hattendorf

using among others

- ^Screen (from unit Dos)
- unit GRAPH

(I think, we then had written it with TP4)

is there any chance to compile the source with FreePascal?

Where may I find the information, how to convert?

Friedrich

Daniël Mantione
to Friedrich Hattendorf

Op Wed, 3 Jan 2007, schreef Friedrich Hattendorf:

Show quoted text 8 lines
using among others - ^Screen (from unit Dos) - unit GRAPH (I think, we then had written it with TP4) is there any chance to compile the source with FreePascal?

It depends on the amount of assembler in it. If it is pure Pascal, there is a very good chance. Some minor modification might be necessary.

Where may I find the information, how to convert?

http://www.freepascal.org/port.var

... and the official manuals.

Daniël

Florian Klaempfl
to Marco van de Voort
Show quoted text 6 lines
> using among others > > - ^Screen (from unit Dos) This indicates direct access of the textmode screen, which is not a good sign?

This works on go32v2?

Jason P Sage

Regarding porting the .^Screen references, if you know the format of how screen memory works.. you can allocate your own memory block and treat it like the screen and then make (usually need two) routines to move that data to the screen via a more FreePascal friendly method.

I say two routines - because I've done this kind of programming using another language call Synergy DiBoL as well as with FreePascal using the "video" unit. Which BTW is fairly portable to my knowledge.

The first main ROUTINE for moving the "screen mem data" through the video unit does a complete screen draw.

The other is kind of a dual purpose routine that allows writing to both simultaneously - that is - in mine I would have a basic call that allowed me to write a char to a specific cell on the screen and it would actually modify my own "screen" mem as well as use the video unit. This way a complete redraw still works.

Now admittedly - you will probably end up doing a lot of variations for this single char "core" routine - like to only change foreground color in a cell, or only background color - and maybe do advanced stuff like handle the blinky cursor thing, and allow writing entire strings etc.

I have an old lib online called SageAPI3 or something - but its for freepascal 1.0.9 I think or something and I have newer 2.0.x code available here: http://www.jegas.org/?PAGE=main&SECTION=download

Its not documented - and is only a subset of what I'm working on but there is some neat code in there that might help ya.

Best Regards,

Jason P Sage

No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.432 / Virus Database: 268.16.3/614 - Release Date: 1/2/2007 2:58 PM