solved Task 2
This commit is contained in:
+18
-1
@@ -48,7 +48,24 @@ endless
|
||||
BL waitForKey ; wait for key T0 to be pressed
|
||||
|
||||
; STUDENTS: To be programmed
|
||||
|
||||
|
||||
LDR R2, =ADDR_DIP_SWITCH_31_0
|
||||
LDR R2, [R2] ; Read Values of Dip Switches
|
||||
|
||||
|
||||
ADDS R0, R0, R2 ; Add Value of Dip Siwtches to R0
|
||||
|
||||
MRS R4, APSR ; Read Flags to R4
|
||||
LSRS R4, R4, #29 ; Move Flags 24 Bit right
|
||||
LDR R5, =MASK_KEY_T0
|
||||
ANDS R4, R4, R5 ; Mask only carry Flag
|
||||
ADDS R1, R1, R4 ; Add Carry Flag to R1
|
||||
|
||||
|
||||
LDR R3, =ADDR_LCD_BIN
|
||||
STR R0, [R3, #0] ; write lower 32 Bits to LCD Display
|
||||
STR R1, [R3, #4] ; write higher 32 Bits to LCD Display
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user