📄 menu.s
字号:
xcall _GUI_HLine
.dbline 260
; }
L69:
.dbline 262
;
; return(1);
ldi R16,1
.dbline -2
L63:
adiw R28,5
xcall pop_gset4
.dbline 0 ; func end
ret
.dbsym r yy 10 c
.dbsym r xx 20 c
.dbsym r mwin 22 pX
.dbsym r men 12 pX
.dbend
.area lit(rom, con, rel)
_button_ok::
.byte 7,255
.byte 255,255
.byte 255,240
.byte 0,24
.byte 0,0
.byte 0,0
.byte 12,0
.byte 32,0
.byte 0,0
.byte 0,2
.byte 0,64
.byte 0,14
.byte 'v,0
.byte 1,0
.byte 128,0
.byte 17,36
.byte 0,0
.byte 128,128
.byte 0,17
.byte 40,0
.byte 0,128
.byte 128,0
.byte 17,48
.byte 0,0
.byte 128,128
.byte 0,17
.byte 40,0
.byte 0,128
.byte 128,0
.byte 17,40
.byte 0,0
.byte 128,128
.byte 0,17
.byte 36,0
.byte 0,128
.byte 64,0
.byte 14,'v
.byte 0,1
.byte 0,32
.byte 0,0
.byte 0,0
.byte 2,0
.byte 24,0
.byte 0,0
.byte 0,12
.byte 0,7
.byte 255,255
.byte 255,255
.byte 240,0
.dbsym e button_ok _button_ok A[98:98]kc
_button_ok1::
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,7
.byte 255,255
.byte 255,255
.byte 240,0
.byte 31,255
.byte 255,255
.byte 255,252
.byte 0,63
.byte 255,241
.byte 137,255
.byte 254,0
.byte 127,255
.byte 238,219
.byte 255,255
.byte 0,127
.byte 255,238
.byte 215,255
.byte 255,0
.byte 127,255
.byte 238,207
.byte 255,255
.byte 0,127
.byte 255,238
.byte 215,255
.byte 255,0
.byte 127,255
.byte 238,215
.byte 255,255
.byte 0,127
.byte 255,238
.byte 219,255
.byte 255,0
.byte 63,255
.byte 241,137
.byte 255,254
.byte 0,31
.byte 255,255
.byte 255,255
.byte 252,0
.byte 7,255
.byte 255,255
.byte 255,240
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.dbsym e button_ok1 _button_ok1 A[98:98]kc
_button_cancle::
.byte 7,255
.byte 255,255
.byte 255,240
.byte 0,24
.byte 0,0
.byte 0,0
.byte 12,0
.byte 32,0
.byte 0,0
.byte 0,2
.byte 0,64
.byte 240,0
.byte 0,7
.byte 1,0
.byte 129,16
.byte 0,0
.byte 1,0
.byte 128,129
.byte 0,0
.byte 0,1
.byte 0,128
.byte 129,1
.byte 158,28
.byte 'a,0
.byte 128,129
.byte 2,'I
.byte 36,145
.byte 0,128
.byte 129,1
.byte 201,32
.byte 241,0
.byte 128,129
.byte 18,'I
.byte 32,129
.byte 0,128
.byte 64,225
.byte 253,156
.byte 'w,193
.byte 0,32
.byte 0,0
.byte 0,0
.byte 2,0
.byte 24,0
.byte 0,0
.byte 0,12
.byte 0,7
.byte 255,255
.byte 255,255
.byte 240,0
.dbsym e button_cancle _button_cancle A[98:98]kc
_button_cancle1::
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,7
.byte 255,255
.byte 255,255
.byte 240,0
.byte 31,255
.byte 255,255
.byte 255,252
.byte 0,63
.byte 15,255
.byte 255,248
.byte 254,0
.byte 126,239
.byte 255,255
.byte 254,255
.byte 0,126
.byte 255,255
.byte 255,254
.byte 255,0
.byte 126,254
.byte 'a,227
.byte 158,255
.byte 0,126
.byte 253,182
.byte 219,'n
.byte 255,0
.byte 126,254
.byte 54,223
.byte 14,255
.byte 0,126
.byte 237,182
.byte 223,126
.byte 255,0
.byte 63,30
.byte 2,'c
.byte 136,62
.byte 0,31
.byte 255,255
.byte 255,255
.byte 252,0
.byte 7,255
.byte 255,255
.byte 255,240
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.dbsym e button_cancle1 _button_cancle1 A[98:98]kc
.area text(rom, con, rel)
.dbfile G:\IccPro\mega128_lcd\ZLG_GUI\menu.c
.dbfunc e GUI_Button49x14 _GUI_Button49x14 fV
; dat -> y+10
; y -> R22,R23
; x -> R20,R21
.even
_GUI_Button49x14::
xcall push_gset2
movw R22,R18
movw R20,R16
sbiw R28,6
.dbline -1
.dbline 346
; }
; #endif
;
;
;
;
; #if GUI_MenuIco_EN==1
;
; /*-- 调入了一幅图像:C:\WINDOWS\Desktop\OK.bmp --*/
; /*-- 宽度x高度=49x14 --*/
; /*-- 宽度不是8的倍数,现调整为:宽度x高度=56x14 --*/
; uint8 const button_ok[] =
; {
; 0x07,0xFF,0xFF,0xFF,0xFF,0xF0,0x00,0x18,0x00,0x00,0x00,0x00,0x0C,0x00,0x20,0x00,
; 0x00,0x00,0x00,0x02,0x00,0x40,0x00,0x0E,0x76,0x00,0x01,0x00,0x80,0x00,0x11,0x24,
; 0x00,0x00,0x80,0x80,0x00,0x11,0x28,0x00,0x00,0x80,0x80,0x00,0x11,0x30,0x00,0x00,
; 0x80,0x80,0x00,0x11,0x28,0x00,0x00,0x80,0x80,0x00,0x11,0x28,0x00,0x00,0x80,0x80,
; 0x00,0x11,0x24,0x00,0x00,0x80,0x40,0x00,0x0E,0x76,0x00,0x01,0x00,0x20,0x00,0x00,
; 0x00,0x00,0x02,0x00,0x18,0x00,0x00,0x00,0x00,0x0C,0x00,0x07,0xFF,0xFF,0xFF,0xFF,
; 0xF0,0x00
; };
;
;
;
; /*-- 调入了一幅图像:C:\WINDOWS\Desktop\OK1.bmp --*/
; /*-- 宽度x高度=49x14 --*/
; /*-- 宽度不是8的倍数,现调整为:宽度x高度=56x14 --*/
; uint8 const button_ok1[] =
; {
; 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xFF,0xFF,0xFF,0xFF,0xF0,0x00,0x1F,0xFF,
; 0xFF,0xFF,0xFF,0xFC,0x00,0x3F,0xFF,0xF1,0x89,0xFF,0xFE,0x00,0x7F,0xFF,0xEE,0xDB,
; 0xFF,0xFF,0x00,0x7F,0xFF,0xEE,0xD7,0xFF,0xFF,0x00,0x7F,0xFF,0xEE,0xCF,0xFF,0xFF,
; 0x00,0x7F,0xFF,0xEE,0xD7,0xFF,0xFF,0x00,0x7F,0xFF,0xEE,0xD7,0xFF,0xFF,0x00,0x7F,
; 0xFF,0xEE,0xDB,0xFF,0xFF,0x00,0x3F,0xFF,0xF1,0x89,0xFF,0xFE,0x00,0x1F,0xFF,0xFF,
; 0xFF,0xFF,0xFC,0x00,0x07,0xFF,0xFF,0xFF,0xFF,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,
; 0x00,0x00
; };
;
;
;
; /*-- 调入了一幅图像:C:\WINDOWS\Desktop\Cancle.bmp --*/
; /*-- 宽度x高度=49x14 --*/
; /*-- 宽度不是8的倍数,现调整为:宽度x高度=56x14 --*/
; uint8 const button_cancle[] =
; {
; 0x07,0xFF,0xFF,0xFF,0xFF,0xF0,0x00,0x18,0x00,0x00,0x00,0x00,0x0C,0x00,0x20,0x00,
; 0x00,0x00,0x00,0x02,0x00,0x40,0xF0,0x00,0x00,0x07,0x01,0x00,0x81,0x10,0x00,0x00,
; 0x01,0x00,0x80,0x81,0x00,0x00,0x00,0x01,0x00,0x80,0x81,0x01,0x9E,0x1C,0x61,0x00,
; 0x80,0x81,0x02,0x49,0x24,0x91,0x00,0x80,0x81,0x01,0xC9,0x20,0xF1,0x00,0x80,0x81,
; 0x12,0x49,0x20,0x81,0x00,0x80,0x40,0xE1,0xFD,0x9C,0x77,0xC1,0x00,0x20,0x00,0x00,
; 0x00,0x00,0x02,0x00,0x18,0x00,0x00,0x00,0x00,0x0C,0x00,0x07,0xFF,0xFF,0xFF,0xFF,
; 0xF0,0x00
; };
;
;
;
;
; /*-- 调入了一幅图像:C:\WINDOWS\Desktop\Cancle1.bmp --*/
; /*-- 宽度x高度=49x14 --*/
; /*-- 宽度不是8的倍数,现调整为:宽度x高度=56x14 --*/
; uint8 const button_cancle1[] =
; {
; 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xFF,0xFF,0xFF,0xFF,0xF0,0x00,0x1F,0xFF,
; 0xFF,0xFF,0xFF,0xFC,0x00,0x3F,0x0F,0xFF,0xFF,0xF8,0xFE,0x00,0x7E,0xEF,0xFF,0xFF,
; 0xFE,0xFF,0x00,0x7E,0xFF,0xFF,0xFF,0xFE,0xFF,0x00,0x7E,0xFE,0x61,0xE3,0x9E,0xFF,
; 0x00,0x7E,0xFD,0xB6,0xDB,0x6E,0xFF,0x00,0x7E,0xFE,0x36,0xDF,0x0E,0xFF,0x00,0x7E,
; 0xED,0xB6,0xDF,0x7E,0xFF,0x00,0x3F,0x1E,0x02,0x63,0x88,0x3E,0x00,0x1F,0xFF,0xFF,
; 0xFF,0xFF,0xFC,0x00,0x07,0xFF,0xFF,0xFF,0xFF,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,
; 0x00,0x00
; };
;
;
;
;
; /****************************************************************************
; * 名称:GUI_Button49x14()
; * 功能:显示49*14按钮。
; * 入口参数: x 指定显示位置,x坐标
; * y 指定显示位置,y坐标
; * dat 显示的数据地址
; * 出口参数:无
; ****************************************************************************/
; void GUI_Button49x14(uint32 x, uint32 y, uint8 *dat)
; { GUI_LoadPic(x, y, (uint8 *)dat, 49, 14);
.dbline 346
ldi R24,14
ldi R25,0
std y+5,R25
std y+4,R24
ldi R24,49
std y+3,R25
std y+2,R24
ldd R0,y+10
ldd R1,y+11
std y+1,R1
std y+0,R0
movw R18,R22
movw R16,R20
xcall _GUI_LoadPic
.dbline -2
L74:
adiw R28,6
xcall pop_gset2
.dbline 0 ; func end
ret
.dbsym l dat 10 pc
.dbsym r y 22 i
.dbsym r x 20 i
.dbend
.dbfunc e GUI_Button_OK _GUI_Button_OK fV
; y -> R22,R23
; x -> R20,R21
.even
_GUI_Button_OK::
xcall push_gset2
movw R22,R18
movw R20,R16
sbiw R28,6
.dbline -1
.dbline 359
; }
;
;
;
; /****************************************************************************
; * 名称:GUI_Button_OK()
; * 功能:显示49*14按钮"OK"。
; * 入口参数: x 指定显示位置,x坐标
; * y 指定显示位置,y坐标
; * 出口参数:无
; ****************************************************************************/
; void GUI_Button_OK(uint32 x, uint32 y)
; { GUI_LoadPic(x, y, (uint8 *) button_ok, 49, 14);
.dbline 359
ldi R24,14
ldi R25,0
std y+5,R25
std y+4,R24
ldi R24,49
std y+3,R25
std y+2,R24
ldi R24,<_button_ok
ldi R25,>_button_ok
std y+1,R25
std y+0,R24
movw R18,R22
movw R16,R20
xcall _GUI_LoadPic
.dbline -2
L75:
adiw R28,6
xcall pop_gset2
.dbline 0 ; func end
ret
.dbsym r y 22 i
.dbsym r x 20 i
.dbend
.dbfunc e GUI_Button_OK1 _GUI_Button_OK1 fV
; y -> R22,R23
; x -> R20,R21
.even
_GUI_Button_OK1::
xcall push_gset2
movw R22,R18
movw R20,R16
sbiw R28,6
.dbline -1
.dbline 371
; }
;
;
; /****************************************************************************
; * 名称:GUI_Button_OK1()
; * 功能:显示49*14按钮,选择状态的"OK"。
; * 入口参数: x 指定显示位置,x坐标
; * y 指定显示位置,y坐标
; * 出口参数:无
; ****************************************************************************/
; void GUI_Button_OK1(uint32 x, uint32 y)
; { GUI_LoadPic(x, y, (uint8 *) button_ok1, 49, 14);
.dbline 371
ldi R24,14
ldi R25,0
std y+5,R25
std y+4,R24
ldi R24,49
std y+3,R25
std y+2,R24
ldi R24,<_button_ok1
ldi R25,>_button_ok1
std y+1,R25
std y+0,R24
movw R18,R22
movw R16,R20
xcall _GUI_LoadPic
.dbline -2
L76:
adiw R28,6
xcall pop_gset2
.dbline 0 ; func end
ret
.dbsym r y 22 i
.dbsym r x 20 i
.dbend
.dbfunc e GUI_Button_Cancle _GUI_Button_Cancle fV
; y -> R22,R23
; x -> R20,R21
.even
_GUI_Button_Cancle::
xcall push_gset2
movw R22,R18
movw R20,R16
sbiw R28,6
.dbline -1
.dbline 383
; }
;
;
; /****************************************************************************
; * 名称:GUI_Button_Cancle()
; * 功能:显示49*14按钮"Cancle"。
; * 入口参数: x 指定显示位置,x坐标
; * y 指定显示位置,y坐标
; * 出口参数:无
; ****************************************************************************/
; void GUI_Button_Cancle(uint32 x, uint32 y)
; { GUI_LoadPic(x, y, (uint8 *) button_cancle, 49, 14);
.dbline 383
ldi R24,14
ldi R25,0
std y+5,R25
std y+4,R24
ldi R24,49
std y+3,R25
std y+2,R24
ldi R24,<_button_cancle
ldi R25,>_button_cancle
std y+1,R25
std y+0,R24
movw R18,R22
movw R16,R20
xcall _GUI_LoadPic
.dbline -2
L77:
adiw R28,6
xcall pop_gset2
.dbline 0 ; func end
ret
.dbsym r y 22 i
.dbsym r x 20 i
.dbend
.dbfunc e GUI_Button_Cancle1 _GUI_Button_Cancle1 fV
; y -> R22,R23
; x -> R20,R21
.even
_GUI_Button_Cancle1::
xcall push_gset2
movw R22,R18
movw R20,R16
sbiw R28,6
.dbline -1
.dbline 395
; }
;
;
; /****************************************************************************
; * 名称:GUI_Button_Cancle1()
; * 功能:显示49*14按钮,选择状态的"Cancle"。
; * 入口参数: x 指定显示位置,x坐标
; * y 指定显示位置,y坐标
; * 出口参数:无
; ****************************************************************************/
; void GUI_Button_Cancle1(uint32 x, uint32 y)
; { GUI_LoadPic(x, y, (uint8 *) button_cancle1, 49, 14);
.dbline 395
ldi R24,14
ldi R25,0
std y+5,R25
std y+4,R24
ldi R24,49
std y+3,R25
std y+2,R24
ldi R24,<_button_cancle1
ldi R25,>_button_cancle1
std y+1,R25
std y+0,R24
movw R18,R22
movw R16,R20
xcall _GUI_LoadPic
.dbline -2
L78:
adiw R28,6
xcall pop_gset2
.dbline 0 ; func end
ret
.dbsym r y 22 i
.dbsym r x 20 i
.dbend
.dbfunc e GUI_MenuIcoDraw _GUI_MenuIcoDraw fc
; ico -> R20,R21
.even
_GUI_MenuIcoDraw::
xcall push_gset1
movw R20,R16
sbiw R28,6
.dbline -1
.dbline 407
; }
;
;
;
; /****************************************************************************
; * 名称:GUI_MenuIcoDraw()
; * 功能:显示图标菜单。
; * 入口参数:ico 图标菜单句柄
; * 出口参数:返回0表示操作失败,返回1表示操作成功
; ****************************************************************************/
; uint8 GUI_MenuIcoDraw(MENUICO *ico)
; {
.dbline 409
movw R30,R20
ldd R2,z+0
ldd R3,z+1
movw R24,R2
cpi R24,5
ldi R30,0
cpc R25,R30
brlo L82
ldi R24,203
ldi R25,0
cp R24,R2
cpc R25,R3
brsh L80
L82:
.dbline 409
; /* 参数过滤 */
; if( ( (ico->x)<5 ) || ( (ico->x)>(GUI_LCM_XMAX-37 ) ) ) return(0); // 显示起始地址判断
clr R16
xjmp L79
L80:
.dbline 410
movw R30,R20
ldd R2,z+4
ldd R3,z+5
tst R2
brne X4
tst R3
breq L85
X4:
movw R30,R20
ldd R2,z+6
ldd R3,z+7
tst R2
brne L83
tst R3
brne L83
X5:
L85:
.dbline 410
; if( ( (ico->icodat)==NULL ) || ( (ico->title)==NULL ) ) return(0); // 显示数据内容判断
clr R16
xjmp L79
L83:
.dbline 412
;
; GUI_LoadPic(ico->x, ico->y, (uint8 *) ico->icodat, 32, 32); // 显示ICO图
ldi R24,32
ldi R25,0
std y+5,R25
std y+4,R24
std y+3,R25
std y+2,R24
movw R30,R20
ldd R2,z+4
ldd R3,z+5
std y+1,R3
std y+0,R2
movw R30,R20
ldd R18,z+2
ldd R19,z+3
movw R30,R20
ldd R16,z+0
ldd R17,z+1
xcall _GUI_LoadPic
.dbline 413
; GUI_HLine(ico->x-5, ico->y+32, ico->x+37, back_color); // 显示一空行
lds R2,_back_color
std y+2,R2
movw R30,R20
ldd R2,z+0
ldd R3,z+1
movw R24,R2
adiw R24,37
std y+1,R25
std y+0,R24
ldd R18,z+2
ldd R19,z+3
subi R18,224 ; offset = 32
sbci R19,255
movw R16,R2
subi R16,5
sbci R17,0
xcall _GUI_HLine
.dbline 414
; if( (ico->state)==0 )
movw R30,R20
ldd R2,z+8
tst R2
brne L86
.dbline 415
; { GUI_LoadPic(ico->x-5, ico->y+33, (uint8 *) ico->title, 42, 13);
.dbline 415
ldi R24,13
ldi R25,0
std y+5,R25
std y+4,R24
ldi R24,42
std y+3,R25
std y+2,R24
movw R30,R20
ldd R2,z+6
ldd R3,z+7
std y+1,R3
std y+0,R2
movw R30,R20
ldd R18,z+2
ldd R19,z+3
subi R18,223 ; offset = 33
sbci R19,255
movw R30,R20
ldd R16,z+0
ldd R17,z+1
subi R16,5
sbci R17,0
xcall _GUI_LoadPic
.dbline 416
; }
xjmp L87
L86:
.dbline 418
; else
; { GUI_LoadPic1(ico->x-5, ico->y+33, (uint8 *) ico->title, 42, 13);
.dbline 418
ldi R24,13
ldi R25,0
std y+5,R25
std y+4,R24
ldi R24,42
std y+3,R25
std y+2,R24
movw R30,R20
ldd R2,z+6
ldd R3,z+7
std y+1,R3
std y+0,R2
movw R30,R20
ldd R18,z+2
ldd R19,z+3
subi R18,223 ; offset = 33
sbci R19,255
movw R30,R20
ldd R16,z+0
ldd R17,z+1
subi R16,5
sbci R17,0
xcall _GUI_LoadPic1
.dbline 419
; }
L87:
.dbline 421
;
; return(1);
ldi R16,1
.dbline -2
L79:
adiw R28,6
xcall pop_gset1
.dbline 0 ; func end
ret
.dbsym r ico 20 pX
.dbend
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -