solved Task 3d
This commit is contained in:
@@ -148,6 +148,25 @@ case_red
|
||||
; Show Diff on 7-Segment
|
||||
LDR R3, =ADDR_7_SEG_BIN_DS3_0
|
||||
STRB R2, [R3]
|
||||
|
||||
; Count 0 Bits in diff
|
||||
LDR R3, =0x9 ; Count down
|
||||
LDR R4, =0x0 ; Count 0 bits
|
||||
LDR R5, =0x01 ; Value 1
|
||||
loop_count_0_bits
|
||||
SUBS R3, R3, R5
|
||||
BEQ end_loop_count_0_bits
|
||||
LSRS R2, R2, #1
|
||||
BHS loop_count_0_bits
|
||||
ADDS R4, R4, R5
|
||||
B loop_count_0_bits
|
||||
end_loop_count_0_bits
|
||||
|
||||
; Show 0 Bits in lcd 2nd line
|
||||
LDR R3, =ADDR_LCD_ASCII_2ND_LINE
|
||||
LDR R5, =ASCII_DIGIT_OFFSET
|
||||
ADDS R4, R4, R5
|
||||
STRB R4, [R3]
|
||||
|
||||
B main_loop
|
||||
case_green
|
||||
|
||||
Reference in New Issue
Block a user