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.

Remember: If your program has any segments with a segment numberI greater than 31, or if it uses any Intrinsic Units with segment numbersgreater than 31, it must be executed under the 128K Pascal system.The "Nextseg" OptionWhen unavoidable segment-number conflicts arise there is a solution: theCompiler has a "nextseg" option which allows you to specify the segmentnumber of the next Regular Unit, SEGMENT procedure, or SEGMENTfunction encountered by the Compiler. For a discussion of Compiler options,see Chapter 14.The "nextseg" option has the formj$NSnum)where num is a literal integer constant that should be in the range 8 .. 57.The effect is to set the next segment number to num.The "nextseg" option is ignored if it precedes the program heading; thismeans that it cannot be used to specify the segment number of the programitself.The "nextseg" option will work only if the specified number is greater thanthe default number that would be automatically assigned. If the numberspecified in the "nextseg" option is less than or equal to the default segmentnumber, the option is ignored.For example, suppose that you want to use an Intrinsic Unit named ZEBRA,whose code segment number is 7 and whose data segment number is 8.Your program also contains a SEGMENT procedure:PROGRAM ELEPHANT;USES ZEBRA;SEGMENT PROCEDURE HORSE;The Compiler will automatically compile the HORSE procedure as segmentnumber 7; when you try to execute the program, the Pascal system will notexecute the codefile because the program has two different segments withthe number 7. There are two remedies: recompile ZEBRA with differentProgram SegmentationIII-251

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

Saved successfully!

Ooh no, something went wrong!