⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.s

📁 ICCAVR编写128*64液晶程序测试已经通过
💻 S
字号:
	.module main.c
	.area text(rom, con, rel)
	.dbfile C:\DOCUME~1\Administrator\桌面\12864-ICC\main.c
	.dbfunc e main _main fV
	.even
_main::
	sbiw R28,13
	.dbline -1
	.dbline 12
; #include <iom16v.h>
; #include "lcd.h"
; #include "gui.h"
; 
; void delay_nms(unsigned int n);
; 
; 
; //-----------------------------------------------------------
; //主函数
; //-----------------------------------------------------------
; void main(void)
; {
	.dbline 15
;    //unsigned char  j=0;
; 
;    LCD_Init();
	xcall _LCD_Init
	.dbline 16
;    LCD_clr();                     //显示清屏
	xcall _LCD_clr
	.dbline 17
;    delay_nms(1); 
	ldi R16,1
	ldi R17,0
	xcall _delay_nms
	.dbline 19
; //GUI绘图演示
;    GUI_Rectangle(0, 0, GUI_LCM_XMAX-1, GUI_LCM_YMAX-1, 1);
	ldi R24,1
	std y+4,R24
	ldi R24,63
	std y+2,R24
	ldi R24,127
	ldi R25,0
	std y+1,R25
	std y+0,R24
	clr R18
	clr R16
	clr R17
	xcall _GUI_Rectangle
	.dbline 21
; 
;    GUI_Rectangle(60, 5, 123, 59, 1);
	ldi R24,1
	std y+4,R24
	ldi R24,59
	std y+2,R24
	ldi R24,123
	ldi R25,0
	std y+1,R25
	std y+0,R24
	ldi R18,5
	ldi R16,60
	ldi R17,0
	xcall _GUI_Rectangle
	.dbline 22
;    GUI_HLine(60, 13, 123, 1);
	ldi R24,1
	std y+2,R24
	ldi R24,123
	ldi R25,0
	std y+1,R25
	std y+0,R24
	ldi R18,13
	ldi R16,60
	ldi R17,0
	xcall _GUI_HLine
	.dbline 23
;    GUI_RLine(68, 5, 13, 1);
	ldi R24,1
	std y+2,R24
	ldi R24,13
	std y+0,R24
	ldi R18,5
	ldi R16,68
	ldi R17,0
	xcall _GUI_RLine
	.dbline 24
;    GUI_Line(60, 5, 68, 13, 1);
	ldi R24,1
	std y+12,R24
	ldi R20,13
	ldi R21,0
	ldi R22,0
	ldi R23,0
	std y+8,R20
	std y+9,R21
	std y+10,R22
	std y+11,R23
	ldi R20,68
	ldi R21,0
	ldi R22,0
	ldi R23,0
	std y+4,R20
	std y+5,R21
	std y+6,R22
	std y+7,R23
	ldi R20,5
	ldi R21,0
	ldi R22,0
	ldi R23,0
	std y+0,R20
	std y+1,R21
	std y+2,R22
	std y+3,R23
	ldi R16,60
	ldi R17,0
	ldi R18,0
	ldi R19,0
	xcall _GUI_Line
	.dbline 25
;    GUI_Line(60, 13, 68, 5, 1);
	ldi R24,1
	std y+12,R24
	ldi R20,5
	ldi R21,0
	ldi R22,0
	ldi R23,0
	std y+8,R20
	std y+9,R21
	std y+10,R22
	std y+11,R23
	ldi R20,68
	ldi R21,0
	ldi R22,0
	ldi R23,0
	std y+4,R20
	std y+5,R21
	std y+6,R22
	std y+7,R23
	ldi R20,13
	ldi R21,0
	ldi R22,0
	ldi R23,0
	std y+0,R20
	std y+1,R21
	std y+2,R22
	std y+3,R23
	ldi R16,60
	ldi R17,0
	ldi R18,0
	ldi R19,0
	xcall _GUI_Line
	.dbline 27
; 
;    GUI_Circle(20, 20, 15, 1);
	ldi R24,1
	std y+8,R24
	ldi R20,15
	ldi R21,0
	ldi R22,0
	ldi R23,0
	std y+4,R20
	std y+5,R21
	std y+6,R22
	std y+7,R23
	ldi R20,20
	ldi R21,0
	ldi R22,0
	ldi R23,0
	std y+0,R20
	std y+1,R21
	std y+2,R22
	std y+3,R23
	ldi R16,20
	ldi R17,0
	ldi R18,0
	ldi R19,0
	xcall _GUI_Circle
	.dbline 28
;    GUI_CircleFill(20, 40, 15, 1);
	ldi R24,1
	std y+8,R24
	ldi R20,15
	ldi R21,0
	ldi R22,0
	ldi R23,0
	std y+4,R20
	std y+5,R21
	std y+6,R22
	std y+7,R23
	ldi R20,40
	ldi R21,0
	ldi R22,0
	ldi R23,0
	std y+0,R20
	std y+1,R21
	std y+2,R22
	std y+3,R23
	ldi R16,20
	ldi R17,0
	ldi R18,0
	ldi R19,0
	xcall _GUI_CircleFill
	xjmp L4
L3:
	.dbline 31
	.dbline 32
	ldi R24,1
	std y+4,R24
	ldi R24,63
	std y+2,R24
	ldi R24,127
	ldi R25,0
	std y+1,R25
	std y+0,R24
	clr R18
	clr R16
	clr R17
	xcall _GUI_Rectangle
	.dbline 33
	ldi R16,500
	ldi R17,1
	xcall _delay_nms
	.dbline 34
L4:
	.dbline 30
	xjmp L3
X0:
	.dbline -2
L2:
	adiw R28,13
	.dbline 0 ; func end
	ret
	.dbend

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -