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

📄 robot_function.asm

📁 基于凌阳的大名鼎鼎的杰克机器人代码。
💻 ASM
📖 第 1 页 / 共 5 页
字号:
// GCC for SUNPLUS u'nSP version 1.0.21-2
// Command: D:\PROGRA~1\Sunplus\UNSPID~2.1\cc1.exe C:\DOCUME~1\liuxue\LOCALS~1\Temp\cccBaaaa.i -fkeep-inline-functions -quiet -dumpbase robot_function.c -mglobal-var-iram -gstabs -Wall -o .\Debug/robot_function.asm
	.external __sn_func_ptr_sec

// gcc2_compiled.:

.debug
	.dw '.stabs "F:/robot/",0x64,0,3,',0,0,offset Ltext0,seg Ltext0,0x0d,0x0a
.code
.debug
	.dw '.stabs "F:/robot/robot_function.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
.code
.debug
	.dw '.stabs "RobotSystemInit:F19",36,0,0,',0,0,offset _RobotSystemInit,seg _RobotSystemInit,0x0d,0x0a
.CODE
.public _RobotSystemInit
_RobotSystemInit:	.proc
.debug
	.dw '.stabn 0x44,0,36,',0,0
	.dd LM1-_RobotSystemInit
	.dw 0x0d,0x0a
.code
LM1:
	// 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,37,',0,0
	.dd LM2-_RobotSystemInit
	.dw 0x0d,0x0a
.code
LM2:
	R1=1	// QImode move
	[28690]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,38,',0,0
	.dd LM3-_RobotSystemInit
	.dw 0x0d,0x0a
.code
LM3:
	R1=500	// QImode move
	[SP--]=R1	// QImode move
	call _Delay	// call without return value
	SP = SP + 1	//SP
.debug
	.dw '.stabn 0x44,0,39,',0,0
	.dd LM4-_RobotSystemInit
	.dw 0x0d,0x0a
.code
LM4:
	R1=(-1)	// QImode move
	[28677]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,40,',0,0
	.dd LM5-_RobotSystemInit
	.dw 0x0d,0x0a
.code
LM5:
	R1=(-1)	// QImode move
	[28680]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,41,',0,0
	.dd LM6-_RobotSystemInit
	.dw 0x0d,0x0a
.code
LM6:
	R1=(-1)	// QImode move
	[28679]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,43,',0,0
	.dd LM7-_RobotSystemInit
	.dw 0x0d,0x0a
.code
LM7:
	R1=0	// QImode move
	[28677]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,44,',0,0
	.dd LM8-_RobotSystemInit
	.dw 0x0d,0x0a
.code
LM8:
	R1=500	// QImode move
	[SP--]=R1	// QImode move
	call _Delay	// call without return value
	SP = SP + 1	//SP
.debug
	.dw '.stabn 0x44,0,45,',0,0
	.dd LM9-_RobotSystemInit
	.dw 0x0d,0x0a
.code
LM9:
.debug
	.dw '.stabn 0x44,0,45,',0,0
	.dd LM10-_RobotSystemInit
	.dw 0x0d,0x0a
.code
LM10:
L2:

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

.debug
	.dw '.stabf ',0,0
	.dd LME1-_RobotSystemInit
	.dw 0x0d,0x0a
.code
LME1:
.code
.debug
	.dw '.stabs "IsFirstDownLoad:F4",36,0,0,',0,0,offset _IsFirstDownLoad,seg _IsFirstDownLoad,0x0d,0x0a
.CODE
.public _IsFirstDownLoad
_IsFirstDownLoad:	.proc
.debug
	.dw '.stabn 0x44,0,48,',0,0
	.dd LM11-_IsFirstDownLoad
	.dw 0x0d,0x0a
.code
LM11:
	// total=4, vars=4
	// frame_pointer_needed: 1
	push bp to [sp]
	sp-=4
	bp=sp+1

	R2=BP+7
.debug
	.dw '.stabn 0x44,0,49,',0,0
	.dd LM12-_IsFirstDownLoad
	.dw 0x0d,0x0a
.code
LM12:
LBB2:
.debug
	.dw '.stabn 0x44,0,53,',0,0
	.dd LM13-_IsFirstDownLoad
	.dw 0x0d,0x0a
.code
LM13:
	R1=BP	// QImode move
	R3=BP+2
	R1=(-768)	// QImode move
	R4=R3	// QImode move
	[R4]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,54,',0,0
	.dd LM14-_IsFirstDownLoad
	.dw 0x0d,0x0a
