Pascal Programming/Miscellaneous

The last Pascal-related standards were published in 1990, ISO standard 7185 “[Standard] Pascal”, and ISO standard 10206 “Extended Pascal”. But ever since IT did not stop evolving. Several compiler manufacturers continued extending Pascal by miscellaneous extensions, some of which we are presenting here.

Inline assembly
Since TP version 1.0 there exists the possibility to include assembly language inside your Pascal source code. This is called inline assembly. While normal Pascal is surrounded by a  frame, assembly language can be framed by. Here is an example that can be compiled with the FPC: Writing inline assembly code is useful if you have special knowledge about data and the compiler generates inefficient code. You can try to optimize for speed or size in order mitigate performance bottlenecks.

All, Delphi, the FPC as well as the GPC support  frames, but each with a few subtle differences. We therefore refer to the compiler’s manuals, and not forgetting this book is about programming in Pascal.