Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

MICROPROCESSORS

EXPERIMENT NO. 1

FAMILIARIZATION WITH THE


EdSim51 SIMULATOR AND
THE 8051 INSTRUCTION SET

Name: Daniel Louis M. Parulan (Leader)


John Jacobsen Perez

Course/Section: CPE108L/E02

Group No.: 10

Date of Performance: May 28, 2020


Date of Submission: May 28, 2020

________Cyrel Manlises________
Professor
PART ONE: Familiarization with the simulator
Q1. What are the contents of the registers A, R6, and R0?

Register A contains 0x19, register R6 contains 0x09 and

register 0 contains 0x19 which was copied from register

A.___________________

Q2. What is the output of the program? What do you think is the
effect of the changes you have made in the program?

The output of the program showed no changes. It

had no effect on the program because the value

of 256 exceeded 8 bits.________________________

Q3. What are the added instructions to the new program?

The added instructions were MOV B, #3CH and ADD

A,B_____________________________________

_________________________________________________
Q4. What is the output of the program?

The final output of register A contained 0x55, register 6 has

0x09 and register 0 has 0x19.__

Q5. What will happen if the destination of the sum is changed to


R0? Explain your answer.
If the destination of the sum is changed to register R0, the

program would output an error. This occurs because register

A is the Accumulator register and is used in operations that

involve__ the use of

ADD.______________________________
PART TWO: Exploring the Instruction Set of 8051
Q1-II. What is the output of the program? Complete the given
table 1.
TABLE 1
ROM address Assembly Language Result
0000 CLR A Acc=0x00
0001 MOV R5, #35H R5=0x35
0003 MOV R7, #45H R7=0x45
0005 MOV A, #0 Acc=0x00
0007 ADD A, R5 A=0x35
0008 ADD A, R7 A=0x7A
0009 ADD A, #27H A=0xAl
Q2-II. Go to code memory and complete table 2.
TABLE 2
ROM Assembly Machine Byte Size of the
Address Language Language instruction
(OpCode)
0000 CLR A E4 1
0001 MOV R5, #35H 7D35 2
0003 MOV R7, #45H 7F45 2
0005 MOV A, #0 7400 1
0007 ADD A, R5 2D 1
0008 ADD A, R7 2F 1
0009 ADD A, #27H 2427 2

Q3-II. What is the total number of bytes of the program?

____The program has a total number of 11 bytes_

_________________________________________________
Q4-II. What is corresponding value of each flag in PSW?
Complete table 3.
TABLE 3:PSW
CY AC F0 RS1 RS0 OV -- P
0 1 0 0 0 1 0 1

Q5-II. Complete table 4 and 5 to RAM locations content.


TABLE 4
RAM RS1 RS0 0V 1 P
Locations
Content 1 1 0 0 1

TABLE 5
RAM RS1 RS0 0V 1 P
Locations
Content 1 0 0 0 1

You might also like