Explain difference between macro call and macro expansion, Computer Engineering

Assignment Help:

Explain difference between macro call and macro expansion.

Macro expansion: While a macro name is used along with a set of actual parameters this is replaced through a code generated from its body. Such code is termed as macro expansion. There are two kinds of expansions:

a. Lexical expansion

b. Semantic expansion

Lexical expansion: This means a replacement of character string by the other string during program generation. This is generally used to replace occurrences of formal parameters through corresponding actual ones.

Semantic Expansion: This implies generation of instructions build to the requirements of exact usage. This is characterized by the fact that various uses of a macro can lead to codes that differ in the number, opcodes and sequence of instructions.

The macro definition is located at the starting of the program is enclosed in between a macro header and macro end statement.

A macro statement consists of macro name and parameters

< macro name > { < parameters >}

Macro call: A macro is called through writing the macro name in the mnemonic field of an assembly statement.


Related Discussions:- Explain difference between macro call and macro expansion

The values 15 and 11 can also be defined by variable, In the statement Writ...

In the statement Write:/15(10) lfa1-lifnr. The values 15 and 11 can also be defined by variable. No, the value of 11 nad 15 is not described by variable.

What is a system call, What is a system call? A  system  call  is  a  r...

What is a system call? A  system  call  is  a  request  made  through  any  program  to  the  operating  system  for performing tasks, picked by a predefined set, that the said

What are escape sequences characters, What are escape sequences characters?...

What are escape sequences characters? List any six of them.  The characters which when used with output functions like printf( ),putc(),put() etc. helps in formatting the outpu

Uniform memory access model (uma), Uniform Memory Access Model (UMA) In...

Uniform Memory Access Model (UMA) In this model, the main memory is uniformly shared by all processors in multiprocessor systems and each processor has equal access time to sha

What are the entities that swapped out of the main memory, What are the ent...

What are the entities that are swapped out of the main memory while swapping the process out of the main memory? All memory space occupied by the process, process's u-area, and

Show the comparison of ascii and ebcdic, Q. Show the Comparison of ASCII an...

Q. Show the Comparison of ASCII and EBCDIC? EBCDIC is an easier to employ code on punched cards due to BCD compatibility. But ASCII has some of major benefits on EBCDIC. These

Data dependency, Data Dependency:   It refers to the state in which two or ...

Data Dependency:   It refers to the state in which two or more instructions split same data. The instructions in a program can be given based on the relationship of data dependency

Basic need of random access memory, Q. Basic need of Random Access Memory? ...

Q. Basic need of Random Access Memory? Main memory is Random access memory. It is generally organised as words of fixed length. Length of a word is termed as word length. Every

Projects on cluster computing, Some famous projects on cluster computing ar...

Some famous projects on cluster computing are as follows: High Net Worth Project: (developed by: Bill McMillan, JISC NTI/65 - The HNW Project, University of Glasgow, The prim

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd