30 pts l show the value of the Program Counter and the w Reg

30 pts l show the value of the Program Counter, and the w Register, at the end of each instruction executed. Insert comments on what each instruction is doing to show understanding of instruction execution. Assume oFFSET is a general purpose register defined elsewhere. w Register (8-bit) Comment Program counter bit) Line STATUS, RPO more Call Loof up ment f XOO 13 LUTS ADowF

Solution

PROGRAM COUNTER(13 BIT)

W REGISTER (8 BIT)

0X0000

0X01

0X0001

0X01

0X0004

0X01

0X0005

0X01

0X0006

0X01

0X0007

0X00

0X000D

0X00

0X000E

0X00

0X0008

0X00

0X0009

0X00

0X000A

0X01

0X000D

0X01

0X000E

0X01

0X000B

0X01

0X000C

0X01

STARTING ADDRESS WILL BE 0X000 AND ASSUME W REGISTER IS 0X01

LOADING ADDRESS OF LABEL “START”

STARTING ADDRESS WILL BE 0X004

CLEARING THE STATUS REGISTER BY RP0

CLEARING THE CONTENT OF “OFFSET”

CLEARING THE “OFFSET” WITH THE CONTENT OF W

CALLING THE SUBROUTINE LUT_S

ADDING THE “W” CONTENT WITH PCL CONTENT AND STORE IN “F”

DT WITH “AB”

INNCREMENT THE “OFFSET” AND STOR DAT INTO “F”

MOVING THE CONTENT OF “OFFSET” INTO “W”

CALLING THE SUBROUTINE LUT_S

ADDING THE “W” CONTENT WITH PCL CONTENT AND STORE IN “F”

DT WITH “AB”

NO OPERATION i.e END OF PROGRAMM

PROGRAM COUNTER(13 BIT)

W REGISTER (8 BIT)

0X0000

0X01

0X0001

0X01

0X0004

0X01

0X0005

0X01

0X0006

0X01

0X0007

0X00

0X000D

0X00

0X000E

0X00

0X0008

0X00

0X0009

0X00

0X000A

0X01

0X000D

0X01

0X000E

0X01

0X000B

0X01

0X000C

0X01

 30 pts l show the value of the Program Counter, and the w Register, at the end of each instruction executed. Insert comments on what each instruction is doing
 30 pts l show the value of the Program Counter, and the w Register, at the end of each instruction executed. Insert comments on what each instruction is doing

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site