aboutsummaryrefslogtreecommitdiff
path: root/hexedit/uart.s
diff options
context:
space:
mode:
Diffstat (limited to 'hexedit/uart.s')
-rw-r--r--hexedit/uart.s32
1 files changed, 0 insertions, 32 deletions
diff --git a/hexedit/uart.s b/hexedit/uart.s
index b845c8b..e79cbdc 100644
--- a/hexedit/uart.s
+++ b/hexedit/uart.s
@@ -31,35 +31,3 @@ uart_recv:
bne 1b
ldrb r0, [r1, UARTDR_OFST]
bx lr
-
-.type send_hex, %function
-.global send_hex
-
-send_hex:
- push {lr}
- movs r4, r0
- movs r0, '0
- bl uart_send
- movs r0, 'x
- bl uart_send
- movs r5, 8 // eight nibbles in a word
-0:
- movs r0, 28 // rotate left 4
- rors r4, r0
- movs r0, 0xF // lowest nibble mask
- ands r0, r4
- cmp r0, 0x9 // number or letter?
- bhi 1f
- adds r0, '0
- b 2f
-1:
- adds r0, ('A - 0xA)
-2:
- bl uart_send
- subs r5, 1
- bne 0b
- movs r0, '\r
- bl uart_send
- movs r0, '\n
- bl uart_send
- pop {pc}