You are on page 1of 10
MICROPROCESSORS EXPERIMENT NO. 1 FAMILIARIZATION WITH THE EdSim51 SIMULATOR AND THE 8051 INSTRUCTION SET Name: Sangalong, Gobrie/ Carlo PR Course/Section: COE/Z/L / E01 Group No.: Date of Performance: June 01, 2010 Date of Submission: June 08, 2026 Engr. ksogoni Vi llomor Professor ) PART ONE: Familiarization with the simulator Q1. What are the contents of the registers A, R6, and RO? Q2. What is the output of the program? What do you think is the effect of the changes you have made in the program? Q3. What are the added instructions to the new program? Mov B, #30 ADA, 8 Q4. What is the output of the program? Register B hos on cutput of OX3C ond register A Aawon output of Ox 55. Q5. What will happen if the destination of the sum is changed to RO? Explain your answer. There null be cr uyhiox error clelectedl shea usiag R20 Oy the des taction: Hence, LD talerooly useo! from }/ 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 CLRA Acc= Ox00| 0001 MOV RS, #35H R5= 0x35 0003 MOV R7, #45H R7= Ox45 0005 MOV A, #0 0007 ADD A, R5 0008 ADD A, R7 A= OX7A 0009 ADD A, #27H A= OXAI 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 CLRA Oxed ' byte 0001 MOV RS, #35H y Ox 70 2 bytes MOV R7, #45H 0008 Ox TF 2 bytes 0005 MOV A, #0 Ox74 2 bytes 0007 ‘ADD A, R5 Ox 2 | byte ‘ADD A, R7 0008 Ox aF | byte 0009 ‘ADD A, #27H 0x24 2 bytes Q3-II. What is the total number of bytes of the program? here ig 11 bytes in total. Q4-II. What is corresponding value of each flag in PSW? Complete table 3. TABLE 3:PSW cy AC FO RS1 RsO | OV - P PSW.1| PSW.6 | PSW.S Psw.4 PSN.3 PSW.2] PSW.1 P5w-0 TABLE 4 Q5-II. Complete table 4 and 5 to RAM locations content. RAM Locations} () x | 0x19 Oy 4A Ox IF Ox 1D Content RO = 0x50) Rie Ox 60 Rae 0x10 R17 Dr 6D RG = 0 90 TABLE 5. RAM Locations 0x!0 ox oxla bxI7 Oxl5 Content RO = 0x50 Rt 0x60 Ra70x70 a7? «GD R5 = 0x90 DISCUSSION The experiment 1s about fomnbarization sth the folsimS] wiumulotor cma the 8D5) mstruchon set. The folSin 5) is. mulotor useot for 805) miccocantaller in uthich there 1 oO BOS) wrtuol mtecloced 1 the ing elfeck on the unternal memory endl other wirl- uol perspherok. Port 7 wncialy focuses On the suntilertor in which | i ‘ 4 4 CONCLUSION After pertormmg the experiment, | therefore conc luce thor: “The mast widely uscal regustersin Bos) ore Alace- -k? A. ARS), Behr ¢byertlow flag), RW. 1 ft) User REFERENCE : -edsim51.com /simInstruchons. him! “www. tuiorialspoinl. com /em bedded systems / es...registers. him] ~www.win. tue.nl/~aed comp / 8051/s¢/ B05). htm!)

You might also like