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

📄 lcd_61.asm

📁 LCD1602的显示模块程序
💻 ASM
📖 第 1 页 / 共 3 页
字号:
// GCC for SUNPLUS u'nSP version 1.0.21-3
// Command: C:\PROGRA~1\Sunplus\UNSPID~1.0\cc1.exe C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\ccU5aaaa.i -fkeep-inline-functions -quiet -dumpbase LCD_61.c -mglobal-var-iram -gstabs -Wall -o .\Debug/LCD_61.asm
	.external __sn_func_ptr_sec

// gcc2_compiled.:

.debug
	.dw '.stabs "E:/source/LCD1602C/LCD1602_61/",0x64,0,3,',0,0,offset Ltext0,seg Ltext0,0x0d,0x0a
.code
.debug
	.dw '.stabs "E:/source/LCD1602C/LCD1602_61/LCD_61.c",0x64,0,3,',0,0,offset Ltext0,seg Ltext0,0x0d,0x0a
.code
.code
Ltext0:
.debug
	.dw '.stabs "int:t1=r1;-32768;32767;",128,0,0,0',0x0d,0x0a
.CODE
.debug
	.dw '.stabs "char:t2=r2;0;127;",128,0,0,0',0x0d,0x0a
.CODE
.debug
	.dw '.stabs "long int:t3=r3;-2147483648;2147483647;",128,0,0,0',0x0d,0x0a
.CODE
.debug
	.dw '.stabs "unsigned int:t4=r4;0;65535;",128,0,0,0',0x0d,0x0a
.CODE
.debug
	.dw '.stabs "long unsigned int:t5=r5;0;4294967295;",128,0,0,0',0x0d,0x0a
.CODE
.debug
	.dw '.stabs "long long int:t6=r6;-2147483648;2147483647;",128,0,0,0',0x0d,0x0a
.CODE
.debug
	.dw '.stabs "long long unsigned int:t7=r7;0;4294967295;",128,0,0,0',0x0d,0x0a
.CODE
.debug
	.dw '.stabs "short int:t8=r8;-32768;32767;",128,0,0,0',0x0d,0x0a
.CODE
.debug
	.dw '.stabs "short unsigned int:t9=r9;0;65535;",128,0,0,0',0x0d,0x0a
.CODE
.debug
	.dw '.stabs "signed char:t10=r10;-32768;32767;",128,0,0,0',0x0d,0x0a
.CODE
.debug
	.dw '.stabs "unsigned char:t11=r11;0;65535;",128,0,0,0',0x0d,0x0a
.CODE
.debug
	.dw '.stabs "float:t12=r1;2;0;",128,0,0,0',0x0d,0x0a
.CODE
.debug
	.dw '.stabs "double:t13=r1;2;0;",128,0,0,0',0x0d,0x0a
.CODE
.debug
	.dw '.stabs "long double:t14=r1;2;0;",128,0,0,0',0x0d,0x0a
.CODE
.debug
	.dw '.stabs "complex int:t15=s2real:1,0,16;imag:1,16,16;;",128,0,0,0',0x0d,0x0a
.CODE
.debug
	.dw '.stabs "complex float:t16=r16;2;0;",128,0,0,0',0x0d,0x0a
.CODE
.debug
	.dw '.stabs "complex double:t17=r17;2;0;",128,0,0,0',0x0d,0x0a
.CODE
.debug
	.dw '.stabs "complex long double:t18=r18;2;0;",128,0,0,0',0x0d,0x0a
.CODE
.debug
	.dw '.stabs "void:t19=19",128,0,0,0',0x0d,0x0a
.CODE
.debug
	.dw '.stabs "sys10mscounter:G4",32,0,0,',0,0,offset _sys10mscounter,seg _sys10mscounter,0x0d,0x0a
.CODE
.public _path1
.iram
_path1:
	.dw 0
	.dw 31
	.dw 0
	.dw 31
	.dw 0
	.dw 31
	.dw 0
	.dw 31
.debug
	.dw '.stabs "path1:G20=ar1;0;7;1",32,0,0,',0,0,offset _path1,seg _path1,0x0d,0x0a
.CODE
.public _path2
.iram
_path2:
	.dw 31
	.dw 0
	.dw 31
	.dw 0
	.dw 31
	.dw 0
	.dw 31
	.dw 0
