summaryrefslogtreecommitdiff
path: root/AT91SAM7S256/armdebug/Debugger/debug_macros.h
diff options
context:
space:
mode:
authorTC Wan2010-12-23 18:32:16 +0800
committerTC Wan2010-12-23 18:32:16 +0800
commit2ce74d88a2a894799dfb025e92806c61c5dd9612 (patch)
tree1c53d2b62e0ca58719813970259eaec90baa496b /AT91SAM7S256/armdebug/Debugger/debug_macros.h
parent60c29d8cd77da30a72b3bbdab4472ad2ff987836 (diff)
parentc351d60d912c121b3c4e22b8b53e5d946bb5f748 (diff)
Merge branch 'master' of ssh://svc.cs.usm.my/~/gitrepo-bare/armdebug
Diffstat (limited to 'AT91SAM7S256/armdebug/Debugger/debug_macros.h')
-rw-r--r--AT91SAM7S256/armdebug/Debugger/debug_macros.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/AT91SAM7S256/armdebug/Debugger/debug_macros.h b/AT91SAM7S256/armdebug/Debugger/debug_macros.h
index 416022e..f66e42c 100644
--- a/AT91SAM7S256/armdebug/Debugger/debug_macros.h
+++ b/AT91SAM7S256/armdebug/Debugger/debug_macros.h
@@ -91,6 +91,23 @@
sub \deststrptr, \deststrptr, #1 /* Adjust Destination string pointer to point at NULL character */
.endm
+/* _dbg_memcpy
+ * _dbg_stpcpy macro
+ * On entry:
+ * deststrptr: Destination string [Cannot be R0]
+ * sourcestrptr: Source string [Cannot be R0]
+ * sizereg: Number of bytes to copy [Cannot be R0]
+ * On exit:
+ * deststrptr: Pointer to NULL character in destination string
+ * R0: destroyed
+ */
+ .macro _dbg_memcpy deststrptr, sourcestrptr, sizereg
+1: ldrb r0, [\sourcestrptr], #1
+ strb r0, [\deststrptr], #1
+ subs \sizereg, \sizereg, #1
+ bne 1b
+ .endm
+
/* _dbg_outputMsgValidResponse
* Return Message with valid response ('+$')
* On exit: