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

📄 main.asm

📁 单片机开发的数字电压表,带保护提示功能,精确度比较高
💻 ASM
📖 第 1 页 / 共 5 页
字号:
// 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\cc4Kaaaa.i -fkeep-inline-functions -quiet -dumpbase main.c -mglobal-var-iram -gstabs -o .\Debug/main.asm
	.external __sn_func_ptr_sec

// gcc2_compiled.:

.debug
	.dw '.stabs "F:/ex12_VoltageMeasureFrom0To3/",0x64,0,3,',0,0,offset Ltext0,seg Ltext0,0x0d,0x0a
.code
.debug
	.dw '.stabs "F:/ex12_VoltageMeasureFrom0To3/main.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 "VolValude:T20=s29VolValudeA:21=ar1;0;19;4,0,320;\\",128,0,0,0',0x0d,0x0a
	.DW '.stabs "LCD:22=ar1;0;4;4,320,80;VolTureValudeA:12,400,32;\\",128,0,0,0',0x0d,0x0a
	.DW '.stabs "VolTureValudeB:12,432,32;;",128,0,0,0',0x0d,0x0a
.CODE
.text
LC0:
	.str '0', '.', 0
	// length = 3
LC1:
	.str '1', '.', 0
	// length = 3
LC2:
	.str '2', '.', 0
	// length = 3
LC3:
	.str '3', '.', 0
	// length = 3
LC4:
	.str ' ', ' ', '0', 0
	// length = 4
LC5:
	.str ' ', ' ', '1', 0
	// length = 4
LC6:
	.str ' ', ' ', '2', 0
	// length = 4
LC7:
	.str ' ', ' ', '3', 0
	// length = 4
LC8:
	.str ' ', ' ', '4', 0
	// length = 4
LC9:
	.str ' ', ' ', '5', 0
	// length = 4
LC10:
	.str ' ', ' ', '6', 0
	// length = 4
LC11:
	.str ' ', ' ', '7', 0
	// length = 4
LC12:
	.str ' ', ' ', '8', 0
	// length = 4
LC13:
	.str ' ', ' ', '9', 0
	// length = 4
LC14:
	.str ' ', ' ', ' ', '0', 0
	// length = 5
LC15:
	.str ' ', ' ', ' ', '1', 0
	// length = 5
LC16:
	.str ' ', ' ', ' ', '2', 0
	// length = 5
LC17:
	.str ' ', ' ', ' ', '3', 0
	// length = 5
LC18:
	.str ' ', ' ', ' ', '4', 0
	// length = 5
LC19:
	.str ' ', ' ', ' ', '5', 0
	// length = 5
LC20:
	.str ' ', ' ', ' ', '6', 0
	// length = 5
LC21:
	.str ' ', ' ', ' ', '7', 0
	// length = 5
LC22:
	.str ' ', ' ', ' ', '8', 0
	// length = 5
LC23:
	.str ' ', ' ', ' ', '9', 0
	// length = 5
LC24:
	.str ' ', ' ', ' ', ' ', '0', 0
	// length = 6
LC25:
	.str ' ', ' ', ' ', ' ', '1', 0
	// length = 6
LC26:
	.str ' ', ' ', ' ', ' ', '2', 0
	// length = 6
LC27:
	.str ' ', ' ', ' ', ' ', '3', 0
	// length = 6
LC28:
	.str ' ', ' ', ' ', ' ', '4', 0
	// length = 6
LC29:
	.str ' ', ' ', ' ', ' ', '5', 0
	// length = 6
LC30:
	.str ' ', ' ', ' ', ' ', '6', 0
	// length = 6
LC31:
	.str ' ', ' ', ' ', ' ', '7', 0
	// length = 6
LC32:
	.str ' ', ' ', ' ', ' ', '8', 0
	// length = 6
LC33:
	.str ' ', ' ', ' ', ' ', '9', 0
	// length = 6
LC34:
	.str ' ', ' ', ' ', ' ', ' ', '0', 'V', 0
	// length = 8
LC35:
	.str ' ', ' ', ' ', ' ', ' ', '1', 'V', 0
	// length = 8
LC36:
	.str ' ', ' ', ' ', ' ', ' ', '2', 'V', 0
	// length = 8
LC37:
	.str ' ', ' ', ' ', ' ', ' ', '3', 'V', 0
	// length = 8
LC38:
	.str ' ', ' ', ' ', ' ', ' ', '4', 'V', 0
	// length = 8
