--Your friends at LectureNotes

System Programming

by Anantharaj Manoj
Type: NoteInstitute: Vikrama Simhapuri University Offline Downloads: 206Views: 3137Uploaded: 10 months agoAdd to Favourite

Share it with your friends

Suggested Materials

Leave your Comments


Anantharaj Manoj
Anantharaj Manoj
Macro Processors 1
Macro Instructions A macro instruction (macro) » It is simply a notational convenience for the programmer to write a shorthand version of a program. » It represents a commonly used group of statements in the source program. » It is replaced by the macro processor with the corresponding group of source language statements. » This operation is called “expanding the macro” 2
Macro Instructions » A macro processor is essentially involve the substitution of one group of characters or lines for another. » It doesn‘t concern the meaning of the involved statements during macro expansion » This means the design of a macro processor is not directly related to the architecture of the computer i.e. machine independent. – For example: Suppose it is necessary to save the contents of all registers before calling a subroutine. – This requires a sequence of instructions. – We can define and use a macro, SAVEREGS, to represent this sequence of instructions. 3
The handling sequence of the program 4

Lecture Notes