(I'm CC'ing this to Pierre, the fpc core group member busy with FV atm.
Pierre: GPC also got Leon's code, and I'm maling with them to examine the possibility of a joint GPC/FPC FV, this to be able to propagate bugfixes between both teams.) )
[...] The sticking point now is a number of the base units (drivers.pas, dialogs.pas and views.pas), which contain some assembler code. Some of these are in x86 assembler and some (determined by some IFDEFs) are in FPC assembler (which looks to me like the AT&T syntax). Since I understand neither of these, I can't proceed with the porting.
All of these assembler parts can be ported to GPC using pure Pascal without a single byte of asm code. I have done this for BP's TV.
Dr A Olowofoyeku sent me the code. He asked me to look at tview,drivers and dialogs, views and drivers
- Dialogs however doesn't seem to contain assembler (but it imports drivers, maybe that confused him) - 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. The problem code however, is more or less stuffed away in the FPC api (which is for download in the development section of I'll sent it to Dr A Olowofoyeku for study (the API is on the FPC website), but please don't distribute it further until you get clearence from Pierre that it is in fact not contaminated with TP code (which I can hardly believe btw) - 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)
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. 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
Marco van de Voort (MarcoV@Stack.nl) http://www.stack.nl/~marcov/xtdlib.htm