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

Development of information system, Development of information system must b...

Development of information system must be considered as capital investment: The developer of an information system must think about different solutions of a particular problem and

Final implementation of object oriented modelling, Final Implementation of ...

Final Implementation of Object oriented modelling Final Implementation: At this phase, the final execution of classes and  relationships developed while object design takes

What is virtual memory, What is virtual memory? Method that automatical...

What is virtual memory? Method that automatically move program and datablocks into the physical main memory when they are needed for execution are known as virtual memory.

Explain what logic gets synthesized , What logic gets synthesized when I us...

What logic gets synthesized when I use an integer instead of a reg variable as a storage element? Is use of integer recommended? An  integer  can  take  place  of  a  reg  as

The advantage of using a database management system, The advantage of using...

The advantage of using a Database Management System The advantage of using a Database Management System for a data store is that databases have mechanisms for describing data,

Define a segment index or an internal index, The field that contains a segm...

The field that contains a segment index or an internal index is called ? Ans. Target datum consists of a segment index or an internal index.

Explain auto increment and auto decrement mode, Explain Auto increment and ...

Explain Auto increment and Auto decrement mode  The register is incremented or decremented after (or before) its value is used to access memory.  The address stored in the regi

What problem does the namespace feature solve, Multiple providers of librar...

Multiple providers of libraries may use common global identifiers causing a name collision when an application tries to link with two or more such libraries. The namespace feature

Project, how many pins does a floppy drive connector have

how many pins does a floppy drive connector have

Changing the system prompt, Q. Changing the System Prompt? When you cha...

Q. Changing the System Prompt? When you change the directory, you would like to keep track of it. The best way to do this is by displaying the name of the current directory alo

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