refactor names, 2
This commit is contained in:
parent
75598f973a
commit
2435cee771
2
colors.S
2
colors.S
@ -3,9 +3,9 @@
|
|||||||
.section ".rodata","a"
|
.section ".rodata","a"
|
||||||
screendata_tmpl:
|
screendata_tmpl:
|
||||||
.global screendata_tmpl
|
.global screendata_tmpl
|
||||||
.byte _violet
|
|
||||||
.byte _off
|
.byte _off
|
||||||
.byte _off
|
.byte _off
|
||||||
|
.byte _green
|
||||||
screendataend_tmpl:
|
screendataend_tmpl:
|
||||||
.byte 0xff
|
.byte 0xff
|
||||||
|
|
||||||
|
12
main.S
12
main.S
@ -9,6 +9,8 @@
|
|||||||
|
|
||||||
|
|
||||||
#define SIGNAL_REGISTER r4
|
#define SIGNAL_REGISTER r4
|
||||||
|
#define DATA_NEXT_REGISTER r7
|
||||||
|
#define DATA_END_REGISTER r8
|
||||||
|
|
||||||
.section ".data"
|
.section ".data"
|
||||||
screendata:
|
screendata:
|
||||||
@ -81,9 +83,9 @@ init:
|
|||||||
mov.b #0x01, SIGNAL_REGISTER
|
mov.b #0x01, SIGNAL_REGISTER
|
||||||
|
|
||||||
;; screen data start/next into r7
|
;; screen data start/next into r7
|
||||||
mov.w #screendata, r7
|
mov.w #screendata, DATA_NEXT_REGISTER
|
||||||
;; screen data end into r8
|
;; screen data end into r8
|
||||||
mov.w #screendataend, r8
|
mov.w #screendataend, DATA_END_REGISTER
|
||||||
|
|
||||||
;; start timer in up mode
|
;; start timer in up mode
|
||||||
bis.w #MC0,&TA1CTL
|
bis.w #MC0,&TA1CTL
|
||||||
@ -97,12 +99,12 @@ init:
|
|||||||
;; r5: data byte to be handled by isr
|
;; r5: data byte to be handled by isr
|
||||||
mainloop:
|
mainloop:
|
||||||
;; prepare next byte to handle by isr
|
;; prepare next byte to handle by isr
|
||||||
cmp.w r7,r8
|
cmp.w DATA_NEXT_REGISTER, DATA_END_REGISTER
|
||||||
jz mainloop_data_done
|
jz mainloop_data_done
|
||||||
|
|
||||||
;; load next data byte
|
;; load next data byte
|
||||||
mov.b @r7,r9
|
mov.b @DATA_NEXT_REGISTER,r9
|
||||||
inc.w r7
|
inc.w DATA_NEXT_REGISTER
|
||||||
|
|
||||||
;; multiple color code by four to get color data
|
;; multiple color code by four to get color data
|
||||||
rla.b r9
|
rla.b r9
|
||||||
|
Reference in New Issue
Block a user