Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Microprocessor a) Find the addressing mode of the next assembly instructions. b) How many cycles has each instruction? MNEMONIC L ADDRESS MODE Clock Cycles PUSH
Microprocessor
a) Find the addressing mode of the next assembly instructions. b) How many cycles has each instruction? MNEMONIC L ADDRESS MODE Clock Cycles PUSH {R2 R3} Delay Loop: LDR R2,M Delay Loopl: SUB R2, R1,#1] CMP R2, R1,#OxA6]! BNE Delay Loopl SUB R3 R2 #1 CMP R3,#0 BNE Delay Loop POP R2,R3} MOV PCLR BL Init_GPIO LDR RO, GPIO PORTF DATA R MOV R1,#000000000 STR R1,[RO],#0x9C Loop: LDR R1,RO] AND R1,R3,#000100016 CMP R1 #000100006 BEQ GRED CMP R1,#000000016 BEQGBLUE CMP R1,#000000006 BEQ GGREEN B Loop Init GPIOF: PUSH RO.R1} LDR RO,SYSCTL RCGC2 R LDR R1,SYSCTL_RCGC2 Data STR R1,[RO LSR #9] LDR RO,GPIO PORTF LOCK R LDR R1,PORTF LOCK DATA STR R1,[RO] LDR RO, GPIO PORTF_CR R MOV R1 #0x1F STR R1,RO] a) Find the addressing mode of the next assembly instructions. b) How many cycles has each instruction? MNEMONIC L ADDRESS MODE Clock Cycles PUSH {R2 R3} Delay Loop: LDR R2,M Delay Loopl: SUB R2, R1,#1] CMP R2, R1,#OxA6]! BNE Delay Loopl SUB R3 R2 #1 CMP R3,#0 BNE Delay Loop POP R2,R3} MOV PCLR BL Init_GPIO LDR RO, GPIO PORTF DATA R MOV R1,#000000000 STR R1,[RO],#0x9C Loop: LDR R1,RO] AND R1,R3,#000100016 CMP R1 #000100006 BEQ GRED CMP R1,#000000016 BEQGBLUE CMP R1,#000000006 BEQ GGREEN B Loop Init GPIOF: PUSH RO.R1} LDR RO,SYSCTL RCGC2 R LDR R1,SYSCTL_RCGC2 Data STR R1,[RO LSR #9] LDR RO,GPIO PORTF LOCK R LDR R1,PORTF LOCK DATA STR R1,[RO] LDR RO, GPIO PORTF_CR R MOV R1 #0x1F STR R1,RO]Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started