Next: , Previous: Qualified identifiers, Up: BP Incompatibilities



7.2.3 Assembler

GPC's inline assembler is not compatible to BP's. It uses AT&T syntax, supports a large variety of processors and works together with GPC's optimizer. So, either convert your inline assembly to AT&T syntax, or (usually better) to Pascal, or put it into an external file which you can assemble with your favourite (32 bit) assembler. A tutorial for using the GPC inline assembler is available at
http://www.gnu-pascal.de/contrib/misc/gpcasm.zip

Since many things you usually do with assembler in BP are provided by GPC's Run Time System (RTS), you will not need the inline assembler as often as in BP. (See Portability hints.)

The same applies to BP's inline directive for hand-written machine code. GPC's inline directive works for Pascal routines (see Miscellaneous), so you'll have to convert any hand-written machine code to Pascal (and thereby make it more readable, portable and easier to maintain while still getting the performance of inline code).