Steps to use Keil uVision Software

After Installing the Keil software follow the below steps to perform the 8-bit Addition
1. Open the software and click on the Project option which is settled at the top of the window, Then it will shows a popup like this below:

Keil uVision Software

And then click on the “New uVision Project” option then it will opens and explorer to save it like below:

Saving the Project

Give a name to your Project and save it in your desired location. Then a popup will come to select the device of Microcontroller here in this case we are going to select the ‘AT89C51’ Microcontroller to run the program. In the popup there will be a search bar type the above name then select it as below:

Select the MC AT89C51

After selecting the MC click on “OK” Option ‘AT89C51’ is a Microcontroller that designed by ‘ATML’ it is 8051-MC. Then you will get a dialog box with yes or no like below:

Click on NO

Click on ‘NO’ we don’t have need of that file so that click on NO but that’s up to you if you have any use cases with that file you can click on YES Then we have successfully created a project file like below:

Then right click on Source Group 1 and click on the option called “add new item to Group ‘Source Group 1′” and select the file type and enter the file name also like below:

Then click on Add that create an .asm file in your project. Now the asm file will be open in the editor to type the program so that Enter the above Program of 8-bit Addition. You can paste the above Program in your code editor after completing the code click on “F7” key to Build the target file or right click on the asm file and select Build target option from there.

In the below at Build output box you will get like below:

Build started: Project: addition
Build target 'Target 1'
assembling add.asm...
linking...
Program Size: data=8.0 xdata=0 code=11
".\Objects\addition" - 0 Error(s), 0 Warning(s).
Build Time Elapsed: 00:00:01




So when we are getting the output as 0 Errors we can proceed to run the Program by debugging.
To debug the program we can simply click ‘ctrl + F5’ or there will be a option to do that at the top of the window.
we can debug the program by step wise or complete program at a time by clicking on keys, By clicking on F11 Key we can achieve step wise debugging

At starting the register values are like below:

At starting all the registers are empty by pressing the F11 key we can check how the values of the accumulator, b are changing.
We can in the above picture that the value #5 came into Accumulator and B also added, the result was stored in Accumulator as per the program, as in the program we are added that to store the value in r0 register and 50h address see the result in the below:

As you can see the result was stored in R0 Register and 50h address. so that we can change the program to test your own values and make sure to rebuilt it again by clicking on F7 key .

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.

Similar Reads

Features of MC-8051

...

Program for 8-bit Addition

;program for 8-bit addition in assembly language programmingorg 0000 mov a,#5 mov b,#5 add a,b mov 50h,a mov r0,50h end...

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 “;“....

Flowchart of program

...

Steps to use Keil uVision Software

After Installing the Keil software follow the below steps to perform the 8-bit Addition1. Open the software and click on the Project option which is settled at the top of the window, Then it will shows a popup like this below:...

Applications of Assembly Language Programming

Assembly Language Programming have lot more applications here are some :...

Advantages and Disadvantages of using Assembly Language in 8051

There are some list of Advantages and Disadvantages of using assembly language in 8051 given below :...

Conclusion

In this article, we discussed the addition of two 8-bit numbers using assembly language programming. We presented the assembly language code for adding two 8-bit numbers, along with explanation and we gave an overview on how to use Keil uVision software. Finally, we discussed the applications, advantages and disadvantages of using assembly language....

FAQs on Assembly language programming for beginners: 8-bit Addition

Q1. What is the 8051 MC instruction set?...