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

Computer peripherals, Describe the 8251 A programmable communication interf...

Describe the 8251 A programmable communication interface

How semaphores implement mutual exclusion, How semaphores implement mutual ...

How semaphores implement mutual exclusion? Mutual-exclusion implementation along with semaphores: Assume that there are n-processes and they share a semaphore, mutex (stan

Describe the external users of system, Q. Describe the External Users of sy...

Q. Describe the External Users of system? External Users: Modern information systems are now reaching beyond the boundaries of traditional business to involve customers and o

Name the variable types of c, C provides a wide range of variable types. ...

C provides a wide range of variable types. Normal 0 false false false EN-IN X-NONE X-NONE MicrosoftInternetExplorer4

Assembly language programming, I need help to create test cases for the MIP...

I need help to create test cases for the MIPS Instruction set architecture

C++, pebble merchant

pebble merchant

Data structure, Sort the following list using selection sort technique, dis...

Sort the following list using selection sort technique, displaying each step. 20,12,25,6,10,15,13

Explain about api s of olap, Microsoft in the late 1997 introduced a standa...

Microsoft in the late 1997 introduced a standard API called as OLE DB. After which XML was used for analysis specification and this specification was largely used by a lot of vendo

Desirable characteristics of an electronic market place, What are the desir...

What are the desirable characteristics of an Electronic Market Place?  Characteristics of an Electronic Market Place:  a. Its electronic, the business center is not a phys

Variable ordering - forward checking, Variable ordering - Forward checking:...

Variable ordering - Forward checking: Hence this is different from variable ordering in two important ways as:  Whether this is a dead end when we will end up visiting a

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