Sign in Join

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

Mailing lists / fpc-pascal / 2002-05

Porting a TP DOS application with ASM module

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

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

Trevor Jenkins

I have inherited an old MS-DOS application written in Turbo Pascal and Assembler. Clearly the TP code could be processed by FPC but how do I deal with the assembler module? This is a separate file and I presume was written with TASM. Defines lots of external functions/procedures.

However, as part of my inheritance I want now to move this application to Linux so I will probably have to hack the assembler about. Much of the assembler code messes with hardware issues such as keybopard interupts and accessing video memory; neither of which Linux will like me doing. A similar brief exists to get this code working with Microsoft Windows NT4/2000 so the rewritten assembler module needs to be re-usable.

The original application was written by someone else and much as I would not have done it that way it is essential that, at least for a while, I use as much of the same (TP) code as possible.

Regards, Trevor

British Sign Language is not inarticulate handwaving; it's a living language. Support the campaign for formal recognition by the British government now! Details at http://www.fdp.org.uk/

< Re: deemed!
Thierry Cabuzel
to Trevor Jenkins
Show quoted text 13 lines
-----Message d'origine----- De : la part de Trevor Jenkins Envoyé : vendredi 3 mai 2002 23:25 À : Objet : [fpc-pascal]Porting a TP DOS application with ASM module I have inherited an old MS-DOS application written in Turbo Pascal and Assembler. Clearly the TP code could be processed by FPC but how do I deal with the assembler module? This is a separate file and I presume was written with TASM. Defines lots of external functions/procedures.

To here, there is no big problem. You need to just rewrite the ASM Code to be 32 bit ASM Code, and not 16 bit ASM Code.

Show quoted text 6 lines
However, as part of my inheritance I want now to move this application to Linux so I will probably have to hack the assembler about. Much of the assembler code messes with hardware issues such as keybopard interupts and accessing video memory; neither of which Linux will like me doing. A similar brief exists to get this code working with Microsoft Windows NT4/2000 so the rewritten assembler module needs to be re-usable.

Forget it NOW !!! Direct access to Interrupt, video memory, etc... is good for DOS where your program is the only one to run. But under Windows and Linux, let the OS do it and use the OS I/O funtions for that. Try to change this ASM mess to something more portable like SDL. But I see a lot of hard work to do it.

Show quoted text 5 lines
The original application was written by someone else and much as I would not have done it that way it is essential that, at least for a while, I use as much of the same (TP) code as possible. Regards, Trevor

Regards, Thierry