.debug
	.dw '.stabs "path2:G20",32,0,0,',0,0,offset _path2,seg _path2,0x0d,0x0a
.CODE
.public _pats1
.iram
_pats1:
	.dw 21
	.dw 21
	.dw 21
	.dw 21
	.dw 21
	.dw 21
	.dw 21
	.dw 21
.debug
	.dw '.stabs "pats1:G20",32,0,0,',0,0,offset _pats1,seg _pats1,0x0d,0x0a
.CODE
.public _pats2
.iram
_pats2:
	.dw 10
	.dw 10
	.dw 10
	.dw 10
	.dw 10
	.dw 10
	.dw 10
	.dw 10
.debug
	.dw '.stabs "pats2:G20",32,0,0,',0,0,offset _pats2,seg _pats2,0x0d,0x0a
.CODE
.code
.debug
	.dw '.stabs "soft_nop:F19",36,0,0,',0,0,offset _soft_nop,seg _soft_nop,0x0d,0x0a
.CODE
.public _soft_nop
_soft_nop:	.proc
.debug
	.dw '.stabn 0x44,0,21,',0,0
	.dd LM1-_soft_nop
	.dw 0x0d,0x0a
.code
LM1:
	// total=0, vars=0
	// frame_pointer_needed: 1
	push bp to [sp]
	bp=sp+1

	R1=BP+3
.debug
	.dw '.stabn 0x44,0,21,',0,0
	.dd LM2-_soft_nop
	.dw 0x0d,0x0a
.code
LM2:
L2:

	pop bp from [sp]
	retf
	.endp	// end of soft_nop

.debug
	.dw '.stabf ',0,0
	.dd LME1-_soft_nop
	.dw 0x0d,0x0a
.code
LME1:
.code
.debug
	.dw '.stabs "soft_10ms:F19",36,0,0,',0,0,offset _soft_10ms,seg _soft_10ms,0x0d,0x0a
.CODE
.public _soft_10ms
_soft_10ms:	.proc
.debug
	.dw '.stabn 0x44,0,23,',0,0
	.dd LM3-_soft_10ms
	.dw 0x0d,0x0a
.code
LM3:
	// total=1, vars=1
	// frame_pointer_needed: 1
	push bp to [sp]
	sp-=1
	bp=sp+1

	R1=BP+4
.debug
	.dw '.stabn 0x44,0,23,',0,0
	.dd LM4-_soft_10ms
	.dw 0x0d,0x0a
.code
LM4:
LBB2:
.debug
	.dw '.stabn 0x44,0,24,',0,0
	.dd LM5-_soft_10ms
	.dw 0x0d,0x0a
.code
LM5:
	R2=0	// QImode move
	[BP]=R2	// QImode move
L4:
	R2=[BP]	// QImode move
	CMP R2,710	// QImode compare
	NSJNG L7	//QImode LE
	pc=L5	// Indirect jump
L7:
	R2=1	// QImode move
	[28690]=R2	// QImode move
L6:
	R2=[BP]	// QImode move
	R3=R2+1
	[BP]=R3	// QImode move
	pc=L4	// Indirect jump
L5:
.debug
	.dw '.stabn 0x44,0,25,',0,0
	.dd LM6-_soft_10ms
	.dw 0x0d,0x0a
.code
LM6:
LBE2:
.debug
	.dw '.stabn 0x44,0,25,',0,0
	.dd LM7-_soft_10ms
	.dw 0x0d,0x0a
.code
LM7:
L3:

	sp+=1
	pop bp from [sp]
	retf
	.endp	// end of soft_10ms

.debug
	.dw '.stabn 0xc0,0,0,',0,0
	.dd LBB2-_soft_10ms
	.dw 0x0d,0x0a
.code
.debug
	.dw '.stabs "i:1",128,0,0,0',0x0d,0x0a
.CODE
.debug
	.dw '.stabn 0xe0,0,0,',0,0
	.dd LBE2-_soft_10ms
	.dw 0x0d,0x0a
.code
.debug
	.dw '.stabf ',0,0
	.dd LME2-_soft_10ms
	.dw 0x0d,0x0a
.code
LME2:
.code
.debug
	.dw '.stabs "soft_20ms:F19",36,0,0,',0,0,offset _soft_20ms,seg _soft_20ms,0x0d,0x0a