LC39:
	.str ' ', ' ', ' ', ' ', ' ', '5', 'V', 0
	// length = 8
LC40:
	.str ' ', ' ', ' ', ' ', ' ', '6', 'V', 0
	// length = 8
LC41:
	.str ' ', ' ', ' ', ' ', ' ', '7', 'V', 0
	// length = 8
LC42:
	.str ' ', ' ', ' ', ' ', ' ', '8', 'V', 0
	// length = 8
LC43:
	.str ' ', ' ', ' ', ' ', ' ', '9', 'V', 0
	// length = 8
.code
.debug
	.dw '.stabs "main:F1",36,0,0,',0,0,offset _main,seg _main,0x0d,0x0a
.CODE
.public _main
_main:	.proc
.debug
	.dw '.stabn 0x44,0,63,',0,0
	.dd LM1-_main
	.dw 0x0d,0x0a
.code
LM1:
	// total=71, vars=71
	// frame_pointer_needed: 1
	push bp to [sp]
	sp-=71
	bp=sp+1

	R1=BP+74
	[bp+44]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,64,',0,0
	.dd LM2-_main
	.dw 0x0d,0x0a
.code
LM2:
LBB2:
	R1=0	// QImode move
	[BP]=R1	// QImode move
	R1=BP	// QImode move
	R2=BP+1
	R1=0	// QImode move
	R3=R2	// QImode move
	[R3]=R1	// QImode move
	R1=BP	// QImode move
	R2=BP+2
	R1=0	// QImode move
	R4=R2	// QImode move
	[R4]=R1	// QImode move
	R1=BP	// QImode move
	R2=BP+5
	R1=0	// QImode move
	R3=R2	// QImode move
	[R3]=R1	// QImode move
	R1=BP	// QImode move
	R2=BP+6
	R1=1	// QImode move
	R4=R2	// QImode move
	[R4]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,66,',0,0
	.dd LM3-_main
	.dw 0x0d,0x0a
.code
LM3:
	R1=BP	// QImode move
	R2=BP+9
	R1=0	// QImode move
	R3=R2	// QImode move
	[R3]=R1	// QImode move
	R1=BP	// QImode move
	R2=BP+10
	R1=0	// QImode move
	R4=R2	// QImode move
	[R4]=R1	// QImode move
	R1=BP	// QImode move
	R2=BP+11
	R1=0	// QImode move
	R3=R2	// QImode move
	[R3]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,71,',0,0
	.dd LM4-_main
	.dw 0x0d,0x0a
.code
LM4:
	R1=0	// QImode move
	[SP--]=R1	// QImode move
	R1=0	// QImode move
	[SP--]=R1	// QImode move
	R1=1	// QImode move
	[SP--]=R1	// QImode move
	R1=1	// QImode move
	[SP--]=R1	// QImode move
	R1=9	// QImode move
	[SP--]=R1	// QImode move
	call _Set_IOB_Bit	// call with return value
	SP = SP + 5	//SP
.debug
	.dw '.stabn 0x44,0,72,',0,0
	.dd LM5-_main
	.dw 0x0d,0x0a
.code
LM5:
	R1=BP	// QImode move
	R2=BP+15
	R1=R2	// QImode move
	R2=R2+27
	R3=0	// HFmode immediate to register move
	R4=16608
	R1=R2	// QImode move
	[R1++]=R3	// [RD]=RS HFmode, RD!=RS+1
	[R1--]=R4
.debug
	.dw '.stabn 0x44,0,73,',0,0
	.dd LM6-_main
	.dw 0x0d,0x0a
.code
LM6:
	call _Init_sys	// call with return value
.debug
	.dw '.stabn 0x44,0,74,',0,0
	.dd LM7-_main
	.dw 0x0d,0x0a
.code
LM7:
	call _FG_InitGraphic	// call with return value
.debug
	.dw '.stabn 0x44,0,75,',0,0
	.dd LM8-_main
	.dw 0x0d,0x0a
.code
LM8:
	R1=0	// QImode move
	[SP--]=R1	// QImode move
	call _FG_SetLineStyle	// call with return value
	SP = SP + 1	//SP
.debug
	.dw '.stabn 0x44,0,76,',0,0
	.dd LM9-_main
	.dw 0x0d,0x0a
.code
LM9:
	R1=0	// QImode move
	[SP--]=R1	// QImode move
	call _FG_SetBMPMode	// call with return value
	SP = SP + 1	//SP
