X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=flashloaders%2Fstm32lx.s;fp=flashloaders%2Fstm32lx.s;h=bb8f7c93f6ad77b703b3aa25a59f4eb5f131e5ee;hb=e43a737c3c9ffe56045181b306509c942fd9998a;hp=764594d9ceb9eef761ad6a9afcebefe0b6893821;hpb=907383da8ef95fedc630cdf7cf102d44ae229200;p=fw%2Fstlink diff --git a/flashloaders/stm32lx.s b/flashloaders/stm32lx.s index 764594d..bb8f7c9 100644 --- a/flashloaders/stm32lx.s +++ b/flashloaders/stm32lx.s @@ -39,22 +39,20 @@ r2 - count */ - // Set 0 to r3 - movs r3, #0 // Go to compare - b.n test_done + b test_done write_word: // Load one word from address in r0, increment by 4 ldr.w ip, [r0], #4 // Store the word to address in r1, increment by 4 str.w ip, [r1], #4 - // Increment r3 - adds r3, #1 + // Decrement r2 + subs r2, #1 test_done: - // Compare r3 and r2 - cmp r3, r2 + // Test r2 + cmp r2, #0 // Loop if not zero bcc.n write_word