Assembly directives and pseudo-ops, Computer Engineering

Assignment Help:

Assembly directives and pseudo-ops:

Assembly directives are which instructions that executed by the assembler at assembly time, not by the CPU at run time. They can build the assembly of the program dependent on parameters input by the programmer, so that 1 program can be assembled with different ways, may be for different type of applications. They also can be used to direct presentation of the program to make it simple for the programmer to read and maintain it.

(For instance, pseudo-ops would be used to reserve storage areas and optionally their primary contents.) The names of pseudo-ops frequently start with a dot to differentiate them from machine instructions. Some assemblers also take favor of pseudo-instructions, which produce two or more machine instructions. Symbolic assemblers permit programmers to connect arbitrary names (labels or symbols) with memory locations. Generally, every variable and constant is given a name so instructions can reference those locations by their name, therefore promoting self-documenting code.  In the executable code, the name of each subroutine is connected with its entry point, so any calls to a subroutine can use its name. In Inside the subroutines, GOTO destinations are given particular labels. Some assemblers support local symbols which are radically distinct from normal symbols (for example, the use of "10$" for a GOTO destination).

Most of the assemblers provide flexible symbol management, permit programmers to manage different type of namespaces, automatically calculate offsets within data structures, and assign labels that refer to literal values or the result of easy computations performed by the assembler. The labels can also be used to initialize variables and constants with re -locatable addresses.

Assembly languages, like most of the other computer languages, give permission to comments to be added to assembly source code that is avoided by the assembler. Good use of comments is even more significant with assembly code than with higher-level languages like c, c ++, etc., as the meaning and purpose of a sequence of instructions is difficult to decipher from the code itself.

Intelligent use of these facilities can simplify the problems of coding and maintaining low-level code. Raw assembly source code as produced by compilers or disassembles-code without any comments, data definitions, or meaningful symbols-is quite hard to read when changes must be made.


Related Discussions:- Assembly directives and pseudo-ops

Explain the difference between ram and rom, RAM: Read / Write memory, High ...

RAM: Read / Write memory, High Speed, Volatile Memory. ROM: Read only memory, Low Speed, Non Voliate Memory.   RAM- Random Access memory it is a Volatile Memory.  volatil

What is floppy drives, Q. What is Floppy Drives? Disks used with a flop...

Q. What is Floppy Drives? Disks used with a floppy disk drive are small removable disks fabricated of plastic coated with magnetic recording material. Disk rotates at 360RPM. F

Network, Give an intuitive explanation of why the maximum throughput, for s...

Give an intuitive explanation of why the maximum throughput, for small beta, is approximately the same for CSMA slotted Aloha and FCFS splitting with CSMA. Show the optimal expecte

Compare a decoder and a demultiplexer with block diagram, Compare a decoder...

Compare a decoder and a demultiplexer with suitable block diagrams. Ans. Demultiplexer has similar circuit as decoder but here e is obtained as the particular input line, the

show bank type , Describe an abstract class 'Bank' having abstract methods...

Describe an abstract class 'Bank' having abstract methods as 'CreateAccount' 'depositAmount' & 'withDrawAmount'.Add method definitions for 'CalculateInterest' and 'SetInterest' as

What is meant by inferring latches, What is meant by inferring latches, how...

What is meant by inferring latches, how to avoid it? Consider the following: always @(s1 or s0 or i0 or i1 or i2 or i3) case ({s1, s0}) 2'd0: out = i0; 2'd1: out =

Show typical microprocessor system architecture, Q. Show typical microproce...

Q. Show typical microprocessor system architecture? A microprocessor system bus consists of three physical buses: the address bus, the data bus, and the control bus. The types

Role of internet, What are the roles of Internet, Intranet and extranet in ...

What are the roles of Internet, Intranet and extranet in e-business? Role of Internet, Intranet and extranet into e-business: The given information activities are carried

Explain the working of light pens, Explain the working of light pens Li...

Explain the working of light pens Light pens still exist, but due to several disadvantages they are not as popular as other input devices that have been developed. For example,

What is expansion swap, What is Expansion swap? At the time when any pr...

What is Expansion swap? At the time when any process needs more memory than it is currently allocated, the Kernel performs Expansion swap. To do this Kernel reserves enough spa

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