.debug
	.dw '.stabn 0x44,0,77,',0,0
	.dd LM10-_main
	.dw 0x0d,0x0a
.code
LM10:
	R1=0	// QImode move
	[SP--]=R1	// QImode move
	call _FG_ClearScreen	// call with return value
	SP = SP + 1	//SP
.debug
	.dw '.stabn 0x44,0,78,',0,0
	.dd LM11-_main
	.dw 0x0d,0x0a
.code
LM11:
	R1=64	// QImode move
	[SP--]=R1	// QImode move
	R1=127	// QImode move
	[SP--]=R1	// QImode move
	R1=_dance8	// QImode move
	[SP--]=R1	// QImode move
	call _FG_PutBitmap	// call with return value
	SP = SP + 3	//SP
.debug
	.dw '.stabn 0x44,0,79,',0,0
	.dd LM12-_main
	.dw 0x0d,0x0a
.code
LM12:
	R1=3	// QImode move
	[SP--]=R1	// QImode move
	call _FG_SetLineStyle	// call with return value
	SP = SP + 1	//SP
.debug
	.dw '.stabn 0x44,0,80,',0,0
	.dd LM13-_main
	.dw 0x0d,0x0a
.code
LM13:
	R1=BP	// QImode move
	R2=BP+7
	R3=0	// HFmode immediate to register move
	R4=0
	R1=R2	// QImode move
	[R1++]=R3	// [RD]=RS HFmode, RD!=RS+1
	[R1--]=R4
.debug
	.dw '.stabn 0x44,0,82,',0,0
	.dd LM14-_main
	.dw 0x0d,0x0a
.code
LM14:
L3:
	pc=L5	// Indirect jump
	pc=L4	// Indirect jump
L5:
.debug
	.dw '.stabn 0x44,0,85,',0,0
	.dd LM15-_main
	.dw 0x0d,0x0a
.code
LM15:
LBB3:
	R1=0	// QImode move
	[28714]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,86,',0,0
	.dd LM16-_main
	.dw 0x0d,0x0a
.code
LM16:
	R1=259	// QImode move
	[28693]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,87,',0,0
	.dd LM17-_main
	.dw 0x0d,0x0a
.code
LM17:
	R1=BP	// QImode move
	R2=BP+12
	R1=[28716]	// QImode move
	R3=R2	// QImode move
	[R3]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,88,',0,0
	.dd LM18-_main
	.dw 0x0d,0x0a
.code
LM18:
L6:
	R2=[28715]	// QImode move
	R1=R2&(-32768)
	CMP R1,0	// QImode test
	NSJZ L8	//QImode EQ
	pc=L7	// Indirect jump
L8:
	pc=L6	// Indirect jump
L7:
.debug
	.dw '.stabn 0x44,0,89,',0,0
	.dd LM19-_main
	.dw 0x0d,0x0a
.code
LM19:
	R1=1	// QImode move
	[28715]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,91,',0,0
	.dd LM20-_main
	.dw 0x0d,0x0a
.code
LM20:
	call _AD	// call with return value
	R2=BP	// QImode move
	R3=BP+12
	R4=R3	// QImode move
	[R4]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,92,',0,0
	.dd LM21-_main
	.dw 0x0d,0x0a
.code
LM21:
	R1=BP	// QImode move
	R2=BP+1
	R1=0	// QImode move
	R3=R2	// QImode move
	[R3]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,93,',0,0
	.dd LM22-_main
	.dw 0x0d,0x0a
.code
LM22:
	R1=1	// QImode move
	[SP--]=R1	// QImode move
	R1=1	// QImode move
	[SP--]=R1	// QImode move
	R1=1	// QImode move
	[SP--]=R1	// QImode move
	R1=0	// QImode move
	[SP--]=R1	// QImode move
	R1=0	// QImode move
	[SP--]=R1	// QImode move
	call _Set_IOA_Bit	// call with return value
	SP = SP + 5	//SP
.debug
	.dw '.stabn 0x44,0,94,',0,0
	.dd LM23-_main
	.dw 0x0d,0x0a
.code
LM23:
	R1=0	// QImode move
	[BP]=R1	// QImode move
L9:
	R1=[BP]	// QImode move
	CMP R1,19	// QImode compare
	NSJNG L12	//QImode LE
	pc=L10	// Indirect jump
