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.

In the 128K Pascal system, the segment table has slots for up to 64 entries.The operating system uses 6, and slots 58-63 are reserved for Pascal. Thus52 slots are left for the program to use. Remember that only 16 can be in theprogram's codefile; any excess over 16 must be Intrinsic Unit segments.In the 64K Pascal system, the segment table has slots for up to 32 entries.The operating system uses 6; thus 26 slots are left for the program to use.Because only 16 can be in the program's codefile, any excess over 16 mustbe Intrinsic Unit segments.Segment NumbersA segment number is an index into the segment table; thus at run time,every segment has a segment number in the range 0 .. 63 and no twosegments in the program can have the same number.These segment numbers are assigned to the program segments (exceptIntrinsic Unit segments) when the segment entries are placed in thecodefile's segment dictionary (before run time). Numbers are assigned asfollows:o The program itself is Segment 1.o The segments used by the system are 0 and 2 .. 6. These numbers arenever assigned to segments of the program.o The segment numbers of Regular Unit segments and of SEGMENTprocedures and functions are automatically assigned by the system; theybegin at 7 and ascend. Note that after a Regular Unit is linked into aprogram, it might not have the same segment number that it had when itwas compiled.The segment number of an Intrinsic Unit segment is determined by theunit's heading, when the Intrinsic Unit is compiled. You can find thesenumbers by examining the segment dictionary of the library file with theLIBMAP utility program, as described in Part II of this <strong>manual</strong>, Chapter 8.To summarize the above, the segment numbers of the program itself, thesegments used by the system, and any Intrinsic Units used by the programare fixed before the program is compiled; the segment numbers of RegularUnits and of SEGMENT procedures and functions are not fixed, and areassigned as the program is compiled and linked, in ascending sequencebeginning with 7.Normally, the only time you need to specify segment numbers is in writingan Intrinsic Unit, as explained in Chapter 12.III-250Chapter 15: Large Program Management

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

Saved successfully!

Ooh no, something went wrong!