Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- init:
- LDR R0, =STRING1 ; &STRING1
- LDR R1, =STRING2 ; &STRING2
- loop:
- LDRB R2, [R0, #0x04]!
- LDRB R3, [R1, #0x04]!
- CMP R2, 0
- BEQ are_equal ; Reached null terminator, let's do the final check
- CMP R2, R3
- BEQ loop ; The current character is the same, let's check the next
- B not_equal ; The current character is not the same, we are done.
- are_equal:
- CMP R2, R3
- BEQ equal
- B not_equal
- equal:
- ;code continues here
- not_equal:
- ;code continues here
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement