Permalink
Browse files

make memcpy_rev work for non-multiples of 16

  • Loading branch information...
1 parent 384263e commit b9561c631d2cf7f5f5b7bc12f5d029573e3a9643 @fhars committed Apr 20, 2012
Showing with 11 additions and 2 deletions.
  1. +10 −0 debugexamples.dasm16
  2. +1 −2 kernel.dasm16
View
10 debugexamples.dasm16
@@ -100,6 +100,16 @@
JSR scroll_down
SET PC, crash
:cr_2
+ IFN A, 3
+ SET PC, cr_3
+ SET A, [_pc_vidbase]
+ SET B, A
+ ADD B, 23
+ SET C, 12
+ JSR memcpy_rev
+ SET PC, crash
+
+:cr_3
IFN A, 0
JSR printchar
SET B, I
View
3 kernel.dasm16
@@ -566,10 +566,9 @@
ADD SP, C
AND C, 0x0f
+ SUB B, C
XOR C, 0x0f
ADD C, 1
- ADD B, 16
- SUB B, C
SHL C, 1
ADD PC, C
:_pc_memcpy_r_loop

0 comments on commit b9561c6

Please sign in to comment.