.CODE
.public _soft_20ms
_soft_20ms:	.proc
.debug
	.dw '.stabn 0x44,0,27,',0,0
	.dd LM8-_soft_20ms
	.dw 0x0d,0x0a
.code
LM8:
	// total=1, vars=1
	// frame_pointer_needed: 1
	push bp to [sp]
	sp-=1
	bp=sp+1

	R1=BP+4
	[BP]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,27,',0,0
	.dd LM9-_soft_20ms
	.dw 0x0d,0x0a
.code
LM9:
	call _soft_10ms	// call without return value
.debug
	.dw '.stabn 0x44,0,28,',0,0
	.dd LM10-_soft_20ms
	.dw 0x0d,0x0a
.code
LM10:
	call _soft_10ms	// call without return value
.debug
	.dw '.stabn 0x44,0,29,',0,0
	.dd LM11-_soft_20ms
	.dw 0x0d,0x0a
.code
LM11:
.debug
	.dw '.stabn 0x44,0,29,',0,0
	.dd LM12-_soft_20ms
	.dw 0x0d,0x0a
.code
LM12:
L9:

	sp+=1
	pop bp from [sp]
	retf
	.endp	// end of soft_20ms

.debug
	.dw '.stabf ',0,0
	.dd LME3-_soft_20ms
	.dw 0x0d,0x0a
.code
LME3:
.code
.debug
	.dw '.stabs "hard_10ms:F19",36,0,0,',0,0,offset _hard_10ms,seg _hard_10ms,0x0d,0x0a
.CODE
.public _hard_10ms
_hard_10ms:	.proc
.debug
	.dw '.stabn 0x44,0,31,',0,0
	.dd LM13-_hard_10ms
	.dw 0x0d,0x0a
.code
LM13:
	// total=1, vars=1
	// frame_pointer_needed: 1
	push bp to [sp]
	sp-=1
	bp=sp+1

	R1=BP+4
	[BP]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,31,',0,0
	.dd LM14-_hard_10ms
	.dw 0x0d,0x0a
.code
LM14:
	R2=[BP]	// QImode move
	R1=[R2]	// QImode move
	[_sys10mscounter]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,32,',0,0
	.dd LM15-_hard_10ms
	.dw 0x0d,0x0a
.code
LM15:
L11:
	R2=[_sys10mscounter]	// QImode move
	R1=R2+(-1)
	R2=R1	// QImode move
	[_sys10mscounter]=R2	// QImode move
	CMP R2,(-1)	// QImode compare
	NSJNZ L13	//QImode NE
	pc=L12	// Indirect jump
L13:
	call _soft_10ms	// call without return value
	pc=L11	// Indirect jump
L12:
.debug
	.dw '.stabn 0x44,0,33,',0,0
	.dd LM16-_hard_10ms
	.dw 0x0d,0x0a
.code
LM16:
	R1=1	// QImode move
	[28690]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,34,',0,0
	.dd LM17-_hard_10ms
	.dw 0x0d,0x0a
.code
LM17:
.debug
	.dw '.stabn 0x44,0,34,',0,0
	.dd LM18-_hard_10ms
	.dw 0x0d,0x0a
.code
LM18:
L10:

	sp+=1
	pop bp from [sp]
	retf
	.endp	// end of hard_10ms

.debug
	.dw '.stabs "delaytime:p4",160,0,0,4',0x0d,0x0a
.CODE
.debug
	.dw '.stabf ',0,0
	.dd LME4-_hard_10ms
	.dw 0x0d,0x0a
.code
LME4:
.debug
	.dw '.stabs "lcdcounter:G4",32,0,0,',0,0,offset _lcdcounter,seg _lcdcounter,0x0d,0x0a
.CODE
.debug
	.dw '.stabs "lcdusing1:G4",32,0,0,',0,0,offset _lcdusing1,seg _lcdusing1,0x0d,0x0a
.CODE
.debug
	.dw '.stabs "lcdusing2:G4",32,0,0,',0,0,offset _lcdusing2,seg _lcdusing2,0x0d,0x0a
.CODE
.code
.debug
	.dw '.stabs "lcd_checkbusy:F4",36,0,0,',0,0,offset _lcd_checkbusy,seg _lcd_checkbusy,0x0d,0x0a
