aboutsummaryrefslogtreecommitdiff
path: root/hexedit/uart.s
diff options
context:
space:
mode:
authorJacques Comeaux <jacquesrcomeaux@protonmail.com>2024-05-26 14:21:59 -0500
committerJacques Comeaux <jacquesrcomeaux@protonmail.com>2024-05-26 14:21:59 -0500
commit5bbad5026cb810f61c2466d5c4bf3438ba820842 (patch)
tree1fa99f91c1af046d812485ac52abf7b83eb2acdc /hexedit/uart.s
parent7388c270069c2d1418539bca1d2789a6d468ecc2 (diff)
Finish hexedit and update README
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}