Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: LCD_DISCO_F429ZI mbed TS_DISCO_F429ZI BSP_DISCO_F429ZI
Diff: RotateRight.S
- Revision:
- 0:9c65f066245c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/RotateRight.S Tue Dec 07 07:20:04 2021 +0000
@@ -0,0 +1,43 @@
+ AREA R, CODE, READONLY
+ GLOBAL rotate
+
+ ; uint32_t alphaC(uint32_t *)
+rotate
+
+ PUSH {R4,R5,R6}
+ LDR R3,[R0]; color value
+
+ LDR R0, =0x000000FF
+ LDR R1, =0x0000FF00
+ LDR R2, =0x00FF0000
+
+
+ AND R4, R3, R0
+ AND R5, R3, R1
+ AND R6, R3, R2
+
+ BIC R3, R3, R0
+ BIC R3, R3, R1
+ BIC R3, R3, R2
+
+
+
+ LSL R4, R4, #16
+ LSR R5, R5, #8
+ LSR R6, R6, #8
+
+
+ ADD R3, R3, R4
+ ADD R3, R3, R5
+ ADD R3, R3, R6
+ MOV R0, R3
+
+ POP {R4,R5,R6}
+
+
+
+
+ BX LR
+
+
+ END
\ No newline at end of file