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

📄 chap9.asm

📁 SPCE061A_USB可以让你自己检测开发板是否能正常动作
💻 ASM
📖 第 1 页 / 共 5 页
字号:
	.dd LM121-_F_Set_Interface
	.dw 0x0d,0x0a
.code
LM121:
.debug
	.dw '.stabn 0x44,0,290,',0,0
	.dd LM122-_F_Set_Interface
	.dw 0x0d,0x0a
.code
LM122:
L72:

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

.debug
	.dw '.stabf ',0,0
	.dd LME10-_F_Set_Interface
	.dw 0x0d,0x0a
.code
LME10:
.code
.debug
	.dw '.stabs "F_Stall_Ep0:F19",36,0,0,',0,0,offset _F_Stall_Ep0,seg _F_Stall_Ep0,0x0d,0x0a
.CODE
.public _F_Stall_Ep0
_F_Stall_Ep0:	.proc
.debug
	.dw '.stabn 0x44,0,298,',0,0
	.dd LM123-_F_Stall_Ep0
	.dw 0x0d,0x0a
.code
LM123:
	// 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,299,',0,0
	.dd LM124-_F_Stall_Ep0
	.dw 0x0d,0x0a
.code
LM124:
	R1=1	// QImode move
	[SP--]=R1	// QImode move
	R1=0	// QImode move
	[SP--]=R1	// QImode move
	call _F_D12_SetEndpointStatus	// call without return value
	SP=SP+2
.debug
	.dw '.stabn 0x44,0,300,',0,0
	.dd LM125-_F_Stall_Ep0
	.dw 0x0d,0x0a
.code
LM125:
	R1=1	// QImode move
	[SP--]=R1	// QImode move
	R1=1	// QImode move
	[SP--]=R1	// QImode move
	call _F_D12_SetEndpointStatus	// call without return value
	SP=SP+2
.debug
	.dw '.stabn 0x44,0,301,',0,0
	.dd LM126-_F_Stall_Ep0
	.dw 0x0d,0x0a
.code
LM126:
.debug
	.dw '.stabn 0x44,0,301,',0,0
	.dd LM127-_F_Stall_Ep0
	.dw 0x0d,0x0a
.code
LM127:
L79:

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

.debug
	.dw '.stabf ',0,0
	.dd LME11-_F_Stall_Ep0
	.dw 0x0d,0x0a
.code
LME11:
.code
.debug
	.dw '.stabs "F_Single_Transmit:F19",36,0,0,',0,0,offset _F_Single_Transmit,seg _F_Single_Transmit,0x0d,0x0a
.CODE
.public _F_Single_Transmit
_F_Single_Transmit:	.proc
.debug
	.dw '.stabn 0x44,0,303,',0,0
	.dd LM128-_F_Single_Transmit
	.dw 0x0d,0x0a
.code
LM128:
	// 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,304,',0,0
	.dd LM129-_F_Single_Transmit
	.dw 0x0d,0x0a
.code
LM129:
	R1=[BP]	// QImode move
	R3=[BP]	// QImode move
	R2=R3+1
	R3=R2	// QImode move
	R1=[R3]	// QImode move
	CMP R1,16	// QImode compare
	JNA L82	// QImode GTU
	PC=L81
L82:
.debug
	.dw '.stabn 0x44,0,306,',0,0
	.dd LM130-_F_Single_Transmit
	.dw 0x0d,0x0a
.code
LM130:
	R2=[BP]	// QImode move
	R1=[R2]	// QImode move
	[SP--]=R1	// QImode move
	R1=[BP]	// QImode move
	R3=[BP]	// QImode move
	R2=R3+1
	R3=R2	// QImode move
	R1=[R3]	// QImode move
	[SP--]=R1	// QImode move
	R1=1	// QImode move
	[SP--]=R1	// QImode move
	call _F_D12_WriteEndpoint	// call with return value
	SP=SP+3
L81:
.debug
	.dw '.stabn 0x44,0,308,',0,0
	.dd LM131-_F_Single_Transmit
	.dw 0x0d,0x0a
.code
LM131:
.debug
	.dw '.stabn 0x44,0,308,',0,0
	.dd LM132-_F_Single_Transmit
	.dw 0x0d,0x0a
.code
LM132:
L80:

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

.debug
	.dw '.stabs "buf:p26",160,0,0,4',0x0d,0x0a
.CODE
.debug
	.dw '.stabs "len:p4",160,0,0,5',0x0d,0x0a
.CODE
.debug
	.dw '.stabf ',0,0
	.dd LME12-_F_Single_Transmit
	.dw 0x0d,0x0a
.code
LME12:
.code
.debug
	.dw '.stabs "F_Code_Transmit:F19",36,0,0,',0,0,offset _F_Code_Transmit,seg _F_Code_Transmit,0x0d,0x0a
