Program Description
- ORG 0000H means it set the statement at memory address 0000H.
- mov a,#5 using immediate Addressing mode we are transferring hexadecimal ‘5’ to accumulator.
- mov b,#5 Same as above we are transferring hexadecimal 5 to b.
- add a,b here add opcode will adds the data of a and b
- mov 50h,a this line uses to store the output to the memory address 50h from accumulator.
- mov r0,50h this line uses to store the output to the register from memory 50h.
- end This ‘end’ opcode to stops the program
- To Write comments in Assembly language we use a “;“.
Assembly Language Programming for Beginners: 8-bit Addition
We will learn how to add two 8-bit numbers using Assembly Language programming. We are going to use the 8051 microcontroller instruction set to write the program.