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 smtp, SMTP is a Protocol used for transferring message among en...

SMTP is a Protocol used for transferring message among end user & Mail Server.

Digital electronics, Draw a circuit of an NMOS inverter and explain its ope...

Draw a circuit of an NMOS inverter and explain its operation

Demultiplexers, Explain briefly about demultiplexers?

Explain briefly about demultiplexers?

Describe the architecture of electronic data exchange, Describe the Electro...

Describe the Electronic Data Exchange (EDI) architecture in brief. Electronic Data Interchange (EDI) may be generally easy to understand as the replacement of paper-based purch

Reading every record , You have a file having sporting goods that are sold ...

You have a file having sporting goods that are sold online. Every item record contains the item id, item name, item description, item category, item price, and the units in stock.

How is EISA bus different from ISA bus, How is EISA bus different from ISA ...

How is EISA bus different from ISA bus? Extended Industry Standard Architecture (EISA) is a 32 bit modification to ISA bus. As computers became larger and had wider data buses,

Construct a shift register from S-R flip-flops, Construct a shift register ...

Construct a shift register from S-R flip-flops. Explain its working. Ans: S-R Flip-Flop Shift Register: Shift registers can be built through using SR flip-flops. Fig.(a)

Give example of stack using encapsulation of OOA, Give example of stack usi...

Give example of stack using encapsulation of OOA An example of the Stack.  A Stack abstraction provides methods like pop (), push (), isEmpty(), isFull(). The Stack can be i

Common functions of interrupts - computer architecture, Common Functions of...

Common Functions of Interrupts: An Interrupt transfers control to the interrupt service routine, generally through the interrupt vector table, which contains the addresses

Define parity generator, Define parity generator During transmission, a...

Define parity generator During transmission, at sending end the message is applied to a parity generator, where the needed bit is formed.

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