chap9.asm
来自「SPCE061A_USB可以让你自己检测开发板是否能正常动作」· 汇编 代码 · 共 3,294 行 · 第 1/5 页
ASM
3,294 行
.public _F_Init_Config
_F_Init_Config: .proc
.debug
.dw '.stabn 0x44,0,352,',0,0
.dd LM167-_F_Init_Config
.dw 0x0d,0x0a
.code
LM167:
// 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,353,',0,0
.dd LM168-_F_Init_Config
.dw 0x0d,0x0a
.code
LM168:
R1=1 // QImode move
[SP--]=R1 // QImode move
call _F_D12_SetEndpointEnable // call without return value
SP=SP+1
.debug
.dw '.stabn 0x44,0,354,',0,0
.dd LM169-_F_Init_Config
.dw 0x0d,0x0a
.code
LM169:
.debug
.dw '.stabn 0x44,0,354,',0,0
.dd LM170-_F_Init_Config
.dw 0x0d,0x0a
.code
LM170:
L97:
sp+=1
pop bp from [sp]
retf
.endp // end of F_Init_Config
.debug
.dw '.stabf ',0,0
.dd LME16-_F_Init_Config
.dw 0x0d,0x0a
.code
LME16:
.code
.debug
.dw '.stabs "F_Ep0_RxDone_Detail:F19",36,0,0,',0,0,offset _F_Ep0_RxDone_Detail,seg _F_Ep0_RxDone_Detail,0x0d,0x0a
.CODE
.public _F_Ep0_RxDone_Detail
_F_Ep0_RxDone_Detail: .proc
.debug
.dw '.stabn 0x44,0,361,',0,0
.dd LM171-_F_Ep0_RxDone_Detail
.dw 0x0d,0x0a
.code
LM171:
// total=9, vars=9
// frame_pointer_needed: 1
push bp to [sp]
sp-=9
bp=sp+1
R1=BP+12
[bp+1]=R1 // QImode move
.debug
.dw '.stabn 0x44,0,362,',0,0
.dd LM172-_F_Ep0_RxDone_Detail
.dw 0x0d,0x0a
.code
LM172:
LBB17:
.debug
.dw '.stabn 0x44,0,363,',0,0
.dd LM173-_F_Ep0_RxDone_Detail
.dw 0x0d,0x0a
.code
LM173:
R2=[_ep_last] // QImode move
R1=R2&32
CMP R1,0 // QImode test
JNZ L113 // QImode EQ
PC=L99
L113:
.debug
.dw '.stabn 0x44,0,365,',0,0
.dd LM174-_F_Ep0_RxDone_Detail
.dw 0x0d,0x0a
.code
LM174:
R1=0 // HImode immediate to register move
R2=0
[_ControlData+8]=R1 // HImode [Label]=RS
[_ControlData+9]=R2
.debug
.dw '.stabn 0x44,0,366,',0,0
.dd LM175-_F_Ep0_RxDone_Detail
.dw 0x0d,0x0a
.code
LM175:
R1=0 // HImode immediate to register move
R2=0
[_ControlData+10]=R1 // HImode [Label]=RS
[_ControlData+11]=R2
.debug
.dw '.stabn 0x44,0,368,',0,0
.dd LM176-_F_Ep0_RxDone_Detail
.dw 0x0d,0x0a
.code
LM176:
R1=_ControlData // QImode move
[SP--]=R1 // QImode move
R1=8 // QImode move
[SP--]=R1 // QImode move
R1=0 // QImode move
[SP--]=R1 // QImode move
call _F_D12_ReadEndpoint // call with return value
SP=SP+3
[_ReadCtrNum]=R1 // QImode move
.debug
.dw '.stabn 0x44,0,369,',0,0
.dd LM177-_F_Ep0_RxDone_Detail
.dw 0x0d,0x0a
.code
LM177:
R1=[_ReadCtrNum] // QImode move
CMP R1,8 // QImode compare
JNZ L114 // QImode EQ
PC=L100
L114:
.debug
.dw '.stabn 0x44,0,371,',0,0
.dd LM178-_F_Ep0_RxDone_Detail
.dw 0x0d,0x0a
.code
LM178:
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,372,',0,0
.dd LM179-_F_Ep0_RxDone_Detail
.dw 0x0d,0x0a
.code
LM179:
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,373,',0,0
.dd LM180-_F_Ep0_RxDone_Detail
.dw 0x0d,0x0a
.code
LM180:
R1=[_bEPPflags] // QImode move
R2=(-97) // QImode move
[_bEPPflags]=R1&R2
.debug
.dw '.stabn 0x44,0,374,',0,0
.dd LM181-_F_Ep0_RxDone_Detail
.dw 0x0d,0x0a
.code
LM181:
pc=L98 // Indirect jump
L100:
.debug
.dw '.stabn 0x44,0,378,',0,0
.dd LM182-_F_Ep0_RxDone_Detail
.dw 0x0d,0x0a
.code
LM182:
R1=0 // QImode move
[SP--]=R1 // QImode move
call _F_D12_AcknowledgeEndpoint // call without return value
SP=SP+1
.debug
.dw '.stabn 0x44,0,379,',0,0
.dd LM183-_F_Ep0_RxDone_Detail
.dw 0x0d,0x0a
.code
LM183:
R1=1 // QImode move
[SP--]=R1 // QImode move
call _F_D12_AcknowledgeEndpoint // call without return value
SP=SP+1
.debug
.dw '.stabn 0x44,0,380,',0,0
.dd LM184-_F_Ep0_RxDone_Detail
.dw 0x0d,0x0a
.code
LM184:
R1=[_ControlData+6] // HImode RD=[Label]
R2=[_ControlData+7]
[_ControlData+8]=R1 // HImode [Label]=RS
[_ControlData+9]=R2
.debug
.dw '.stabn 0x44,0,381,',0,0
.dd LM185-_F_Ep0_RxDone_Detail
.dw 0x0d,0x0a
.code
LM185:
R1=0 // HImode immediate to register move
R2=0
[_ControlData+10]=R1 // HImode [Label]=RS
[_ControlData+11]=R2
.debug
.dw '.stabn 0x44,0,382,',0,0
.dd LM186-_F_Ep0_RxDone_Detail
.dw 0x0d,0x0a
.code
LM186:
R2=[_ControlData] // QImode move
R1=R2&128
CMP R1,0 // QImode test
JNZ L115 // QImode EQ
PC=L101
L115:
.debug
.dw '.stabn 0x44,0,384,',0,0
.dd LM187-_F_Ep0_RxDone_Detail
.dw 0x0d,0x0a
.code
LM187:
R1=[_bEPPflags] // QImode move
R2=4 // QImode move
[_bEPPflags]=R1|R2
.debug
.dw '.stabn 0x44,0,385,',0,0
.dd LM188-_F_Ep0_RxDone_Detail
.dw 0x0d,0x0a
.code
LM188:
R1=[_bEPPflags] // QImode move
R2=(-97) // QImode move
[_bEPPflags]=R1&R2
.debug
.dw '.stabn 0x44,0,386,',0,0
.dd LM189-_F_Ep0_RxDone_Detail
.dw 0x0d,0x0a
.code
LM189:
pc=L102 // Indirect jump
L101:
.debug
.dw '.stabn 0x44,0,389,',0,0
.dd LM190-_F_Ep0_RxDone_Detail
.dw 0x0d,0x0a
.code
LM190:
R1=[_ControlData+6] // HImode RD=[Label]
R2=[_ControlData+7]
CMP R2,0 // HImode test
JNZ L116 // HImode NE
CMP R1,0
JZ L117
L116:
PC=L103
L117:
.debug
.dw '.stabn 0x44,0,391,',0,0
.dd LM191-_F_Ep0_RxDone_Detail
.dw 0x0d,0x0a
.code
LM191:
R1=[_bEPPflags] // QImode move
R2=4 // QImode move
[_bEPPflags]=R1|R2
.debug
.dw '.stabn 0x44,0,392,',0,0
.dd LM192-_F_Ep0_RxDone_Detail
.dw 0x0d,0x0a
.code
LM192:
R1=[_bEPPflags] // QImode move
R2=(-97) // QImode move
[_bEPPflags]=R1&R2
.debug
.dw '.stabn 0x44,0,393,',0,0
.dd LM193-_F_Ep0_RxDone_Detail
.dw 0x0d,0x0a
.code
LM193:
pc=L102 // Indirect jump
L103:
.debug
.dw '.stabn 0x44,0,396,',0,0
.dd LM194-_F_Ep0_RxDone_Detail
.dw 0x0d,0x0a
.code
LM194:
R1=[_ControlData+6] // HImode RD=[Label]
R2=[_ControlData+7]
CMP R2,0 // HImode compare
JA L119 // HImode LEU
JNZ L118
CMP R1,8
JA L119
L118:
PC=L105
L119:
.debug
.dw '.stabn 0x44,0,398,',0,0
.dd LM195-_F_Ep0_RxDone_Detail
.dw 0x0d,0x0a
.code
LM195:
R1=[_bEPPflags] // QImode move
R2=(-97) // QImode move
[_bEPPflags]=R1&R2
.debug
.dw '.stabn 0x44,0,399,',0,0
.dd LM196-_F_Ep0_RxDone_Detail
.dw 0x0d,0x0a
.code
LM196:
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,400,',0,0
.dd LM197-_F_Ep0_RxDone_Detail
.dw 0x0d,0x0a
.code
LM197:
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,401,',0,0
.dd LM198-_F_Ep0_RxDone_Detail
.dw 0x0d,0x0a
.code
LM198:
pc=L102 // Indirect jump
L105:
.debug
.dw '.stabn 0x44,0,404,',0,0
.dd LM199-_F_Ep0_RxDone_Detail
.dw 0x0d,0x0a
.code
LM199:
R1=[_bEPPflags] // QImode move
R2=(-97) // QImode move
[_bEPPflags]=R1&R2
R1=[_bEPPflags] // QImode move
R2=64 // QImode move
[_bEPPflags]=R1|R2
L106:
L104:
L102:
.debug
.dw '.stabn 0x44,0,408,',0,0
.dd LM200-_F_Ep0_RxDone_Detail
.dw 0x0d,0x0a
.code
LM200:
pc=L107 // Indirect jump
L99:
.debug
.dw '.stabn 0x44,0,410,',0,0
.dd LM201-_F_Ep0_RxDone_Detail
.dw 0x0d,0x0a
.code
LM201:
R1=[_bEPPflags] // QImode move
R2=5 // QImode move
[SP--]=R2 // QImode move
[SP--]=R1 // QImode move
call __rshu1 // call with return value
SP=SP+2
R2=R1&3
CMP R2,2 // QImode compare
JZ L120 // QImode NE
PC=L108
L120:
.debug
.dw '.stabn 0x44,0,412,',0,0
.dd LM202-_F_Ep0_RxDone_Detail
.dw 0x0d,0x0a
.code
LM202:
R2=_ControlData+13 // QImode move
R1=R2+[_ControlData+10] // addqi3_r0R
[SP--]=R1 // QImode move
R1=16 // QImode move
[SP--]=R1 // QImode move
R1=0 // QImode move
[SP--]=R1 // QImode move
call _F_D12_ReadEndpoint // call with return value
SP=SP+3
[BP]=R1 // QImode move
.debug
.dw '.stabn 0x44,0,415,',0,0
.dd LM203-_F_Ep0_RxDone_Detail
.dw 0x0d,0x0a
.code
LM203:
R3=[BP]
R4=0
[bp+7]=R3 // HImode [BP+#IM6]=RS
[bp+8]=R4
R1=[_ControlData+10] // HImode RD=[Label]
R2=[_ControlData+11]
[bp+2]=R1 // HImode [BP+#IM6]=RS
[bp+3]=R2
R3=[bp+2] // QImode move
[bp+4]=R3 // QImode move
R4=[bp+4] // QImode move
R3=[bp+7] // QImode move
R4+=R3 // addqi3_r0r
[bp+4]=R4 // QImode move
R1=[bp+4] // QImode move
R4=1 // QImode move
[bp+5]=R4 // QImode move
R3=[bp+4] // QImode move
R4=[bp+2] // QImode move
CMP R3,R4 // QImode compare
JNB L121 // QImode LTU
PC=L109
L121:
R3=0 // QImode move
[bp+5]=R3 // QImode move
L109:
R4=[bp+3] // QImode move
[bp+6]=R4 // QImode move
R3=[bp+6] // QImode move
R4=[bp+8] // QImode move
R3+=R4 // addqi3_r0r
[bp+6]=R3 // QImode move
R2=[bp+6] // QImode move
R3=[bp+6] // QImode move
R4=[bp+5] // QImode move
R3+=R4 // addqi3_r0r
R2=R3 // QImode move
[_ControlData+10]=R1 // HImode [Label]=RS
[_ControlData+11]=R2
.debug
.dw '.stabn 0x44,0,416,',0,0
.dd LM204-_F_Ep0_RxDone_Detail
.dw 0x0d,0x0a
.code
LM204:
R1=[BP] // QImode move
CMP R1,16 // QImode compare
JZ L122 // QImode NE
PC=L111
L122:
R1=[_ControlData+10] // HImode RD=[Label]
R2=[_ControlData+11]
R3=[_ControlData+8] // HImode RD=[Label]
R4=[_ControlData+9]
CMP R2,R4 // HImode compare
JB L124 // HImode GEU
JNZ L123
CMP R1,R3
JB L124
L123:
PC=L111
L124:
pc=L110 // Indirect jump
L111:
.debug
.dw '.stabn 0x44,0,418,',0,0
.dd LM205-_F_Ep0_RxDone_Detail
.dw 0x0d,0x0a
.code
LM205:
R1=[_bEPPflags] // QImode move
R2=4 // QImode move
[_bEPPflags]=R1|R2
.debug
.dw '.stabn 0x44,0,419,',0,0
.dd LM206-_F_Ep0_RxDone_Detail
.dw 0x0d,0x0a
.code
LM206:
R1=[_bEPPflags] // QImode move
R2=(-97) // QImode move
[_bEPPflags]=R1&R2
L110:
.debug
.dw '.stabn 0x44,0,421,',0,0
.dd LM207-_F_Ep0_RxDone_Detail
.dw 0x0d,0x0a
.code
LM207:
pc=L107 // Indirect jump
L108:
.debug
.dw '.stabn 0x44,0,425,',0,0
.dd LM208-_F_Ep0_RxDone_Detail
.dw 0x0d,0x0a
.code
LM208:
R1=[_bEPPflags] // QImode move
R2=(-97) // QImode move
[_bEPPflags]=R1&R2
L112:
L107:
.debug
.dw '.stabn 0x44,0,427,',0,0
.dd LM209-_F_Ep0_RxDone_Detail
.dw 0x0d,0x0a
.code
LM209:
LBE17:
.debug
.dw '.stabn 0x44,0,427,',0,0
.dd LM210-_F_Ep0_RxDone_Detail
.dw 0x0d,0x0a
.code
LM210:
L98:
sp+=9
pop bp from [sp]
retf
.endp // end of F_Ep0_RxDone_Detail
.debug
.dw '.stabn 0xc0,0,0,',0,0
.dd LBB17-_F_Ep0_RxDone_Detail
.dw 0x0d,0x0a
.code
.debug
.dw '.stabs "i:4",128,0,0,0',0x0d,0x0a
.CODE
.debug
.dw '.stabn 0xe0,0,0,',0,0
.dd LBE17-_F_Ep0_RxDone_Detail
.dw 0x0d,0x0a
.code
.debug
.dw '.stabf ',0,0
.dd LME17-_F_Ep0_RxDone_Detail
.dw 0x0d,0x0a
.code
LME17:
.code
.debug
.dw '.stabs "F_Ep0_TxDone_Detail:F19",36,0,0,',0,0,offset _F_Ep0_TxDone_Detail,seg _F_Ep0_TxDone_Detail,0x0d,0x0a
.CODE
.public _F_Ep0_TxDone_Detail
_F_Ep0_TxDone_Detail: .proc
.debug
.dw '.stabn 0x44,0,429,',0,0
.dd LM211-_F_Ep0_TxDone_Detail
.dw 0x0d,0x0a
.code
LM211:
// total=3, vars=3
// frame_pointer_needed: 1
push bp to [sp]
sp-=3
bp=sp+1
R1=BP+6
[bp+2]=R1 // QImode move
.debug
.dw '.stabn 0x44,0,430,',0,0
.dd LM212-_F_Ep0_TxDone_Detail
.dw 0x0d,0x0a
.code
LM212:
LBB18:
R1=[_ControlData+8] // HImode RD=[Label]
R2=[_ControlData+9]
R3=R1 // HImode register to register move
R4=R2
R3-=[_ControlData+10] // HImode RD-=[#IM16]
R4-=[_ControlData+11], Carry
[BP++]=R3 // [RD]=RS HImode, RD!=RS+1
[BP--]=R4
.debug
.dw '.stabn 0x44,0,431,',0,0
.dd LM213-_F_Ep0_TxDone_Detail
.dw 0x0d,0x0a
.code
LM213:
R1=[_bEPPflags] // QImode move
R2=5 // QImode move
[SP--]=R2 // QImode move
[SP--]=R1 // QImode move
call __rshu1 // call with return value
SP=SP+2
R2=R1&3
CMP R2,1 // QImode compare
JNZ L132 // QImode EQ
PC=L126
L132:
.debug
.dw '.stabn 0x44,0,432,',0,0
.dd LM214-_F_Ep0_TxDone_Detail
.dw 0x0d,0x0a
.code
LM214:
pc=L125 // Indirect jump
L126:
.debug
.dw '.stabn 0x44,0,433,',0,0
.dd LM215-_F_Ep0_TxDone_Detail
.dw 0x0d,0x0a
.code
LM215:
R1=[BP++] // RD=[RS] HImode, RD!=RS
R2=[BP--]
CMP R2,0 // HImode compare
JA L134 // HImode LEU
JNZ L133
CMP R1,15
JA L134
L133:
PC=L127
L134:
.debug
.dw '.stabn 0x44,0,435,',0,0
.dd LM216-_F_Ep0_TxDone_Detail
.dw 0x0d,0x0a
.code
LM216:
R2=[_ControlData+12] // QImode move
R1=R2+[_ControlData+10] // addqi3_r0R
[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,436,',0,0
.dd LM217-_F_Ep0_TxDone_Detail
.dw 0x0d,0x0a
.code
LM217:
R1=[_ControlData+10] // HImode RD=[Label]
R2=[_ControlData+11]
R3=R1+16 // HImode RD=RS+#IMM16
R4=R2+0, Carry
[_Control
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?