.CODE
.public _lcd_checkbusy
_lcd_checkbusy:	.proc
.debug
	.dw '.stabn 0x44,0,38,',0,0
	.dd LM19-_lcd_checkbusy
	.dw 0x0d,0x0a
.code
LM19:
	// total=2, vars=2
	// frame_pointer_needed: 1
	push bp to [sp]
	sp-=2
	bp=sp+1

	R1=BP+5
	[bp+1]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,38,',0,0
	.dd LM20-_lcd_checkbusy
	.dw 0x0d,0x0a
.code
LM20:
LBB3:
.debug
	.dw '.stabn 0x44,0,39,',0,0
	.dd LM21-_lcd_checkbusy
	.dw 0x0d,0x0a
.code
LM21:
	R1=[28673]	// QImode move
	R2=R1&(-2)
	[28673]=R2	// QImode move
.debug
	.dw '.stabn 0x44,0,40,',0,0
	.dd LM22-_lcd_checkbusy
	.dw 0x0d,0x0a
.code
LM22:
	R1=[28673]	// QImode move
	R2=R1|2
	[28673]=R2	// QImode move
.debug
	.dw '.stabn 0x44,0,41,',0,0
	.dd LM23-_lcd_checkbusy
	.dw 0x0d,0x0a
.code
LM23:
	R1=[28673]	// QImode move
	R2=R1|4
	[28673]=R2	// QImode move
.debug
	.dw '.stabn 0x44,0,42,',0,0
	.dd LM24-_lcd_checkbusy
	.dw 0x0d,0x0a
.code
LM24:
	R1=0	// QImode move
	[28679]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,43,',0,0
	.dd LM25-_lcd_checkbusy
	.dw 0x0d,0x0a
.code
LM25:
	call _soft_nop	// call without return value
.debug
	.dw '.stabn 0x44,0,44,',0,0
	.dd LM26-_lcd_checkbusy
	.dw 0x0d,0x0a
.code
LM26:
	R1=[28677]	// QImode move
	R2=R1&255
	[BP]=R2	// QImode move
.debug
	.dw '.stabn 0x44,0,45,',0,0
	.dd LM27-_lcd_checkbusy
	.dw 0x0d,0x0a
.code
LM27:
	R1=(-1)	// QImode move
	[28679]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,46,',0,0
	.dd LM28-_lcd_checkbusy
	.dw 0x0d,0x0a
.code
LM28:
	R1=[28673]	// QImode move
	R2=R1&(-5)
	[28673]=R2	// QImode move
.debug
	.dw '.stabn 0x44,0,47,',0,0
	.dd LM29-_lcd_checkbusy
	.dw 0x0d,0x0a
.code
LM29:
	R1=[BP]	// QImode move
	R2=R1&128
	R1=R2	// QImode move
	pc=L15	// Indirect jump
.debug
	.dw '.stabn 0x44,0,48,',0,0
	.dd LM30-_lcd_checkbusy
	.dw 0x0d,0x0a
.code
LM30:
LBE3:
.debug
	.dw '.stabn 0x44,0,48,',0,0
	.dd LM31-_lcd_checkbusy
	.dw 0x0d,0x0a
.code
LM31:
L15:

	sp+=2
	pop bp from [sp]
	retf
	.endp	// end of lcd_checkbusy

.debug
	.dw '.stabn 0xc0,0,0,',0,0
	.dd LBB3-_lcd_checkbusy
	.dw 0x0d,0x0a
.code
.debug
	.dw '.stabs "lcdstate:1",128,0,0,0',0x0d,0x0a
.CODE
.debug
	.dw '.stabn 0xe0,0,0,',0,0
	.dd LBE3-_lcd_checkbusy
	.dw 0x0d,0x0a
.code
.debug
	.dw '.stabf ',0,0
	.dd LME5-_lcd_checkbusy
	.dw 0x0d,0x0a
.code
LME5:
.code
.debug
	.dw '.stabs "lcd_wrcmd:F19",36,0,0,',0,0,offset _lcd_wrcmd,seg _lcd_wrcmd,0x0d,0x0a
.CODE
.public _lcd_wrcmd
_lcd_wrcmd:	.proc
.debug
	.dw '.stabn 0x44,0,50,',0,0
	.dd LM32-_lcd_wrcmd
	.dw 0x0d,0x0a
