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.

Example:.MACRO HELPSTA %1LDA %2.ENDM( comment )( comment >The assembly listing beginning at the point where thismacro is invoked might look like this:HELP ALPHA,BETA# STA ALPHA# LOA BETAThe statement HELP invokes the defined macro usingtwo arguments, ALPHA and BETA. These argumentsare used in forming the macro expansion (flagged inthe listing by number signs) that follows the invokingstatement. In the expansion, the firstmacro-invocation argument (variable ALPHA) issubstituted for the definition's parameter %1, and thesecond argument (variable BETA) is substituted forparameter %2.The following portion of an assembly listing illustrates the syntax usedwhen defining and invoking macros. The procedure itself is not meant to bean actual, useful program. Other examples of macros occur in the programexample given in the first part of this chapter.PAGE - TEMP2 FILE:Hill!llCurrent memory available:fllflf.l!lll'lfllBSIl'lfllfrnl l!HAl!HSI llflBFHUI SllF7llllllll!l0BlllllfrHltlllf/JtlJtlllllI! I! HIll ll 1!111llilflflllltlllllfllCOH1 IllOTHflONE fl.PROC TEMP211Hl88CONSTANTS.mu.EGU.EQU11il.fl BFilF7.MACRO M2CLCLDA PREDEFL+%1.ENDMMACRO DEFINITIONSII-192Chapter 6: The Assembler

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

Saved successfully!

Ooh no, something went wrong!