Fun LED stuff
Dependencies: LCD_DISCO_F429ZI mbed TS_DISCO_F429ZI BSP_DISCO_F429ZI
Program3_F20_Leong.s@0:e579c6f35abf, 2020-11-15 (annotated)
- Committer:
- kkleong
- Date:
- Sun Nov 15 21:53:52 2020 +0000
- Revision:
- 0:e579c6f35abf
- Child:
- 2:1be4e7457636
Error with quads
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
kkleong | 0:e579c6f35abf | 1 | AREA Program3, CODE, READONLY |
kkleong | 0:e579c6f35abf | 2 | GLOBAL getQuad |
kkleong | 0:e579c6f35abf | 3 | ; uint32_t getQuad ( uint16_t x, uint16_t y) |
kkleong | 0:e579c6f35abf | 4 | getQuad CMP R0, #125 |
kkleong | 0:e579c6f35abf | 5 | MOVLT R0, #1 |
kkleong | 0:e579c6f35abf | 6 | MOVGT R0, #2 |
kkleong | 0:e579c6f35abf | 7 | CMP R1, #160 |
kkleong | 0:e579c6f35abf | 8 | ADDGT R0, R0, #2 |
kkleong | 0:e579c6f35abf | 9 | BX LR |
kkleong | 0:e579c6f35abf | 10 | |
kkleong | 0:e579c6f35abf | 11 | GLOBAL swapRedBlue |
kkleong | 0:e579c6f35abf | 12 | ; uint32_t swapRedBlue ( uint32_t color) |
kkleong | 0:e579c6f35abf | 13 | swapRedBlue MOV R1, R0 |
kkleong | 0:e579c6f35abf | 14 | MOV R2, R0 |
kkleong | 0:e579c6f35abf | 15 | MOV R3, R0 |
kkleong | 0:e579c6f35abf | 16 | MOV R4, R0 |
kkleong | 0:e579c6f35abf | 17 | |
kkleong | 0:e579c6f35abf | 18 | LSL R1, R1, #24 |
kkleong | 0:e579c6f35abf | 19 | LSR R1, R1, #8 |
kkleong | 0:e579c6f35abf | 20 | |
kkleong | 0:e579c6f35abf | 21 | LSL R2, R2, #8 |
kkleong | 0:e579c6f35abf | 22 | LSR R2, R2, #24 |
kkleong | 0:e579c6f35abf | 23 | |
kkleong | 0:e579c6f35abf | 24 | LSR R3, R3, #24 |
kkleong | 0:e579c6f35abf | 25 | LSL R3, R3, #24 |
kkleong | 0:e579c6f35abf | 26 | |
kkleong | 0:e579c6f35abf | 27 | LSL R4, R4, #16 |
kkleong | 0:e579c6f35abf | 28 | LSR R4, R4, #24 |
kkleong | 0:e579c6f35abf | 29 | LSL R4, R4, #8 |
kkleong | 0:e579c6f35abf | 30 | |
kkleong | 0:e579c6f35abf | 31 | ORR R5, R1, R2 |
kkleong | 0:e579c6f35abf | 32 | ORR R6, R3, R4 |
kkleong | 0:e579c6f35abf | 33 | ORR R0, R5, R6 |
kkleong | 0:e579c6f35abf | 34 | BX LR |
kkleong | 0:e579c6f35abf | 35 | |
kkleong | 0:e579c6f35abf | 36 | GLOBAL toggleAlphaMSB |
kkleong | 0:e579c6f35abf | 37 | ; uint32_t toggleAlphaMSB ( uint32_t color) |
kkleong | 0:e579c6f35abf | 38 | toggleAlphaMSB MVN R1, R0 |
kkleong | 0:e579c6f35abf | 39 | LSR R1, R1, #24 |
kkleong | 0:e579c6f35abf | 40 | LSL R1, R1, #24 |
kkleong | 0:e579c6f35abf | 41 | LSL R0, R0, #8 |
kkleong | 0:e579c6f35abf | 42 | LSR R0, R0, #8 |
kkleong | 0:e579c6f35abf | 43 | ORR R0, R0, R1 |
kkleong | 0:e579c6f35abf | 44 | |
kkleong | 0:e579c6f35abf | 45 | BX LR |
kkleong | 0:e579c6f35abf | 46 | |
kkleong | 0:e579c6f35abf | 47 | GLOBAL rotateRGBBytes |
kkleong | 0:e579c6f35abf | 48 | ; uint32_t rotateRGBBytes ( uint32_t color) |
kkleong | 0:e579c6f35abf | 49 | rotateRGBBytes |
kkleong | 0:e579c6f35abf | 50 | BX LR |
kkleong | 0:e579c6f35abf | 51 | |
kkleong | 0:e579c6f35abf | 52 | GLOBAL setRGBBits |
kkleong | 0:e579c6f35abf | 53 | ; uint32_t setRGBBits ( uint32_t color, uint8_t n) |
kkleong | 0:e579c6f35abf | 54 | setRGBBits |
kkleong | 0:e579c6f35abf | 55 | BX LR |
kkleong | 0:e579c6f35abf | 56 | |
kkleong | 0:e579c6f35abf | 57 | |
kkleong | 0:e579c6f35abf | 58 | END |