.CODE
.public _F_Code_Transmit
_F_Code_Transmit:	.proc
.debug
	.dw '.stabn 0x44,0,310,',0,0
	.dd LM133-_F_Code_Transmit
	.dw 0x0d,0x0a
.code
LM133:
	// total=4, vars=4
	// frame_pointer_needed: 1
	push bp to [sp]
	sp-=4
	bp=sp+1

	R1=BP+7
	[BP]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,311,',0,0
	.dd LM134-_F_Code_Transmit
	.dw 0x0d,0x0a
.code
LM134:
LBB13:
	R1=0	// HImode immediate to register move
	R2=0
	[_ControlData+10]=R1	// HImode [Label]=RS
	[_ControlData+11]=R2
.debug
	.dw '.stabn 0x44,0,312,',0,0
	.dd LM135-_F_Code_Transmit
	.dw 0x0d,0x0a
.code
LM135:
	R1=[BP]	// QImode move
	R2=[BP]	// QImode move
	R2=R2+1
	[bp+3]=R2	// QImode move
	R3=[_ControlData+8]	// HImode RD=[Label]
	R4=[_ControlData+9]
	[bp+1]=R3	// HImode [BP+#IM6]=RS
	[bp+2]=R4
	R4=[bp+3]	// QImode move
	R1=[R4++]	// RD=[RS] HImode, RD!=RS
	R2=[R4--]
	R3=[bp+1]	// HImode RD=[BP+#IM6]
	R4=[bp+2]
	CMP R4,R2	// HImode compare
	JA  L88	// HImode LEU
	JNZ L87
	CMP R3,R1
	JA  L88
L87:
	PC=L84
L88:
.debug
	.dw '.stabn 0x44,0,313,',0,0
	.dd LM136-_F_Code_Transmit
	.dw 0x0d,0x0a
.code
LM136:
	R1=[BP]	// QImode move
	R4=[BP]	// QImode move
	R2=R4+1
	R1=R2	// QImode move
	R3=[R1++]	// RD=[RS] HImode, RD!=RS
	R4=[R1--]
	[_ControlData+8]=R3	// HImode [Label]=RS
	[_ControlData+9]=R4
L84:
.debug
	.dw '.stabn 0x44,0,314,',0,0
	.dd LM137-_F_Code_Transmit
	.dw 0x0d,0x0a
.code
LM137:
	R2=[BP]	// QImode move
	R1=[R2]	// QImode move
	[_ControlData+12]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,315,',0,0
	.dd LM138-_F_Code_Transmit
	.dw 0x0d,0x0a
.code
LM138:
	R1=[_ControlData+8]	// HImode RD=[Label]
	R2=[_ControlData+9]
	CMP R2,0	// HImode compare
	JA  L90	// HImode LEU
	JNZ L89
	CMP R1,15
	JA  L90
L89:
	PC=L85
L90:
.debug
	.dw '.stabn 0x44,0,317,',0,0
	.dd LM139-_F_Code_Transmit
	.dw 0x0d,0x0a
.code
LM139:
LBB14:
	R1=[_ControlData+12]	// QImode move
	[SP--]=R1	// QImode move
	R1=16	// QImode move
	[SP--]=R1	// QImode move
	R1=1	// QImode move
	[SP--]=R1	// QImode move
	call _F_D12_WriteEndpoint	// call with return value
	SP=SP+3
.debug
	.dw '.stabn 0x44,0,318,',0,0
	.dd LM140-_F_Code_Transmit
	.dw 0x0d,0x0a
.code
LM140:
	R1=[_ControlData+10]	// HImode RD=[Label]
	R2=[_ControlData+11]
	R3=R1+16	// HImode RD=RS+#IMM16
	R4=R2+0, Carry
	[_ControlData+10]=R3	// HImode [Label]=RS
	[_ControlData+11]=R4
.debug
	.dw '.stabn 0x44,0,319,',0,0
	.dd LM141-_F_Code_Transmit
	.dw 0x0d,0x0a
.code
LM141:
	call _F_Interrupt_Off	// call with return value
.debug
	.dw '.stabn 0x44,0,320,',0,0
	.dd LM142-_F_Code_Transmit
	.dw 0x0d,0x0a
.code
LM142:
	R1=[_bEPPflags]	// QImode move
	R2=(-97)	// QImode move
	[_bEPPflags]=R1&R2
	R1=[_bEPPflags]	// QImode move
	R2=32	// QImode move
	[_bEPPflags]=R1|R2
.debug
	.dw '.stabn 0x44,0,321,',0,0
	.dd LM143-_F_Code_Transmit
	.dw 0x0d,0x0a
