Question: The following problem should be done using assembly language on an ARM Cortex A9 processor and implemented on the Intel DE10-Standard development board. Does my
The following problem should be done using assembly language on an ARM Cortex A9 processor and implemented on the Intel DE10-Standard development board.
Does my code below many any sense?
.include "address_map_arm.s"
.text /* executable code follows */
.global _start
_start:
LDR R1, =LED_BASE // base address of LED lights
LDR R2, =SW_BASE // base address of SW switches
LDR R3, =KEY_BASE // base address of KEY pushbuttons
MOV R8, #3
DO_DISPLAY:
LDR R5, [R2] // load SW switches
LDR R6, [R3] // load pushbutton keys
LDR R4, [R0] //load register memory
CMP R6, #1
BEQ BUTTON
B DO_DISPLAY
BUTTON:
CMP R4, R5 //comapre memory ==switch
STR R8, [R1] ///display the state on LEDs
B DO_DISPLAY
.end
2. Using the getting started.s and/or simple_program.s as reference, you are to write your own program to implement a pattern matching system which operates as follows. The system is to compare the 10-bit value set on the switches to a pattern stored in memory. If the two values match, then this should be indicated in some manner using the LEDs. (You can decide how the LEDs indicate the match.) The system should not be comparing continuously, but should only perform the comparison/check when pushbutton 0 is pressed. The LEDs should not indicate a match before pushbutton 0 is pressed to check for a match. If the switch value does not match the pattern stored in memory, nothing should happen. 2. Using the getting started.s and/or simple_program.s as reference, you are to write your own program to implement a pattern matching system which operates as follows. The system is to compare the 10-bit value set on the switches to a pattern stored in memory. If the two values match, then this should be indicated in some manner using the LEDs. (You can decide how the LEDs indicate the match.) The system should not be comparing continuously, but should only perform the comparison/check when pushbutton 0 is pressed. The LEDs should not indicate a match before pushbutton 0 is pressed to check for a match. If the switch value does not match the pattern stored in memory, nothing should happen
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
