Marco van de Voort wrote:
- Drivers is the hardest unit of TV afaik. The old FPC FV drivers unit is already based on an earlier version by Leon De Boer (and therefore free). It doesn't contain assembler, and is fairly small.
How does it handle the screen? Using *curses? (That's what our portable CRT unit does.)
- TViews contains only two short assembler procedures. Firstthat and ForEach. I checked both, and think I can make pascal versions, except for one thing. Before calling the procedures that are parameters of these two (firstthat and foreach), the asm routine pushes the (%ebp) (which is afaik the ebp of the caller, to access the callers variables????). I don't know how to do that in pascal, but it is only one or two assembler statements)
GPC can handle this in Pascal. This is a feature of ISO 7185 Standard Pascal which Borland left out.
Just pass a local procedure as a parameter to `ForEach', and call it from there. GPC will ensure that the local procedure can access its parent's local variables.
Due to "clean room" issues (and to lack of time), I am preferring not to touch the units, but if someone wants to pascalize them I can give useful hints.
I didn't. I never had anything todo with TV beyond the interface level.
I again urge you to NOT to spent to much work on it.
On what?
Making FV platform independant has been done before by FPC, and it would be double work. I'm sure there is a solution without too much ugly code. I don't know how far the assembler can be eliminated, but a lot of assembler
This sentence is not
With GPC, you can eliminate _100%_ of the assembler code and write everything in Pascal. The worst thing which can happen is that we need C wrappers in order to use some system libraries in a portable way. (This is necessary as long as we do not have a c2p translator with 100% automatic translation.)
Peter