.code
LM14:
	R3=BP	// QImode move
	R1=BP+1
	R3=BP	// QImode move
	R3=BP+2
	[bp+3]=R3	// QImode move
	R4=[bp+3]	// QImode move
	R3=[R4]	// QImode move
	R4=R3	// QImode move
	R4=[R4]	// QImode move
	[bp+3]=R4	// QImode move
	R3=[bp+3]	// QImode move
	R4=R1	// QImode move
	[R4]=R3	// QImode move
.debug
	.dw '.stabn 0x44,0,55,',0,0
	.dd LM15-_IsFirstDownLoad
	.dw 0x0d,0x0a
.code
LM15:
	R1=BP	// QImode move
	R3=BP+1
	R4=R3	// QImode move
	R1=[R4]	// QImode move
	CMP R1,(-1)	// QImode compare
	NSJNZ L4	//QImode NE
.debug
	.dw '.stabn 0x44,0,57,',0,0
	.dd LM16-_IsFirstDownLoad
	.dw 0x0d,0x0a
.code
LM16:
	R1=1	// QImode move
	[BP]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,58,',0,0
	.dd LM17-_IsFirstDownLoad
	.dw 0x0d,0x0a
.code
LM17:
	R3=[BP]	// QImode move
	R1=R3	// QImode move
	pc=L3	// Indirect jump
.debug
	.dw '.stabn 0x44,0,59,',0,0
	.dd LM18-_IsFirstDownLoad
	.dw 0x0d,0x0a
.code
LM18:
	pc=L5	// Indirect jump
L4:
.debug
	.dw '.stabn 0x44,0,60,',0,0
	.dd LM19-_IsFirstDownLoad
	.dw 0x0d,0x0a
.code
LM19:
	R1=BP	// QImode move
	R3=BP+1
	R4=R3	// QImode move
	R1=[R4]	// QImode move
	CMP R1,(-21846)	// QImode compare
	NSJNZ L6	//QImode NE
.debug
	.dw '.stabn 0x44,0,62,',0,0
	.dd LM20-_IsFirstDownLoad
	.dw 0x0d,0x0a
.code
LM20:
	R1=0	// QImode move
	[BP]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,63,',0,0
	.dd LM21-_IsFirstDownLoad
	.dw 0x0d,0x0a
.code
LM21:
	R3=[BP]	// QImode move
	R1=R3	// QImode move
	pc=L3	// Indirect jump
.debug
	.dw '.stabn 0x44,0,64,',0,0
	.dd LM22-_IsFirstDownLoad
	.dw 0x0d,0x0a
.code
LM22:
	pc=L5	// Indirect jump
L6:
.debug
	.dw '.stabn 0x44,0,67,',0,0
	.dd LM23-_IsFirstDownLoad
	.dw 0x0d,0x0a
.code
LM23:
	R1=(-1)	// QImode move
	[BP]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,68,',0,0
	.dd LM24-_IsFirstDownLoad
	.dw 0x0d,0x0a
.code
LM24:
	R3=[BP]	// QImode move
	R1=R3	// QImode move
	pc=L3	// Indirect jump
L7:
L5:
.debug
	.dw '.stabn 0x44,0,70,',0,0
	.dd LM25-_IsFirstDownLoad
	.dw 0x0d,0x0a
.code
LM25:
LBE2:
.debug
	.dw '.stabn 0x44,0,70,',0,0
	.dd LM26-_IsFirstDownLoad
	.dw 0x0d,0x0a
.code
LM26:
L3:

	sp+=4
	pop bp from [sp]
	retf
	.endp	// end of IsFirstDownLoad

.debug
	.dw '.stabn 0xc0,0,0,',0,0
	.dd LBB2-_IsFirstDownLoad
	.dw 0x0d,0x0a
.code
.debug
	.dw '.stabs "uiFlagFirst_Sub:4",128,0,0,0',0x0d,0x0a
.CODE
.debug
	.dw '.stabs "uiFlashData:4",128,0,0,1',0x0d,0x0a
.CODE
.debug
	.dw '.stabs "p:20=*4",128,0,0,2',0x0d,0x0a
.CODE
.debug
	.dw '.stabn 0xe0,0,0,',0,0
	.dd LBE2-_IsFirstDownLoad
	.dw 0x0d,0x0a
.code
.debug
	.dw '.stabf ',0,0
	.dd LME2-_IsFirstDownLoad
	.dw 0x0d,0x0a
.code
LME2:
.code
.debug
	.dw '.stabs "FormatFlash:F19",36,0,0,',0,0,offset _FormatFlash,seg _FormatFlash,0x0d,0x0a
