0% found this document useful (0 votes)
38 views

Lab Report # 10 The 8051 Microcontroller: EEE342 - Microprocessor Systems and Interfacing Engr. Zubair Khaliq

The document is a lab report for an 8051 microcontroller course. It contains 4 tasks where the student is asked to write assembly language programs to perform operations like moving values between registers, adding register contents, and predicting register values after instruction execution. For each task, the student provides the required program which is then simulated and tested.

Uploaded by

tomy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

Lab Report # 10 The 8051 Microcontroller: EEE342 - Microprocessor Systems and Interfacing Engr. Zubair Khaliq

The document is a lab report for an 8051 microcontroller course. It contains 4 tasks where the student is asked to write assembly language programs to perform operations like moving values between registers, adding register contents, and predicting register values after instruction execution. For each task, the student provides the required program which is then simulated and tested.

Uploaded by

tomy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

EEE342 - Microprocessor Systems and Interfacing Engr.

Zubair Khaliq

Lab Report # 10
The 8051 Microcontroller
Name Usama Bin Khalid Reg # FA16-BEE-113

Semester & Section BEE-5C Group 04

Performed Date 01 01 2017 Submitted Date 02 02 2017


Task 1:
Write and assemble a program to move value 99H to register A. Then from register A move it
to all registers R0 - R7. Use the simulator to single-step the program and examine the registers.

Program:
MOV A, #099H

MOV R0, A

MOV R1, A

MOV R2, A

MOV R3, A

MOV R4, A

MOV R5, A

MOV R6, A

MOV R7, A

RET

END
Task 2:

Write and assemble a program to add all the single digits of your Reg. number and save the
result in R2. Pick 7 random numbers (all single digit) if you do not want to use your Reg.
number. Then use the simulator to single-step the program and examine the registers.

Program:
MOV A, #02H

ADD A, #04H

ADD A, #06H

ADD A, #08H

ADD A, #0AH

ADD A, #0CH
ADD A, #0EH

MOV R2, A

END
Task 3:

Write and assemble a program to move value 25H and 34H to register R5, R7. Then load register
A with 0. Add contents of R5 to A and contents of R7 to A. Then move it to registers R7. Use
the simulator to single-step the program and examine the registers.

Program:
MOV R5, #025H

MOV R7, #034H

MOV A, #0H

ADD A, R5

ADD A, R7

MOV R7, A

RET

END
Task 4:

The contents of R0 and A are 25H and 35H, respectively. What will be the content of the
destination register after the execution of each line of the following set of instructions?

ADD A, R0
MOV R0, A
ADD A, R0
ADD A, #07

Program:
MOV A, #25H

MOV R0, #35H

ADD A, R0

MOV R0, A

ADD A, R0

ADD A, #07

RET

END

You might also like