ASSEMBLY PROGRAMMING
An assembly language, mostly abbreviated (ASM): this is a low level programmable device, in which there is a very strong (generally one-to-one) correspondence between the language and the architecture’s machine code instructions.
Advantages of assembly programming
- It requires less memory and execution time
- It allows hardware – specific complex jobs in an easier way
- It is suitable for time-critical jobs.
Tools for Assembly Programming
- Assembler: – This is the most important tool for assembly language programming, it is a software that converts assembly language code into machine language.
- The Linker: – This is the output of the assembler, like that of any compiler, needs to be linked to form an executable file.
Note: Assembly language programs consist of three types of statement
- Executable instruction or instructions: These are statement of commands that tells the processor what to do.
- Assembler directives or pseudo-ops: This tells the assembler about the various aspects of the assembly process.
- Macros: Macro are basically a text substitution mechanism.
- Memory segments – A segmented memory model divides the system memory into groups of independent segments referenced by pointers located in the segment registers. Each segment is used to contain a specific type of data. One segment is used to contain instruction codes (code segment) another segment stores the data elements (Data segment) and a third segment keeps the programme flags and some other conditional instructions that test the value of these status flags to take the control flow to other location.
- Segment Register: Segments are specific areas defined in a program for containing data, code and stack. The segment registers stores the starting addresses of a segment. To get the exact location of data or instruction within a segment, an offset value (or displacement) is required.
No comments:
Post a Comment