.code
LM143:
	call _F_Interrupt_On	// call with return value
.debug
	.dw '.stabn 0x44,0,322,',0,0
	.dd LM144-_F_Code_Transmit
	.dw 0x0d,0x0a
.code
LM144:
LBE14:
	pc=L86	// Indirect jump
L85:
.debug
	.dw '.stabn 0x44,0,325,',0,0
	.dd LM145-_F_Code_Transmit
	.dw 0x0d,0x0a
.code
LM145:
LBB15:
	R3=[BP]	// QImode move
	R1=[R3]	// QImode move
	[SP--]=R1	// QImode move
	R1=[_ControlData+8]	// QImode move
	[SP--]=R1	// QImode move
	R1=1	// QImode move
	[SP--]=R1	// QImode move
	call _F_D12_WriteEndpoint	// call with return value
	SP=SP+3
.debug
	.dw '.stabn 0x44,0,326,',0,0
	.dd LM146-_F_Code_Transmit
	.dw 0x0d,0x0a
.code
LM146:
	R1=[_ControlData+10]	// HImode RD=[Label]
	R2=[_ControlData+11]
	R3=R1+[_ControlData+8]	// HImode RD=RS+[#IM16]
	R4=R2+[_ControlData+9], Carry
	[_ControlData+10]=R3	// HImode [Label]=RS
	[_ControlData+11]=R4
.debug
	.dw '.stabn 0x44,0,327,',0,0
	.dd LM147-_F_Code_Transmit
	.dw 0x0d,0x0a
.code
LM147:
	call _F_Interrupt_Off	// call with return value
.debug
	.dw '.stabn 0x44,0,328,',0,0
	.dd LM148-_F_Code_Transmit
	.dw 0x0d,0x0a
.code
LM148:
	R1=[_bEPPflags]	// QImode move
	R2=(-97)	// QImode move
	[_bEPPflags]=R1&R2
.debug
	.dw '.stabn 0x44,0,329,',0,0
	.dd LM149-_F_Code_Transmit
	.dw 0x0d,0x0a
.code
LM149:
	call _F_Interrupt_On	// call with return value
.debug
	.dw '.stabn 0x44,0,330,',0,0
	.dd LM150-_F_Code_Transmit
	.dw 0x0d,0x0a
.code
LM150:
LBE15:
L86:
.debug
	.dw '.stabn 0x44,0,331,',0,0
	.dd LM151-_F_Code_Transmit
	.dw 0x0d,0x0a
.code
LM151:
LBE13:
.debug
	.dw '.stabn 0x44,0,331,',0,0
	.dd LM152-_F_Code_Transmit
	.dw 0x0d,0x0a
.code
LM152:
L83:

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

.debug
	.dw '.stabs "pRomData:p26",160,0,0,7',0x0d,0x0a
.CODE
.debug
	.dw '.stabs "len:p5",160,0,0,8',0x0d,0x0a
.CODE
.debug
	.dw '.stabn 0xc0,0,0,',0,0
	.dd LBB13-_F_Code_Transmit
	.dw 0x0d,0x0a
.code
.debug
	.dw '.stabn 0xc0,0,0,',0,0
	.dd LBB14-_F_Code_Transmit
	.dw 0x0d,0x0a
.code
.debug
	.dw '.stabn 0xe0,0,0,',0,0
	.dd LBE14-_F_Code_Transmit
	.dw 0x0d,0x0a
.code
.debug
	.dw '.stabn 0xc0,0,0,',0,0
	.dd LBB15-_F_Code_Transmit
	.dw 0x0d,0x0a
.code
.debug
	.dw '.stabn 0xe0,0,0,',0,0
	.dd LBE15-_F_Code_Transmit
	.dw 0x0d,0x0a
.code
.debug
	.dw '.stabn 0xe0,0,0,',0,0
	.dd LBE13-_F_Code_Transmit
	.dw 0x0d,0x0a
.code
.debug
	.dw '.stabf ',0,0
	.dd LME13-_F_Code_Transmit
	.dw 0x0d,0x0a
.code
LME13:
.code
.debug
	.dw '.stabs "F_Control_Handler:F19",36,0,0,',0,0,offset _F_Control_Handler,seg _F_Control_Handler,0x0d,0x0a
.CODE
.public _F_Control_Handler
_F_Control_Handler:	.proc
.debug
	.dw '.stabn 0x44,0,335,',0,0
	.dd LM153-_F_Control_Handler
	.dw 0x0d,0x0a
.code
LM153:
	// total=4, vars=4
	// frame_pointer_needed: 1
	push bp to [sp]
	sp-=4
	bp=sp+1

	R1=BP+7
	[bp+2]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,336,',0,0
	.dd LM154-_F_Control_Handler
	.dw 0x0d,0x0a
