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

📄 robot_function.asm

📁 基于凌阳的大名鼎鼎的杰克机器人代码。
💻 ASM
📖 第 1 页 / 共 5 页
字号:
L24:
	R1=4	// QImode move
	[SP--]=R1	// QImode move
	R1=260	// QImode move
	[SP--]=R1	// QImode move
	call _TrainWord	// call with return value
	SP = SP + 2	//SP
	CMP R1,0	// QImode test
	NSJNZ L26	//QImode NE
	pc=L25	// Indirect jump
L26:
	pc=L24	// Indirect jump
L25:
.debug
	.dw '.stabn 0x44,0,103,',0,0
	.dd LM53-_TrainFiveCommand
	.dw 0x0d,0x0a
.code
LM53:
.debug
	.dw '.stabn 0x44,0,103,',0,0
	.dd LM54-_TrainFiveCommand
	.dw 0x0d,0x0a
.code
LM54:
L11:

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

.debug
	.dw '.stabf ',0,0
	.dd LME4-_TrainFiveCommand
	.dw 0x0d,0x0a
.code
LME4:
.code
.debug
	.dw '.stabs "SaveFiveCommand:F19",36,0,0,',0,0,offset _SaveFiveCommand,seg _SaveFiveCommand,0x0d,0x0a
.CODE
.public _SaveFiveCommand
_SaveFiveCommand:	.proc
.debug
	.dw '.stabn 0x44,0,106,',0,0
	.dd LM55-_SaveFiveCommand
	.dw 0x0d,0x0a
.code
LM55:
	// total=6, vars=6
	// frame_pointer_needed: 1
	push bp to [sp]
	sp-=6
	bp=sp+1

	R1=BP+9
	[bp+3]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,107,',0,0
	.dd LM56-_SaveFiveCommand
	.dw 0x0d,0x0a
.code
LM56:
LBB3:
.debug
	.dw '.stabn 0x44,0,111,',0,0
	.dd LM57-_SaveFiveCommand
	.dw 0x0d,0x0a
.code
LM57:
	R1=256	// QImode move
	[BP]=R1	// QImode move
L33:
	R1=[BP]	// QImode move
	CMP R1,260	// QImode compare
	NSJNA L36	//QImode LEU
	pc=L34	// Indirect jump
L36:
.debug
	.dw '.stabn 0x44,0,113,',0,0
	.dd LM58-_SaveFiveCommand
	.dw 0x0d,0x0a
.code
LM58:
	R1=BP	// QImode move
	R2=BP+2
	[bp+4]=R2	// QImode move
	R1=[BP]	// QImode move
	[SP--]=R1	// QImode move
	call _BSR_ExportSDWord	// call with return value
	SP = SP + 1	//SP
	R3=[bp+4]	// QImode move
	[R3]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,114,',0,0
	.dd LM59-_SaveFiveCommand
	.dw 0x0d,0x0a
.code
LM59:
L37:
	R1=BP	// QImode move
	R2=BP+2
	R4=R2	// QImode move
	R1=[R4]	// QImode move
	CMP R1,0	// QImode test
	NSJNZ L39	//QImode NE
	pc=L38	// Indirect jump
L39:
.debug
	.dw '.stabn 0x44,0,115,',0,0
	.dd LM60-_SaveFiveCommand
	.dw 0x0d,0x0a
.code
LM60:
	R1=BP	// QImode move
	R1=BP+2
	[bp+5]=R1	// QImode move
	R1=[BP]	// QImode move
	[SP--]=R1	// QImode move
	call _BSR_ExportSDWord	// call with return value
	SP = SP + 1	//SP
	R2=[bp+5]	// QImode move
	[R2]=R1	// QImode move
	pc=L37	// Indirect jump
L38:
.debug
	.dw '.stabn 0x44,0,116,',0,0
	.dd LM61-_SaveFiveCommand
	.dw 0x0d,0x0a
.code
LM61:
	R1=BP	// QImode move
	R2=BP+1
	R1=0	// QImode move
	R3=R2	// QImode move
	[R3]=R1	// QImode move
L40:
	R1=BP	// QImode move
	R2=BP+1
	R4=R2	// QImode move
	R1=[R4]	// QImode move
	CMP R1,99	// QImode compare
	NSJNA L43	//QImode LEU
	pc=L35	// Indirect jump
L43:
.debug
	.dw '.stabn 0x44,0,118,',0,0
	.dd LM62-_SaveFiveCommand
	.dw 0x0d,0x0a
.code
LM62:
	R1=BP	// QImode move
	R2=BP+1
	R1=_BSR_SDModel	// QImode move
	R3=R2	// QImode move
	R2=[R3]	// QImode move
	R1 = R1 + R2	//addqi3
	R4=R1	// QImode move
	R2=[R4]	// QImode move
	[SP--]=R2	// QImode move
	R2=[bp+3]	// QImode move
	R1=[R2]	// QImode move
	[SP--]=R1	// QImode move
	call _F_FlashWrite1Word	// call without return value
	SP = SP + 2	//SP