.code
LM32:
	// total=1, vars=1
	// frame_pointer_needed: 1
	push bp to [sp]
	sp-=1
	bp=sp+1

	R1=BP+4
	[BP]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,50,',0,0
	.dd LM33-_lcd_wrcmd
	.dw 0x0d,0x0a
.code
LM33:
	R1=1	// QImode move
	[_lcdusing1]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,51,',0,0
	.dd LM34-_lcd_wrcmd
	.dw 0x0d,0x0a
.code
LM34:
L17:
	call _lcd_checkbusy	// call with return value
	CMP R1,0	// QImode test
	NSJNZ L19	//QImode NE
	pc=L18	// Indirect jump
L19:
	R1=1	// QImode move
	[28690]=R1	// QImode move
	pc=L17	// Indirect jump
L18:
.debug
	.dw '.stabn 0x44,0,52,',0,0
	.dd LM35-_lcd_wrcmd
	.dw 0x0d,0x0a
.code
LM35:
	R1=[28677]	// QImode move
	R2=R1&(-256)
	[28677]=R2	// QImode move
.debug
	.dw '.stabn 0x44,0,53,',0,0
	.dd LM36-_lcd_wrcmd
	.dw 0x0d,0x0a
.code
LM36:
	R1=[28677]	// QImode move
	R2=R1	// QImode move
	R3=[BP]	// QImode move
	R2|=[R3]	// iorqi3_r0R
	[28677]=R2	// QImode move
.debug
	.dw '.stabn 0x44,0,54,',0,0
	.dd LM37-_lcd_wrcmd
	.dw 0x0d,0x0a
.code
LM37:
	R1=[28673]	// QImode move
	R2=R1&(-2)
	[28673]=R2	// QImode move
.debug
	.dw '.stabn 0x44,0,55,',0,0
	.dd LM38-_lcd_wrcmd
	.dw 0x0d,0x0a
.code
LM38:
	R1=[28673]	// QImode move
	R2=R1&(-3)
	[28673]=R2	// QImode move
.debug
	.dw '.stabn 0x44,0,56,',0,0
	.dd LM39-_lcd_wrcmd
	.dw 0x0d,0x0a
.code
LM39:
	R1=[28673]	// QImode move
	R2=R1|4
	[28673]=R2	// QImode move
.debug
	.dw '.stabn 0x44,0,57,',0,0
	.dd LM40-_lcd_wrcmd
	.dw 0x0d,0x0a
.code
LM40:
	call _soft_nop	// call without return value
.debug
	.dw '.stabn 0x44,0,58,',0,0
	.dd LM41-_lcd_wrcmd
	.dw 0x0d,0x0a
.code
LM41:
	R1=[28673]	// QImode move
	R2=R1&(-5)
	[28673]=R2	// QImode move
.debug
	.dw '.stabn 0x44,0,59,',0,0
	.dd LM42-_lcd_wrcmd
	.dw 0x0d,0x0a
.code
LM42:
	R1=[28677]	// QImode move
	R2=R1|255
	[28677]=R2	// QImode move
.debug
	.dw '.stabn 0x44,0,60,',0,0
	.dd LM43-_lcd_wrcmd
	.dw 0x0d,0x0a
.code
LM43:
	R1=0	// QImode move
	[_lcdusing1]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,61,',0,0
	.dd LM44-_lcd_wrcmd
	.dw 0x0d,0x0a
.code
LM44:
.debug
	.dw '.stabn 0x44,0,61,',0,0
	.dd LM45-_lcd_wrcmd
	.dw 0x0d,0x0a
.code
LM45:
L16:

	sp+=1
	pop bp from [sp]
	retf
	.endp	// end of lcd_wrcmd

.debug
	.dw '.stabs "lcdcmd:p4",160,0,0,4',0x0d,0x0a
.CODE
.debug
	.dw '.stabf ',0,0
	.dd LME6-_lcd_wrcmd
	.dw 0x0d,0x0a
.code
LME6:
.code
.debug
	.dw '.stabs "lcd_moveto:F19",36,0,0,',0,0,offset _lcd_moveto,seg _lcd_moveto,0x0d,0x0a
.CODE
.public _lcd_moveto
_lcd_moveto:	.proc
.debug
	.dw '.stabn 0x44,0,63,',0,0

⌨️ 快捷键说明

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