FPC: Porting assembly from BP 7.0 
Author Message
 FPC: Porting assembly from BP 7.0


Who can help me to converting inline assembly code from BP7 to FPC


Sat, 19 Jul 2003 05:52:30 GMT  
 FPC: Porting assembly from BP 7.0

> Hi,

> Who can help me to converting inline assembly code from BP7 to FPC

A better solution is to re-write the code in Pascal, and then check for
bottlenecks, etc. Many of the reasons for writing inline assembly-language
disappear when compiling the code using a modern 32-bit compiler. If at a
later stage the performance is still too low, you can profile the code and
convert the critical parts to 32-bit inline assembly-language. (These parts
will not necessarily be the critical parts in the 16-bit version.) The pure
Pascal version can then be used as documentation for the mixed
Pascal/Assembly-language version.

If you insist on converting the 16-bit code to 32-bit, remember:

* Do not mess about with the segment registers
* Pointers are 32-bit, but fit into a single register (EAX, EBX etc.)
* Writing into the code segment is a no-no

Most of these violations are committed by 16-bit inline assembly-language.
As I said above, rewriting the 16-bit code in 32-bit assembly-language is
usually simply not worth the effort.

Daniel Pfeffer

Fri, 25 Jul 2003 01:00:59 GMT  
 [ 3 post ] 

 Relevant Pages 

1. FPC: Porting inline assembly from BP 7.0

2. Porting BP/TP 7.0 programs to Windows 3.X/95/NT

3. Help in porting from TP to FPC...

4. help in porting from TP to FPC...

5. FPC asm : Porting Code from BP7

6. BP 7.0 and BP 7.1

7. Difference between BP 7.0 / BP 7.1 ?

8. Porting BP 7 code(Dos) to W 95

9. Porting Turbo Pascal 3.0 code to 7.0

10. HELP!! TP 6.0/7.0 and Assembly

11. Translation of OWL for BP 7.0 to 32 bit

12. BP 7.0 problems.


Powered by phpBB® Forum Software