.debug
	.dw '.stabn 0x44,0,119,',0,0
	.dd LM63-_SaveFiveCommand
	.dw 0x0d,0x0a
.code
LM63:
	R1=1	// QImode move
	[28690]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,120,',0,0
	.dd LM64-_SaveFiveCommand
	.dw 0x0d,0x0a
.code
LM64:
	R3=[bp+3]	// QImode move
	R1=[R3]	// QImode move
	R2=R1+1
	R4=[bp+3]	// QImode move
	[R4]=R2	// QImode move
.debug
	.dw '.stabn 0x44,0,116,',0,0
	.dd LM65-_SaveFiveCommand
	.dw 0x0d,0x0a
.code
LM65:
L42:
	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
	pc=L40	// Indirect jump
L41:
.debug
	.dw '.stabn 0x44,0,111,',0,0
	.dd LM66-_SaveFiveCommand
	.dw 0x0d,0x0a
.code
LM66:
L35:
	R1=[BP]	// QImode move
	R2=R1+1
	[BP]=R2	// QImode move
	pc=L33	// Indirect jump
L34:
.debug
	.dw '.stabn 0x44,0,123,',0,0
	.dd LM67-_SaveFiveCommand
	.dw 0x0d,0x0a
.code
LM67:
LBE3:
.debug
	.dw '.stabn 0x44,0,123,',0,0
	.dd LM68-_SaveFiveCommand
	.dw 0x0d,0x0a
.code
LM68:
L32:

	sp+=6
	pop bp from [sp]
	retf
	.endp	// end of SaveFiveCommand

.debug
	.dw '.stabs "uiAddr:p4",160,0,0,9',0x0d,0x0a
.CODE
.debug
	.dw '.stabn 0xc0,0,0,',0,0
	.dd LBB3-_SaveFiveCommand
	.dw 0x0d,0x0a
.code
.debug
	.dw '.stabs "uiCommandID:4",128,0,0,0',0x0d,0x0a
.CODE
.debug
	.dw '.stabs "uiCount:4",128,0,0,1',0x0d,0x0a
.CODE
.debug
	.dw '.stabs "uiRes_Export:4",128,0,0,2',0x0d,0x0a
.CODE
.debug
	.dw '.stabn 0xe0,0,0,',0,0
	.dd LBE3-_SaveFiveCommand
	.dw 0x0d,0x0a
.code
.debug
	.dw '.stabf ',0,0
	.dd LME5-_SaveFiveCommand
	.dw 0x0d,0x0a
.code
LME5:
.code
.debug
	.dw '.stabs "ImportFiveCommand:F19",36,0,0,',0,0,offset _ImportFiveCommand,seg _ImportFiveCommand,0x0d,0x0a
.CODE
.public _ImportFiveCommand
_ImportFiveCommand:	.proc
.debug
	.dw '.stabn 0x44,0,126,',0,0
	.dd LM69-_ImportFiveCommand
	.dw 0x0d,0x0a
.code
LM69:
	// total=7, vars=7
	// frame_pointer_needed: 1
	push bp to [sp]
	sp-=7
	bp=sp+1

	R1=BP+10
	[bp+4]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,127,',0,0
	.dd LM70-_ImportFiveCommand
	.dw 0x0d,0x0a
.code
LM70:
LBB4:
.debug
	.dw '.stabn 0x44,0,132,',0,0
	.dd LM71-_ImportFiveCommand
	.dw 0x0d,0x0a
.code
LM71:
	R1=0	// QImode move
	[SP--]=R1	// QImode move
	call _BSR_DeleteSDGroup	// call with return value
	SP = SP + 1	//SP
.debug
	.dw '.stabn 0x44,0,134,',0,0
	.dd LM72-_ImportFiveCommand
	.dw 0x0d,0x0a
.code
LM72:
	R1=BP	// QImode move
	R2=BP+3
	R3=[bp+4]	// QImode move
	R1=[R3]	// QImode move
	R4=R2	// QImode move
	[R4]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,135,',0,0
	.dd LM73-_ImportFiveCommand
	.dw 0x0d,0x0a
.code
LM73:
	R1=0	// QImode move
	[BP]=R1	// QImode move
L48:
	R1=[BP]	// QImode move
	CMP R1,4	// QImode compare
	NSJNA L51	//QImode LEU
	pc=L49	// Indirect jump
L51:
.debug
	.dw '.stabn 0x44,0,137,',0,0
	.dd LM74-_ImportFiveCommand
	.dw 0x0d,0x0a
.code
LM74:
	R1=BP	// QImode move
	R2=BP+1
	R1=0	// QImode move
	R3=R2	// QImode move
	[R3]=R1	// QImode move
