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

Algorithm, i need algorithm for padovan string

i need algorithm for padovan string

Non-uniform memory access model (numa), Non-Uniform Memory Access Model (NU...

Non-Uniform Memory Access Model (NUMA) In shared memory multiprocessor systems, local memories can be joined with every processor. The group of every local memories form the gl

Scientific applications-image processing, Scientific Applications/Image pro...

Scientific Applications/Image processing Most of parallel processing functions from science and other academic subjects, are mainly have based upon arithmetical simulations whe

Use of parallel construct with private clause, Q. Use of parallel construct...

Q. Use of parallel construct with private clause? In this example we would see use of parallel construct with private and firstprivate clauses. At end of program i and j remain

Explain an interrupt, Used to interrupt CPU normal implementation routine a...

Used to interrupt CPU normal implementation routine and to get its attention .Mostly generated by an external devices, timers, counters...etc

Computer Graphics, Distinguish between uniform scaling differential scaling...

Distinguish between uniform scaling differential scaling

Message passing programme development environment, In a multicomputer syste...

In a multicomputer system the computational load amid different processors should be balanced.  To pass information between different nodes message passing technique is used. The p

Explain the compiler - computer programming, Explain the Compiler - Compute...

Explain the Compiler - Computer Programming? The Compiler is a program that translates source code into object code. The compiler derives its name from the means it works looki

Difference between static call and dynamic call, In the case of Static call...

In the case of Static call, the called program is a stand-alone program, it is an executable program. During run time we can call it in our called program. As about Dynamic call, t

Advanced topics of html, HTML is made up of many elements, a lot of them ar...

HTML is made up of many elements, a lot of them are overlooked. Though you can develop a Website with the basic knowledge of HTML, to take benefit of many of the advanced features,

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