13.07.2015 Views

apple-pascal-1.3-manual

apple-pascal-1.3-manual

apple-pascal-1.3-manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

o Use MARK and RELEASE to optimize usage of the memory spaceallocated for dynamic variables. [128K DATA]o Use repetition statements and recursive techniques where appropriate,instead of linear routines. [128K CODE]o Use IF statements instead of CASE statements if the ordinal values of theCASE selectors are widely spread. [128K CODE]o Make similar program sequences into procedures or functions, wherepossible. [128K CODE]o Specify SEGMENT procedures and functions. [128K CODE]o Use the j$I-f and j$R-f Compiler options to reduce code size (at theexpense of decreasing automatic error checking). [128K CODE]o Use the Compiler options j$N+J and j$Rf to keep segments out ofmemory until needed. [128K CODE]Using Operating=System MemoryWhen you start up Apple Pascal, all the Pascal operating system code isloaded into memory. However, Apple Pascal provides techniques by whichyou can keep some of the operating system code out of memory, therebyincreasing the memory space available for user code and data. There aretwo ways you can accomplish such operating-system swapping:o By executing the Swap command from the Pascal Command level beforerunning your program. This process is described in Part II of this <strong>manual</strong>,Chapter 2.o By using the CHAINSTUFF procedures SWAPON and SWAPGPON.These are described in Chapter 16 under "Program Chaining."The results in both cases are the same. You liberate memory space thatwould otherwise contain operating system code. In the 64K system itbecomes available for data, 6502 code, or P-code. In the 128K system itbecomes available only for P-code.The cost of operating-system swapping is that certain program operationsbecome slower, because when they are called the required operating systemExecuting Large ProgramsIII-247

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!