L52:
	R1=BP	// QImode move
	R2=BP+1
	R4=R2	// QImode move
	R1=[R4]	// QImode move
	CMP R1,99	// QImode compare
	NSJNA L55	//QImode LEU
	pc=L53	// Indirect jump
L55:
.debug
	.dw '.stabn 0x44,0,139,',0,0
	.dd LM75-_ImportFiveCommand
	.dw 0x0d,0x0a
.code
LM75:
	R2=BP	// QImode move
	R1=BP+2
	R2=BP	// QImode move
	R3=BP+3
	R4=R3	// QImode move
	R2=[R4]	// QImode move
	R4=R2	// QImode move
	R3=[R4]	// QImode move
	R2=R1	// QImode move
	[R2]=R3	// QImode move
.debug
	.dw '.stabn 0x44,0,140,',0,0
	.dd LM76-_ImportFiveCommand
	.dw 0x0d,0x0a
.code
LM76:
	R1=BP	// QImode move
	R2=BP+1
	R1=_BSR_SDModel	// QImode move
	R3=R2	// QImode move
	R2=[R3]	// QImode move
	R1 = R1 + R2	//addqi3
	R2=BP	// QImode move
	R3=BP+2
	R4=R3	// QImode move
	R2=[R4]	// QImode move
	R3=R1	// QImode move
	[R3]=R2	// QImode move
.debug
	.dw '.stabn 0x44,0,141,',0,0
	.dd LM77-_ImportFiveCommand
	.dw 0x0d,0x0a
.code
LM77:
	R2=BP	// QImode move
	R1=BP+3
	R2=BP	// QImode move
	R3=BP+3
	R4=R3	// QImode move
	R2=[R4]	// QImode move
	R3=R2+1
	R2=R1	// QImode move
	[R2]=R3	// QImode move
.debug
	.dw '.stabn 0x44,0,142,',0,0
	.dd LM78-_ImportFiveCommand
	.dw 0x0d,0x0a
.code
LM78:
	R1=1	// QImode move
	[28690]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,137,',0,0
	.dd LM79-_ImportFiveCommand
	.dw 0x0d,0x0a
.code
LM79:
L54:
	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
	pc=L52	// Indirect jump
L53:
.debug
	.dw '.stabn 0x44,0,144,',0,0
	.dd LM80-_ImportFiveCommand
	.dw 0x0d,0x0a
.code
LM80:
	R1=BP	// QImode move
	R3=BP+2
	[bp+5]=R3	// QImode move
	call _BSR_ImportSDWord	// call with return value
	R4=[bp+5]	// QImode move
	[R4]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,145,',0,0
	.dd LM81-_ImportFiveCommand
	.dw 0x0d,0x0a
.code
LM81:
L56:
	R1=BP	// QImode move
	R2=BP+2
	R3=R2	// QImode move
	R1=[R3]	// QImode move
	CMP R1,0	// QImode test
	NSJNZ L58	//QImode NE
	pc=L57	// Indirect jump
L58:
.debug
	.dw '.stabn 0x44,0,146,',0,0
	.dd LM82-_ImportFiveCommand
	.dw 0x0d,0x0a
.code
LM82:
	R1=BP	// QImode move
	R4=BP+2
	[bp+6]=R4	// QImode move
	call _BSR_ImportSDWord	// call with return value
	R2=[bp+6]	// QImode move
	[R2]=R1	// QImode move
	pc=L56	// Indirect jump
L57:
.debug
	.dw '.stabn 0x44,0,147,',0,0
	.dd LM83-_ImportFiveCommand
	.dw 0x0d,0x0a
.code
LM83:
	R1=1	// QImode move
	[28690]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,135,',0,0
	.dd LM84-_ImportFiveCommand
	.dw 0x0d,0x0a
.code
LM84:
L50:
	R1=[BP]	// QImode move
	R2=R1+1
	[BP]=R2	// QImode move
	pc=L48	// Indirect jump
L49:
.debug
	.dw '.stabn 0x44,0,149,',0,0
	.dd LM85-_ImportFiveCommand
	.dw 0x0d,0x0a
.code
LM85:
LBE4:
.debug
	.dw '.stabn 0x44,0,149,',0,0
	.dd LM86-_ImportFiveCommand
	.dw 0x0d,0x0a
.code
LM86:
L47:

	sp+=7
	pop bp from [sp]
	retf
	.endp	// end of ImportFiveCommand

.debug
	.dw '.stabs "uiAddr_Import:p4",160,0,0,10',0x0d,0x0a
.CODE
.debug
	.dw '.stabn 0xc0,0,0,',0,0
	.dd LBB4-_ImportFiveCommand
	.dw 0x0d,0x0a
