From 113e399ff15417e74358698847efd8f6d30c5d32 Mon Sep 17 00:00:00 2001 From: Tat-Chee Wan (USM) Date: Thu, 24 Mar 2011 11:15:40 +0800 Subject: ascii2hex_varlen_be should not autoincrement buffer pointer --- Debugger/debug_comm.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Debugger/debug_comm.S b/Debugger/debug_comm.S index af02d16..4d41e24 100644 --- a/Debugger/debug_comm.S +++ b/Debugger/debug_comm.S @@ -331,12 +331,13 @@ ascii2hex_varlen_be: mov r3, #CMD_REG_REGPARAMLEN /* Set max count to 8 (Max Register size) */ mov r1, r0 /* Use R1 as ASCII buffer pointer */ mov r2, #0 /* Initialize Cummulative Results */ -2: ldrb r0, [r1], #1 /* Load ASCII char for Hex Value */ +2: ldrb r0, [r1] /* Load ASCII char for Hex Value */ bl char2hex /* on return, hex value in R0, -1 for error */ cmp r0, #-1 beq _exit_ascii2hex_varlen orr r2, r0, r2, lsl #4 /* combined byte value */ subs r3, r3, #1 /* Decrement Counter */ + add r1, r1, #1 /* Go to next char slot */ bne 2b _exit_ascii2hex_varlen: mov r0, r2 /* Return results in R0 */ -- cgit v1.2.3