.CODE
.public _FormatFlash
_FormatFlash:	.proc
.debug
	.dw '.stabn 0x44,0,73,',0,0
	.dd LM27-_FormatFlash
	.dw 0x0d,0x0a
.code
LM27:
	// 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,74,',0,0
	.dd LM28-_FormatFlash
	.dw 0x0d,0x0a
.code
LM28:
	R1=(-2304)	// QImode move
	[SP--]=R1	// QImode move
	call _F_FlashErase	// call without return value
	SP = SP + 1	//SP
.debug
	.dw '.stabn 0x44,0,75,',0,0
	.dd LM29-_FormatFlash
	.dw 0x0d,0x0a
.code
LM29:
	R1=(-2204)	// QImode move
	[SP--]=R1	// QImode move
	call _F_FlashErase	// call without return value
	SP = SP + 1	//SP
.debug
	.dw '.stabn 0x44,0,76,',0,0
	.dd LM30-_FormatFlash
	.dw 0x0d,0x0a
.code
LM30:
	R1=(-2104)	// QImode move
	[SP--]=R1	// QImode move
	call _F_FlashErase	// call without return value
	SP = SP + 1	//SP
.debug
	.dw '.stabn 0x44,0,77,',0,0
	.dd LM31-_FormatFlash
	.dw 0x0d,0x0a
.code
LM31:
	R1=(-2004)	// QImode move
	[SP--]=R1	// QImode move
	call _F_FlashErase	// call without return value
	SP = SP + 1	//SP
.debug
	.dw '.stabn 0x44,0,78,',0,0
	.dd LM32-_FormatFlash
	.dw 0x0d,0x0a
.code
LM32:
	R1=(-1904)	// QImode move
	[SP--]=R1	// QImode move
	call _F_FlashErase	// call without return value
	SP = SP + 1	//SP
.debug
	.dw '.stabn 0x44,0,80,',0,0
	.dd LM33-_FormatFlash
	.dw 0x0d,0x0a
.code
LM33:
	R1=(-1792)	// QImode move
	[SP--]=R1	// QImode move
	call _F_FlashErase	// call without return value
	SP = SP + 1	//SP
.debug
	.dw '.stabn 0x44,0,81,',0,0
	.dd LM34-_FormatFlash
	.dw 0x0d,0x0a
.code
LM34:
	R1=(-1692)	// QImode move
	[SP--]=R1	// QImode move
	call _F_FlashErase	// call without return value
	SP = SP + 1	//SP
.debug
	.dw '.stabn 0x44,0,82,',0,0
	.dd LM35-_FormatFlash
	.dw 0x0d,0x0a
.code
LM35:
	R1=(-1592)	// QImode move
	[SP--]=R1	// QImode move
	call _F_FlashErase	// call without return value
	SP = SP + 1	//SP
.debug
	.dw '.stabn 0x44,0,83,',0,0
	.dd LM36-_FormatFlash
	.dw 0x0d,0x0a
.code
LM36:
	R1=(-1492)	// QImode move
	[SP--]=R1	// QImode move
	call _F_FlashErase	// call without return value
	SP = SP + 1	//SP
.debug
	.dw '.stabn 0x44,0,84,',0,0
	.dd LM37-_FormatFlash
	.dw 0x0d,0x0a
.code
LM37:
	R1=(-1392)	// QImode move
	[SP--]=R1	// QImode move
	call _F_FlashErase	// call without return value
	SP = SP + 1	//SP
.debug
	.dw '.stabn 0x44,0,86,',0,0
	.dd LM38-_FormatFlash
	.dw 0x0d,0x0a
.code
LM38:
	R1=(-1280)	// QImode move
	[SP--]=R1	// QImode move
	call _F_FlashErase	// call without return value
	SP = SP + 1	//SP
.debug
	.dw '.stabn 0x44,0,87,',0,0
	.dd LM39-_FormatFlash
	.dw 0x0d,0x0a
.code
LM39:
	R1=(-1180)	// QImode move
	[SP--]=R1	// QImode move
	call _F_FlashErase	// call without return value
	SP = SP + 1	//SP
.debug
	.dw '.stabn 0x44,0,88,',0,0
	.dd LM40-_FormatFlash
	.dw 0x0d,0x0a
.code
LM40:
	R1=(-1080)	// QImode move
	[SP--]=R1	// QImode move
	call _F_FlashErase	// call without return value
	SP = SP + 1	//SP
.debug
	.dw '.stabn 0x44,0,89,',0,0
	.dd LM41-_FormatFlash
	.dw 0x0d,0x0a