.code
.debug
	.dw '.stabs "uiCommand_Import:4",128,0,0,0',0x0d,0x0a
.CODE
.debug
	.dw '.stabs "uiCount:4",128,0,0,1',0x0d,0x0a
.CODE
.debug
	.dw '.stabs "uiRes_Import:4",128,0,0,2',0x0d,0x0a
.CODE
.debug
	.dw '.stabs "p_Import:20",128,0,0,3',0x0d,0x0a
.CODE
.debug
	.dw '.stabn 0xe0,0,0,',0,0
	.dd LBE4-_ImportFiveCommand
	.dw 0x0d,0x0a
.code
.debug
	.dw '.stabf ',0,0
	.dd LME6-_ImportFiveCommand
	.dw 0x0d,0x0a
.code
LME6:
.code
.debug
	.dw '.stabs "TrainWord:F4",36,0,0,',0,0,offset _TrainWord,seg _TrainWord,0x0d,0x0a
.CODE
.public _TrainWord
_TrainWord:	.proc
.debug
	.dw '.stabn 0x44,0,152,',0,0
	.dd LM87-_TrainWord
	.dw 0x0d,0x0a
.code
LM87:
	// 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,153,',0,0
	.dd LM88-_TrainWord
	.dw 0x0d,0x0a
.code
LM88:
LBB5:
.debug
	.dw '.stabn 0x44,0,154,',0,0
	.dd LM89-_TrainWord
	.dw 0x0d,0x0a
.code
LM89:
	R1=[bp+1]	// QImode move
	R3=[bp+1]	// QImode move
	R2=R3+1
	R3=R2	// QImode move
	R1=[R3]	// QImode move
	[SP--]=R1	// QImode move
	call _PlaySnd	// call without return value
	SP = SP + 1	//SP
.debug
	.dw '.stabn 0x44,0,155,',0,0
	.dd LM90-_TrainWord
	.dw 0x0d,0x0a
.code
LM90:
L63:
	pc=L65	// Indirect jump
	pc=L64	// Indirect jump
L65:
.debug
	.dw '.stabn 0x44,0,157,',0,0
	.dd LM91-_TrainWord
	.dw 0x0d,0x0a
.code
LM91:
	R1=0	// QImode move
	[SP--]=R1	// QImode move
	R2=[bp+1]	// QImode move
	R1=[R2]	// QImode move
	[SP--]=R1	// QImode move
	call _BSR_Train	// call with return value
	SP = SP + 2	//SP
	[BP]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,158,',0,0
	.dd LM92-_TrainWord
	.dw 0x0d,0x0a
.code
LM92:
	R1=[BP]	// QImode move
	CMP R1,0	// QImode test
	NSJNZ L66	//QImode NE
.debug
	.dw '.stabn 0x44,0,159,',0,0
	.dd LM93-_TrainWord
	.dw 0x0d,0x0a
.code
LM93:
	pc=L64	// Indirect jump
L66:
.debug
	.dw '.stabn 0x44,0,161,',0,0
	.dd LM94-_TrainWord
	.dw 0x0d,0x0a
.code
LM94:
	R2=[BP]	// QImode move
	R1=R2	// QImode move
	R1=R1-(-6)
	CMP R1,5	// QImode compare
	NSJA L67	//QImode GTU
	R2=L74	// QImode move
	R1 = R1 + R2	//addqi3
	R3=R1	// QImode move
	R1=[R3]	// QImode move
	pc=R1	// tablejump
.text
L74:
	.dw L73
	.dw L72
	.dw L71
	.dw L70
	.dw L69
	.dw L68
.code
L68:
.debug
	.dw '.stabn 0x44,0,164,',0,0
	.dd LM95-_TrainWord
	.dw 0x0d,0x0a
.code
LM95:
	R1=23	// QImode move
	[SP--]=R1	// QImode move
	call _PlaySnd	// call without return value
	SP = SP + 1	//SP
.debug
	.dw '.stabn 0x44,0,165,',0,0
	.dd LM96-_TrainWord
	.dw 0x0d,0x0a
.code
LM96:
	R1=(-1)	// QImode move
	pc=L62	// Indirect jump
L69:
.debug
	.dw '.stabn 0x44,0,167,',0,0
	.dd LM97-_TrainWord
	.dw 0x0d,0x0a
.code
LM97:
	R1=23	// QImode move
	[SP--]=R1	// QImode move
	call _PlaySnd	// call without return value
	SP = SP + 1	//SP
.debug
	.dw '.stabn 0x44,0,168,',0,0
	.dd LM98-_TrainWord
	.dw 0x0d,0x0a
.code
LM98:
	pc=L67	// Indirect jump
L70:
.debug
	.dw '.stabn 0x44,0,170,',0,0
	.dd LM99-_TrainWord
	.dw 0x0d,0x0a
.code

⌨️ 快捷键说明

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