Home|Assembly Language Programming|
The first thing you will need to successfully run assembly language programming is a clear understanding of the microprocessor, its instruction set, addressing modes etc. For the architecture at least a clear idea about the programming model will be sufficient at initial stage. You may download a free tutorial by me from here,
Download Programming Model for 8086 Microprocessor
It is based on 8086 processor architecture. Download and read it. Here you'll learn about the registers that are necessary to program in assembly language.Editor:
This is a program that allows the user to enter, modify and store a group of instructions under a file name. There are mainly two types of editors available. Line editor and Full Screen Editors. Line editor work with one line at a time whereas Full screen editors manage the full screen or a paragraph at a time. To write text the user must call the editor under the control of the operating system. As soon as the editor program is transferred from the disk to the system memory, the program control is transferred from the operating system to the editor program. As the program is composed the exit command of the editor program will save the program on the disk under the specified file name and will transfer the control to the operating system. If the source file is intended to be a program written in the 8086 assembly language the user should follow the syntax of the assembly language and the rules of the assembler.
Assembler:
An assembly program is used to transfer assembly language mnemonics to the binary code for each instruction, after the complete program has been written, with the help of and editor it is the n assembled with the help of an assembler. An assembler works in two phases. In the first pass the assembler collects all the symbols defined in the program, along with their offsets in symbol table. On the second pass through the source program, it produces binary code for each instruction, and give all the symbols and offset with respect to the segment from the symbol table
The assembler generates three files. The object file, the list file and cross reference file. The object file contains the binary code for each instruction in the program. It is created only after successful assembling of the program without errors. The errors that are detected by the assembler are called symbol errors.
List file is optional and contains the source code, the binary equivalent of each instruction, and the offsets of the symbols. This file is for documentation purpose. Some of the assemblers available are MASM, TASM
Linker:
For modularity of the program, it is better to break the program into several sub routines. These files are then assembled separately. After being successfully assembled they can be linked together to form a large file, the complete program. The program that makes this link is called the linker program.
The linker program produces a link file, which contains the binary code for all compound modules. It also produces link maps, which contains the address information about the linked files. But the linker does not assign absolute addresses to the program. It only assigns continuous relative addresses to all the modules linked starting from the zero. This form a program is relocatable as it can be put anywhere in the memory to be run.
Loader:
This program assigns absolute addresses to the program. These addresses are generated by adding the address from where the program is loaded into the memory to all the offsets. Loader comes into action when the program is executed. This program is brought from the secondary memory like disk. The file name extension for loading is .exe or .com, which after loading can be executed by the CPU.
Debugger:
The debugger is a program that allows user to test and debug the obj file. The user can employ this program to make change in the object code, examine and modify the contents of memory, set breakpoints , execute a segment of the program and display register contents after the execution. Trace the execution of the specified segment of the program and display the register and memory contents after the execution of each instruction. Disassemble a section of the program.
Thank you for the great post, but if I may, I believe that the link to the Programming module of the microProcessor is invalid...
ReplyDelete