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

What is pipelining, What is pipelining? The overlapping of implementati...

What is pipelining? The overlapping of implementation of successive instructions is known as pipelining.

What is the use of unions in c ?, Unions allow the same area of memory to b...

Unions allow the same area of memory to be accessed as different data types. The insurance example above would not work. Unions are useful (often in embedded programming) when i

Testmanagers wizard, TestManager has a wizard that you can use to copy or i...

TestManager has a wizard that you can use to copy or import test scripts and other test assets (Datapools) from one to another.

Pythagorean theorem, if the 6 is a and the b is 3 what is the c ?

if the 6 is a and the b is 3 what is the c ?

Input, what is an input?

what is an input?

Time Complexity, how to determiner time complexity of any given polynomial ...

how to determiner time complexity of any given polynomial in data structure?

Graphic symbol of S-R flip-flop, Q. Graphic symbol of S-R flip-flop? R...

Q. Graphic symbol of S-R flip-flop? R-S Flip flop - Graphic symbol of S-R flip-flop is displayed in Fig below. It has 3 inputs S (set), R (reset) and C (for clock). Q(t+1) is

What are the advantages of open source system, What are the advantages of o...

What are the advantages of open source system? High-quality software Lesser hardware costs Integrated management No vendor lock-in Take control of our softwa

How does applet update its window when information changs, How does the App...

How does the Applet update its window when information changes? Whenever an applet requires to update the information displayed in its window, this simply calls repaint ( ) way

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