.code
LM41:
	R1=(-980)	// QImode move
	[SP--]=R1	// QImode move
	call _F_FlashErase	// call without return value
	SP = SP + 1	//SP
.debug
	.dw '.stabn 0x44,0,90,',0,0
	.dd LM42-_FormatFlash
	.dw 0x0d,0x0a
.code
LM42:
	R1=(-880)	// QImode move
	[SP--]=R1	// QImode move
	call _F_FlashErase	// call without return value
	SP = SP + 1	//SP
.debug
	.dw '.stabn 0x44,0,91,',0,0
	.dd LM43-_FormatFlash
	.dw 0x0d,0x0a
.code
LM43:
.debug
	.dw '.stabn 0x44,0,91,',0,0
	.dd LM44-_FormatFlash
	.dw 0x0d,0x0a
.code
LM44:
L10:

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

.debug
	.dw '.stabf ',0,0
	.dd LME3-_FormatFlash
	.dw 0x0d,0x0a
.code
LME3:
.code
.debug
	.dw '.stabs "TrainFiveCommand:F19",36,0,0,',0,0,offset _TrainFiveCommand,seg _TrainFiveCommand,0x0d,0x0a
.CODE
.public _TrainFiveCommand
_TrainFiveCommand:	.proc
.debug
	.dw '.stabn 0x44,0,94,',0,0
	.dd LM45-_TrainFiveCommand
	.dw 0x0d,0x0a
.code
LM45:
	// 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,95,',0,0
	.dd LM46-_TrainFiveCommand
	.dw 0x0d,0x0a
.code
LM46:
	R1=0	// QImode move
	[SP--]=R1	// QImode move
	call _BSR_DeleteSDGroup	// call with return value
	SP = SP + 1	//SP
.debug
	.dw '.stabn 0x44,0,96,',0,0
	.dd LM47-_TrainFiveCommand
	.dw 0x0d,0x0a
.code
LM47:
	R1=0	// QImode move
	[SP--]=R1	// QImode move
	call _PlaySnd	// call without return value
	SP = SP + 1	//SP
.debug
	.dw '.stabn 0x44,0,98,',0,0
	.dd LM48-_TrainFiveCommand
	.dw 0x0d,0x0a
.code
LM48:
L12:
	R1=0	// QImode move
	[SP--]=R1	// QImode move
	R1=256	// QImode move
	[SP--]=R1	// QImode move
	call _TrainWord	// call with return value
	SP = SP + 2	//SP
	CMP R1,0	// QImode test
	NSJNZ L14	//QImode NE
	pc=L13	// Indirect jump
L14:
	pc=L12	// Indirect jump
L13:
.debug
	.dw '.stabn 0x44,0,99,',0,0
	.dd LM49-_TrainFiveCommand
	.dw 0x0d,0x0a
.code
LM49:
L15:
	R1=1	// QImode move
	[SP--]=R1	// QImode move
	R1=257	// QImode move
	[SP--]=R1	// QImode move
	call _TrainWord	// call with return value
	SP = SP + 2	//SP
	CMP R1,0	// QImode test
	NSJNZ L17	//QImode NE
	pc=L16	// Indirect jump
L17:
	pc=L15	// Indirect jump
L16:
.debug
	.dw '.stabn 0x44,0,100,',0,0
	.dd LM50-_TrainFiveCommand
	.dw 0x0d,0x0a
.code
LM50:
L18:
	R1=2	// QImode move
	[SP--]=R1	// QImode move
	R1=258	// QImode move
	[SP--]=R1	// QImode move
	call _TrainWord	// call with return value
	SP = SP + 2	//SP
	CMP R1,0	// QImode test
	NSJNZ L20	//QImode NE
	pc=L19	// Indirect jump
L20:
	pc=L18	// Indirect jump
L19:
.debug
	.dw '.stabn 0x44,0,101,',0,0
	.dd LM51-_TrainFiveCommand
	.dw 0x0d,0x0a
.code
LM51:
L21:
	R1=3	// QImode move
	[SP--]=R1	// QImode move
	R1=259	// QImode move
	[SP--]=R1	// QImode move
	call _TrainWord	// call with return value
	SP = SP + 2	//SP
	CMP R1,0	// QImode test
	NSJNZ L23	//QImode NE
	pc=L22	// Indirect jump
L23:
	pc=L21	// Indirect jump
L22:
.debug
	.dw '.stabn 0x44,0,102,',0,0
	.dd LM52-_TrainFiveCommand
	.dw 0x0d,0x0a
.code
LM52:

⌨️ 快捷键说明

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