Tag archive for "optimization"

Turbo Pascal uses “smart” linker which eleminates code and variables that are never referenced. This reduces code size and memory usage. First all symbol table blocks in all modules that reference variables, typed constants and code blocks are marked as unused. Finally, the main program block is marked as referenced since it will be executed …

Turbo Pascal tries to convert all near jumps to short. This is only possible if jump displacement can be stored in a byte. This procedure is called just before the target code is generated. Since all changes reduce code size and therefore provide new opportunities for optimizations, the function is called in a loop until …