×
DON'T FORGET THE LIFESTYLE YOU HAVE PROMISED TO YOURSELF.
--Your friends at LectureNotes
Close

Note for System Programming - SP by Anantharaj Manoj

  • System Programming - SP
  • Note
  • Vikrama Simhapuri University - VSU
  • 7 Topics
  • 7019 Views
  • 339 Offline Downloads
  • Uploaded 1 year ago
0 User(s)
Download PDFOrder Printed Copy

Share it with your friends

Leave your Comments

Text from page-1

Macro Processors 1

Text from page-2

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

Text from page-3

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

Text from page-4

The handling sequence of the program 4

Lecture Notes