13.07.2015 Views

apple-pascal-1.3-manual

apple-pascal-1.3-manual

apple-pascal-1.3-manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

All codefiles (linked and unlinked) consist of a segment dictionary inblock 0 of the codefile, followed by a sequence of one to 16 code segments.The host program is compiled into one code segment, and each SEGMENTprocedure, SEGMENT function, or Program Unit is translated intoanother code segment. The ordering of code segments in the codefile (fromlow disk address to high disk address) is determined by the order in whichthe Compiler encounters the executable code of each SEGMENT procedure,SEGMENT function, or Program Unit when compiling a program. This ordermay be changed by using the LIBRARY program described in Part II,Chapter 8.Each segment begins on a boundary between disk blocks (a block is 512contiguous 8-bit bytes). Any segment may occupy up to 64 blocks.SegmentsA segment is either a code segment or a data segment. Program code isstored in code segments. Every program consists of at least one codesegment, and some programs consist of many code segments. A codesegment may contain either P-code, 6502 code, or a combination of both.Code segments may have three parts: interface text, actual P-code and/ or6502 code, and Linker information (Figure 2-2). These parts appear inthis order on the disk, although not all types of code segments have all threeparts. For example, interface text is present only in the code segments ofProgram Units. Code segments may be either linked or unlinked.Data segments are areas of memory that are set aside at execution time asstorage space for the local data of Intrinsic Units. In a disk codefile, datasegments have only an entry in the segment dictionary: they do not occupyany blocks on the disk because they have no code part, interface text, orLinker information associated with them.IV-18Chapter 2: Disk Files

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

Saved successfully!

Ooh no, something went wrong!