.code
LM154:
LBB16:
.debug
	.dw '.stabn 0x44,0,337,',0,0
	.dd LM155-_F_Control_Handler
	.dw 0x0d,0x0a
.code
LM155:
	R1=[_ControlData]	// QImode move
	R2=R1&96
	[BP]=R2	// QImode move
.debug
	.dw '.stabn 0x44,0,338,',0,0
	.dd LM156-_F_Control_Handler
	.dw 0x0d,0x0a
.code
LM156:
	R2=BP	// QImode move
	R1=BP+1
	R2=[_ControlData+1]	// QImode move
	R3=R2&15
	R2=R1	// QImode move
	[R2]=R3	// QImode move
.debug
	.dw '.stabn 0x44,0,339,',0,0
	.dd LM157-_F_Control_Handler
	.dw 0x0d,0x0a
.code
LM157:
	R1=[BP]	// QImode move
	CMP R1,0	// QImode test
	JZ L94	// QImode NE
	PC=L92
L94:
.debug
	.dw '.stabn 0x44,0,341,',0,0
	.dd LM158-_F_Control_Handler
	.dw 0x0d,0x0a
.code
LM158:
	R1=BP	// QImode move
	R2=BP+1
	R1=_StandardDeviceRequest	// QImode move
	R3=R2	// QImode move
	R2=[R3]	// QImode move
	R1+=R2	// addqi3_r0r
	R2=R1	// QImode move
	R2=[R2]	// QImode move
	[bp+3]=R2	// QImode move
	R3=[bp+3]	// QImode move
	//call function by pointer without return value
	R3-=1
	R4=L95
	push R4 to [SP]
	push SR to [SP]
	pop SR, PC from [R3]
	//end of expand
L95:
.debug
	.dw '.stabn 0x44,0,342,',0,0
	.dd LM159-_F_Control_Handler
	.dw 0x0d,0x0a
.code
LM159:
	pc=L93	// Indirect jump
L92:
.debug
	.dw '.stabn 0x44,0,344,',0,0
	.dd LM160-_F_Control_Handler
	.dw 0x0d,0x0a
.code
LM160:
	call _F_Stall_Ep0	// call without return value
L93:
.debug
	.dw '.stabn 0x44,0,345,',0,0
	.dd LM161-_F_Control_Handler
	.dw 0x0d,0x0a
.code
LM161:
LBE16:
.debug
	.dw '.stabn 0x44,0,345,',0,0
	.dd LM162-_F_Control_Handler
	.dw 0x0d,0x0a
.code
LM162:
L91:

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

.debug
	.dw '.stabn 0xc0,0,0,',0,0
	.dd LBB16-_F_Control_Handler
	.dw 0x0d,0x0a
.code
.debug
	.dw '.stabs "type:4",128,0,0,0',0x0d,0x0a
.CODE
.debug
	.dw '.stabs "req:4",128,0,0,1',0x0d,0x0a
.CODE
.debug
	.dw '.stabn 0xe0,0,0,',0,0
	.dd LBE16-_F_Control_Handler
	.dw 0x0d,0x0a
.code
.debug
	.dw '.stabf ',0,0
	.dd LME14-_F_Control_Handler
	.dw 0x0d,0x0a
.code
LME14:
.code
.debug
	.dw '.stabs "F_Init_Unconfig:F19",36,0,0,',0,0,offset _F_Init_Unconfig,seg _F_Init_Unconfig,0x0d,0x0a
.CODE
.public _F_Init_Unconfig
_F_Init_Unconfig:	.proc
.debug
	.dw '.stabn 0x44,0,348,',0,0
	.dd LM163-_F_Init_Unconfig
	.dw 0x0d,0x0a
.code
LM163:
	// 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,349,',0,0
	.dd LM164-_F_Init_Unconfig
	.dw 0x0d,0x0a
.code
LM164:
	R1=0	// QImode move
	[SP--]=R1	// QImode move
	call _F_D12_SetEndpointEnable	// call without return value
	SP=SP+1
.debug
	.dw '.stabn 0x44,0,350,',0,0
	.dd LM165-_F_Init_Unconfig
	.dw 0x0d,0x0a
.code
LM165:
.debug
	.dw '.stabn 0x44,0,350,',0,0
	.dd LM166-_F_Init_Unconfig
	.dw 0x0d,0x0a
.code
LM166:
L96:

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

.debug
	.dw '.stabf ',0,0
	.dd LME15-_F_Init_Unconfig
	.dw 0x0d,0x0a
.code
LME15:
.code
.debug
	.dw '.stabs "F_Init_Config:F19",36,0,0,',0,0,offset _F_Init_Config,seg _F_Init_Config,0x0d,0x0a
.CODE

⌨️ 快捷键说明

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