L12:
.debug
	.dw '.stabn 0x44,0,96,',0,0
	.dd LM24-_main
	.dw 0x0d,0x0a
.code
LM24:
	R1=1	// QImode move
	[28690]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,97,',0,0
	.dd LM25-_main
	.dw 0x0d,0x0a
.code
LM25:
	call _AD	// call with return value
	R2=BP	// QImode move
	R3=BP+12
	R4=R3	// QImode move
	[R4]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,98,',0,0
	.dd LM26-_main
	.dw 0x0d,0x0a
.code
LM26:
	R2=BP	// QImode move
	R1=BP+15
	R2=BP	// QImode move
	R3=BP+1
	R4=R3	// QImode move
	R2=[R4]	// QImode move
	R1 = R1 + R2	//addqi3
	R2=BP	// QImode move
	R3=BP+12
	R4=R3	// QImode move
	R2=[R4]	// QImode move
	R3=R1	// QImode move
	[R3]=R2	// QImode move
.debug
	.dw '.stabn 0x44,0,99,',0,0
	.dd LM27-_main
	.dw 0x0d,0x0a
.code
LM27:
	R1=BP	// QImode move
	R2=BP+1
	R3=BP	// QImode move
	R1=BP+1
	R2=BP	// QImode move
	R3=BP+1
	R4=R3	// QImode move
	R2=[R4]	// QImode move
	R3=R2+1
	R2=R1	// QImode move
	[R2]=R3	// QImode move
.debug
	.dw '.stabn 0x44,0,94,',0,0
	.dd LM28-_main
	.dw 0x0d,0x0a
.code
LM28:
L11:
	R1=[BP]	// QImode move
	R2=R1+1
	[BP]=R2	// QImode move
	pc=L9	// Indirect jump
L10:
.debug
	.dw '.stabn 0x44,0,103,',0,0
	.dd LM29-_main
	.dw 0x0d,0x0a
.code
LM29:
	R1=BP	// QImode move
	R2=BP+11
	R1=255	// QImode move
	R3=R2	// QImode move
	[R3]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,104,',0,0
	.dd LM30-_main
	.dw 0x0d,0x0a
.code
LM30:
	R1=BP	// QImode move
	R2=BP+9
	R1=0	// QImode move
	R4=R2	// QImode move
	[R4]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,105,',0,0
	.dd LM31-_main
	.dw 0x0d,0x0a
.code
LM31:
	R1=BP	// QImode move
	R2=BP+1
	R1=0	// QImode move
	R3=R2	// QImode move
	[R3]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,106,',0,0
	.dd LM32-_main
	.dw 0x0d,0x0a
.code
LM32:
	R1=BP	// QImode move
	R2=BP+12
	R1=0	// QImode move
	R4=R2	// QImode move
	[R4]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,107,',0,0
	.dd LM33-_main
	.dw 0x0d,0x0a
.code
LM33:
	R1=BP	// QImode move
	R2=BP+13
	//split R3, 0
	R3=0	// QImode move
	R4=0	// QImode move
	R1=R2	// QImode move
	//split [R1], R3
	[R1++]=R3	// QImode move
	[R1--]=R4	// QImode move
.debug
	.dw '.stabn 0x44,0,108,',0,0
	.dd LM34-_main
	.dw 0x0d,0x0a
.code
LM34:
	R1=0	// QImode move
	[BP]=R1	// QImode move
L13:
	R1=[BP]	// QImode move
	CMP R1,19	// QImode compare
	NSJNG L16	//QImode LE
	pc=L14	// Indirect jump
L16:
.debug
	.dw '.stabn 0x44,0,110,',0,0
	.dd LM35-_main
	.dw 0x0d,0x0a
.code
LM35:
	R2=BP	// QImode move
	R3=BP+13
	R2=BP+64
	[R2]=R3	// QImode move
	R3=BP	// QImode move
	R1=BP+13
	R4=BP+65
	[R4]=R1	// QImode move
	R4=BP	// QImode move
	R3=BP+15
	R4=BP	// QImode move
	R2=BP+1
	[bp+45]=R2	// QImode move
	R4=[bp+45]	// QImode move
	R1=[R4]	// QImode move
	R4=BP+66
	[R4]=R1	// QImode move
	R2=BP+66
	R3 = R3 + [R2]	//addqi3
	R2=R3	// QImode move
	R1=[R2]
	R2=0
	//split [bp+46], R1

⌨️ 快捷键说明

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