📄 main.s
字号:
.module main.c
.area data(ram, con, rel)
_Time_flag::
.blkb 1
.area idata
.byte 0
.area data(ram, con, rel)
.dbfile F:\Relations\sf6_system\measure\LCDtest\main.c
.dbsym e Time_flag _Time_flag c
_stop_flag::
.blkb 1
.area idata
.byte 0
.area data(ram, con, rel)
.dbfile F:\Relations\sf6_system\measure\LCDtest\main.c
.dbsym e stop_flag _stop_flag c
_count::
.blkb 1
.area idata
.byte 0
.area data(ram, con, rel)
.dbfile F:\Relations\sf6_system\measure\LCDtest\main.c
.dbsym e count _count c
.area lit(rom, con, rel)
_Color_Set::
.byte 0,3
.byte 28,31
.byte 224,227
.byte 252,255
.dbsym e Color_Set _Color_Set A[8:8]kc
_Color::
.word 5
.byte 5
.word 100
.word 100
.byte 100
.byte 100
.byte 224
.word L1
.word L1
.byte 224
.byte 0
.byte 255
.word 220
.byte 140
.word 100
.word 100
.byte 100
.byte 100
.byte 224
.word L1
.word L1
.byte 224
.byte 0
.byte 255
.dbstruct 0 17 Command
.dbfield 0 x i
.dbfield 2 y c
.dbfield 3 width i
.dbfield 5 width_e i
.dbfield 7 lenth c
.dbfield 8 lenth_e c
.dbfield 9 color c
.dbfield 10 str pc
.dbfield 12 english pc
.dbfield 14 string_color c
.dbfield 15 font c
.dbfield 16 cursor_color c
.dbend
.dbsym e Color _Color A[34:2]kS[Command]
_Backlight::
.word 80
.byte 2
.word 45
.word 45
.byte 24
.byte 24
.byte 151
.word L2
.word L2
.byte 224
.byte 0
.byte 255
.word 80
.byte 50
.word 45
.word 45
.byte 24
.byte 24
.byte 151
.word L3
.word L3
.byte 224
.byte 0
.byte 255
.word 80
.byte 100
.word 45
.word 45
.byte 24
.byte 24
.byte 151
.word L4
.word L4
.byte 224
.byte 0
.byte 255
.word 80
.byte 150
.word 45
.word 45
.byte 24
.byte 24
.byte 151
.word L5
.word L5
.byte 224
.byte 0
.byte 255
.dbsym e Backlight _Backlight A[68:4]kS[Command]
_Start::
.word 1
.byte 71
.word 45
.word 45
.byte 24
.byte 24
.byte 151
.word L6
.word L6
.byte 224
.byte 0
.byte 255
.word 215
.byte 215
.word 74
.word 74
.byte 24
.byte 24
.byte 255
.word L1
.word L1
.byte 224
.byte 0
.byte 255
.word 1
.byte 1
.word 45
.word 45
.byte 24
.byte 24
.byte 151
.word L7
.word L7
.byte 224
.byte 0
.byte 255
.word 1
.byte 36
.word 45
.word 45
.byte 24
.byte 24
.byte 151
.word L8
.word L8
.byte 224
.byte 0
.byte 255
.word 1
.byte 200
.word 74
.word 74
.byte 24
.byte 24
.byte 151
.word L9
.word L9
.byte 224
.byte 0
.byte 255
.word 1
.byte 106
.word 74
.word 74
.byte 24
.byte 24
.byte 151
.word L10
.word L10
.byte 224
.byte 0
.byte 255
.word 90
.byte 200
.word 74
.word 74
.byte 24
.byte 24
.byte 151
.word L11
.word L11
.byte 224
.byte 0
.byte 255
.dbsym e Start _Start A[119:7]kS[Command]
_TimeSet::
.word 100
.byte 50
.word 42
.word 42
.byte 26
.byte 26
.byte 255
.word L12
.word L1
.byte 0
.byte 0
.byte 255
.word 164
.byte 50
.word 42
.word 42
.byte 26
.byte 26
.byte 255
.word L12
.word L1
.byte 0
.byte 0
.byte 255
.word 228
.byte 50
.word 40
.word 40
.byte 26
.byte 26
.byte 255
.word L12
.word L1
.byte 0
.byte 0
.byte 255
.word 100
.byte 100
.word 42
.word 42
.byte 26
.byte 26
.byte 255
.word L12
.word L1
.byte 0
.byte 0
.byte 255
.word 164
.byte 100
.word 42
.word 42
.byte 26
.byte 26
.byte 255
.word L12
.word L1
.byte 0
.byte 0
.byte 255
.word 228
.byte 100
.word 42
.word 42
.byte 26
.byte 26
.byte 255
.word L12
.word L1
.byte 0
.byte 0
.byte 255
.word 150
.byte 200
.word 42
.word 30
.byte 26
.byte 26
.byte 28
.word L13
.word L14
.byte 0
.byte 0
.byte 255
.word 1
.byte 200
.word 70
.word 70
.byte 39
.byte 39
.byte 3
.word L15
.word L15
.byte 224
.byte 1
.byte 3
.dbsym e TimeSet _TimeSet A[136:8]kS[Command]
.area text(rom, con, rel)
.dbfile F:\Relations\sf6_system\measure\LCDtest\main.c
.dbfunc e Init_interrupt _Init_interrupt fV
.even
_Init_interrupt::
.dbline -1
.dbline 321
; #include <iom128v.h>
; #include <stdio.h>
; #include <macros.h>
; #include "lcd.h"
; #include "touch.h"
; #include "display.h"
; #include "rtc.h"
; #define BLACK 0x00
; #define BLUE 0x03
; #define GREEN 0x1C
; #define CYAN 0x1F
; #define RED 0xE0
; #define PURPLE 0xE3
; #define YELLOW 0xFC
; #define WHITE 0xFF
; //extern unsigned char Batter_flag ;
; extern unsigned char input_buffer[10];
;
; extern void Input_Data(void);
; //extern void Init_Adc(void);
; unsigned char time_temp[15];
; unsigned char Time_flag = 0;
; unsigned char stop_flag = 0;
; unsigned char Color_Count;
; unsigned char count=0;
; unsigned char const Color_Set[] = {
; BLACK,BLUE,GREEN,CYAN,RED,PURPLE,YELLOW,WHITE,
; };
; //unsigned char ADC_ch = 0;//ADC 通道选择位
; #define Color_size 2
; struct Command const Color[] = {
; {
; 5,5,100,100,100,100,RED,"","",RED,SMALL,WHITE,
; },
; {
; 220,140,100,100,100,100,RED,"","",RED,SMALL,WHITE,
; },
; };
;
; #define Backlight_size 4
; struct Command const Backlight[] = {
; { 80,
; 2,
; 45,
; 45,
; 24,
; 24,
; 0x97,
; "增加",
; "增加",
; RED,
; SMALL,
; WHITE,
; },
;
;
; {//2
; 80,
; 50,
; 45,
; 45,
; 24,
; 24,
; 0x97,
; "减少",
; "减少",
; RED,
; SMALL,
; WHITE,
; },
; {//3
; 80,
; 100,
; 45,
; 45,
; 24,
; 24,
; 0x97,
; "关闭",
; "关闭",
; RED,
; SMALL,
; WHITE,
; },
; {//3
; 80,
; 150,
; 45,
; 45,
; 24,
; 24,
; 0x97,
; "返回",
; "返回",
; RED,
; SMALL,
; WHITE,
; },
; };
;
; #define Start_size 7
; struct Command const Start[]={
; { 1,
; 71,
; 45,
; 45,
; 24,
; 24,
; 0x97,
; "GoOn",
; "GoOn",
; RED,
; SMALL,
; WHITE,
; },
; { //时间1
; 215,
; 215,
; 74,
; 74,
; 24,
; 24,
; WHITE,
; "",
; "",
; RED,
; SMALL,
; WHITE,
; },
;
; {//2
; 1,
; 1,
; 45,
; 45,
; 24,
; 24,
; 0x97,
; "AUTO",
; "AUTO",
; RED,
; SMALL,
; WHITE,
; },
; {//3
; 1,
; 36,
; 45,
; 45,
; 24,
; 24,
; 0x97,
; "STOP",
; "STOP",
; RED,
; SMALL,
; WHITE,
; },
; {//4
; 1,
; 200,
; 74,
; 74,
; 24,
; 24,
; 0x97,
; "时间设定",
; "时间设定",
; RED,
; SMALL,
; WHITE,
; },
; {
; 1,
; 106,
; 74,
; 74,
; 24,
; 24,
; 0x97,
; "颜色测试",
; "颜色测试",
; RED,
; SMALL,
; WHITE,
; },
; {//4
; 90,
; 200,
; 74,
; 74,
; 24,
; 24,
; 0x97,
; "背光测试",
; "背光测试",
; RED,
; SMALL,
; WHITE,
; },
; };
;
; #define TimeSet_size 8
; struct Command const TimeSet[] = {
; {
; 100,//显示起点X坐标
; 50,//显示起点Y坐标
; 42,//显示宽度
; 42,
; 26,//显示长度
; 26,
; WHITE,//显示着色
; " ",//显示内容
; "",
; BLACK,//字体颜色
; SMALL,//字体大小
; WHITE,//光标颜色
; },
; {
; 164,//显示起点X坐标
; 50,//显示起点Y坐标
; 42,//显示宽度
; 42,
; 26,//显示长度
; 26,
; WHITE,//显示着色
; " ",//显示内容
; "",
; BLACK,//字体颜色
; SMALL,//字体大小
; WHITE,//光标颜色
; },
; {
; 228,//显示起点X坐标
; 50,//显示起点Y坐标
; 40,//显示宽度
; 40,
; 26,//显示长度
; 26,
; WHITE,//显示着色
; " ",//显示内容
; "",
; BLACK,//字体颜色
; SMALL,//字体大小
; WHITE,//光标颜色
; },
; {
; 100,//显示起点X坐标
; 100,//显示起点Y坐标
; 42,//显示宽度
; 42,
; 26,//显示长度
; 26,
; WHITE,//显示着色
; " ",//显示内容
; "",
; BLACK,//字体颜色
; SMALL,//字体大小
; WHITE,//光标颜色
; },
; {
; 164,//显示起点X坐标
; 100,//显示起点Y坐标
; 42,//显示宽度
; 42,
; 26,//显示长度
; 26,
; WHITE,//显示着色
; " ",//显示内容
; "",
; BLACK,//字体颜色
; SMALL,//字体大小
; WHITE,//光标颜色
; },
; {
; 228,//显示起点X坐标
; 100,//显示起点Y坐标
; 42,//显示宽度
; 42,
; 26,//显示长度
; 26,
; WHITE,//显示着色
; " ",//显示内容
; "",
; BLACK,//字体颜色
; SMALL,//字体大小
; WHITE,//光标颜色
; },
; {
; 150,//显示起点X坐标
; 200,//显示起点Y坐标
; 42,//显示宽度
; 30,
; 26,//显示长度
; 26,
; GREEN,//显示着色
; "确认",//显示内容
; "OK",
; BLACK,//字体颜色
; SMALL,//字体大小
; WHITE,//光标颜色
; },
; {
; 1,//显示起点X坐标
; 200,//显示起点Y坐标
; 70,//显示宽度
; 70,
; 39,//显示长度
; 39,
; BLUE,//显示着色
; "BACK",//显示内容
; "BACK",
; RED,//字体颜色
; BIG,//字体大小
; BLUE,//光标颜色
; },
; };
;
;
; void Init_interrupt(void)
; {
.dbline 322
; CLI();
cli
.dbline 324
; //MCUCR = 0x00;
; EICRB = 0x02;
ldi R24,2
out 0x3a,R24
.dbline 325
; SEI();
sei
.dbline -2
L16:
.dbline 0 ; func end
ret
.dbend
.dbfunc e Screen_Color _Screen_Color fV
; i -> R20
; color -> R22
.even
_Screen_Color::
xcall push_gset2
mov R22,R16
sbiw R28,24
.dbline -1
.dbline 328
; }
; void Screen_Color(unsigned char color)
; {
.dbline 329
; unsigned char i = color;
mov R20,R22
.dbline 330
; for(i=color;i<=255;i++)
xjmp L21
L18:
.dbline 331
; {
.dbline 332
; Dis_Rect(100,0,219,170,i);
std y+4,R20
ldi R24,170
std y+2,R24
ldi R24,219
ldi R25,0
std y+1,R25
std y+0,R24
clr R18
ldi R16,100
ldi R17,0
xcall _Dis_Rect
.dbline 333
; Dis_Int(160,190,i,0,BLACK,WHITE);
ldi R24,255
std y+6,R24
clr R2
std y+4,R2
std y+2,R2
mov R2,R20
clr R3
std y+1,R3
std y+0,R2
ldi R18,190
ldi R16,160
ldi R17,0
xcall _Dis_Int
.dbline 334
; Delayx10ms(40);
ldi R16,40
ldi R17,0
xcall _Delayx10ms
.dbline 336
; //if(i==255)i=0;
; if(GetCursor(Start[3]))
ldi R24,<_Start+51
ldi R25,>_Start+51
movw R30,R28
adiw R30,7
ldi R16,17
ldi R17,0
st -y,R31
st -y,R30
st -y,R25
st -y,R24
xcall asgncblk
movw R16,R28
subi R16,249 ; offset = 7
sbci R17,255
xcall _GetCursor
tst R16
breq L22
.dbline 337
; {
.dbline 338
; Color_Count = i+1;
mov R24,R20
subi R24,255 ; addi 1
sts _Color_Count,R24
.dbline 339
; break;
xjmp L20
L22:
.dbline 341
L19:
.dbline 330
inc R20
L21:
.dbline 330
ldi R24,255
cp R24,R20
brsh L18
L20:
.dbline -2
L17:
adiw R28,24
xcall pop_gset2
.dbline 0 ; func end
ret
.dbsym r i 20 c
.dbsym r color 22 c
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -