Assembly language programming
Assembly and machine language programming :
The microprocessor based systems work by reading and executing the program available in its main memory. A program is sequence of instructions written using the instruction set of a microprocessor. The instruction set different from microprocessor to microprocessor. Hence a program written using instruction set of 8085 microprocessor works only on 8085 microprocessor based system, but not on systems based on other microprocessors. The microprocessor instructions are in binary form. The binary patterns for each instruction for a microprocessor is designed by manufacturer and made available to users. We have already studied the instruction formats for 8085 microprocessor. The examples of binary instruction of 8085 are as follows :
10000000 this is an instruction which adds contents of register B to accumulator and stores the result in accumulator.01110110 this instruction halts the microprocessor.00101111 this instruction complements the contents of accumulator.
he 8085 defines 8-bit binary code called opcode for each instruction. The 8085 can understand program written only in binary codes as above. The program written using binary codes of instructions is called machine language program. The real difficulty in writing machine language program is to remember binary codes for large instruction set. It is very hard for any person to remember so many binary patterns and then write a program. To solve this problem, the English like words are used for each binary pattern called mnemonics. For example, the binary instructions written earlier are coded now using mnemonics as ADD B add B to A HLT halt the processorCMA complement accumulator The program written using mnemonics is called assembly language program. As the mnemonics are easy to remember, the program development will be faster and easier. The microprocessor can not understand program written using assembly language. To execute assembly language program. First it is to be converted to equivalent machine language program by translating mnemonic into binary patterns. The 8085 provides complete table called opcode or machine code table for this purpose, which is given in next section.We will follow the format given in figure for our 8085 assembly language programs.
READ MORE










