{============================================================================} {= =} {= 'Compiler.Pas' =} {= =} {= Pascal compiler main routines. =} {= =} {= 11/15/86 - Bruce Tomlin =} {= =} {============================================================================} PROGRAM Pascal(input,output); {$T APPL TMLP } { Make the compiler leech the icon from TML Pascal } {$R+} { Turn on range checking for this module } USES MacDefs, Files, GetFiles, { GetFiles is needed for 'GetFiles' } SymTab, Error, { Error is needed for 'ExitCompiler' } GetSym, PTree, PSyms, Optimize, CodeGen, Parser; { Parser is needed for 'DoProgram' } { Trap attempts to dereference a NIL pointer by putting an odd value } { at address zero. The instruction is: MOVE.L #'NIL!',0 } PROCEDURE TrapNilDerefs; INLINE $21FC, $4E49, $4C21, $0000; {============================================================================} {= =} {= Main procedure =} {= =} {============================================================================} BEGIN { of 'Pascal' } TrapNilDerefs; { Open up the input and output files and compile if O.K. } IF GetFiles(input,output) THEN DoProgram; { Exit from the compiler } ExitCompiler; END.