Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * tabladecolores.asm
- *
- * Created: 15-Nov-17 19:48:48
- * Author: davil
- */
- .include "M2560def.inc"
- .dseg
- TABLA_COLORES_RAM: .BYTE 64
- .cseg
- SETUP_CARGAR_TABLA_RAM: .DEF COUNT_REG = R16
- .DEF RW_REG = R17
- TABLA_COLORES_FLASH: .DB 0,5,5,5,2,2,5,5,2,2,2,5,2,2,2,5,3,5,5,5,2,3,5,5,2,2,5,5,2,2,2,5,6,3,3,3,3,3,3,3,2,2,0,5,2,2,2,5,6,6,6,4,4,4,4,4,4,4,1,1,1,1,1,7
- LDI COUNT_REG,64
- LDI ZL,LOW(TABLA_COLORES_FLASH*2)
- LDI ZH,HIGH(TABLA_COLORES_FLASH*2)
- LDI YL,LOW(TABLA_COLORES_RAM)
- LDI YH,HIGH(TABLA_COLORES_RAM)
- RJMP CARGAR_TABLA_RAM
- CARGAR_TABLA_RAM: CPI COUNT_REG,0
- BREQ TERMINAR
- LPM RW_REG,Z+
- ST Y+,RW_REG
- DEC COUNT_REG
- RJMP CARGAR_TABLA_RAM
- TERMINAR: RJMP TERMINAR
- SETUP_MAPEAR_FREC: .EQU MAX_FREC = 0
- .EQU MIN_FREC = 65000
- .EQU A = (MAX_FREC - MIN_FREC)/4
- .EQU B = (MAX_FREC - MIN_FREC)/2
- .EQU C = (MAX_FREC - MIN_FREC)/4*3
- ;.EQU MIN_FREC_RED =
- ;.EQU MAX_FREC_RED =
- ;.EQU MIN_FREC_GREEN =
- ;.EQU MAX_FREC_GREEN =
- ;.EQU MIN_FREC_BLUE =
- ;.EQU MAX_FREC_BLUE =
- .DEF REG_FRECL = R16 ;COLORL
- .DEF REG_FRECH = R17 ;COLORH
- .DEF REG_R = R18
- .DEF REG_G = R19
- .DEF REG_B = R20
- .DEF REG_RGB = R21
- RJMP MAPEAR_FREC
- MAPEAR_FREC:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement