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.

CompileTyping c while at the Command level invokes the Pascal Compiler. TheCompiler reads a textfile containing Pascal program statements andtranslates this file into P-code for the Pascal "pseudomachine," known asthe "P-machine." The P-machine is not hardware, but an interpretingprogram that reads the codefile and executes the instructions given to it.If SYSTEM.WRK.TEXT is available on the system disk, it is automaticallyread into memory and compiled. Otherwise, the Compiler asks you tospecify the name of the file to be compiled and the name of the codefile thatwill contain the compiled program.When the Compiler detects a syntax error during compilation, the systemasks you whether you want to enter the Editor to correct the error, continuecompiling the program, or exit from the program. If you continuecompilation after finding errors, you won't have a usable codefile toexecute, but you will be able to see what errors have been found in yourprogram.After a successful compilation, the file that has been converted into P-codeis saved in the workfile codefile unless you specified another codefile. Formore details about the Compiler, see Chapter 5.link-Typing L from the Command level invokes the system's Linker program.The Linker combines separate codefiles containing P-code or assembled6502 code into a single codefile.The Link command allows you to link previously compiled or assembledroutines into your program. Linking can be initiated automatically by usingthe Run command (see the previous description). In some situations,however, you cannot use the Run command and must explicitly link usingthe Link command. For more information, see "The Workfile" in Chapter 1,and Chapter 7, "The Linker."ExecuteTo Execute a program, type x from the Command level. The Executecommand executes a previously compiled and linked codefile. After youinvoke this command, the system asks you to specify the codefile that youwant to execute. You should respond by typing the filename of the program.II-14Chapter 2: The Command Level

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

Saved successfully!

Ooh no, something went wrong!