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

📄 cost.asm

📁 此程序为出租车计价器
💻 ASM
📖 第 1 页 / 共 4 页
字号:
.CODE
.debug
	.dw '.stabn 0xe0,0,0,',0,0
	.dd LBE2-_Cost_WTimeToMilege
	.dw 0x0d,0x0a
.code
.debug
	.dw '.stabf ',0,0
	.dd LME5-_Cost_WTimeToMilege
	.dw 0x0d,0x0a
.code
LME5:
.code
.debug
	.dw '.stabs "Cost_GetCost:F12",36,0,0,',0,0,offset _Cost_GetCost,seg _Cost_GetCost,0x0d,0x0a
.CODE
.public _Cost_GetCost
_Cost_GetCost:	.proc
.debug
	.dw '.stabn 0x44,0,179,',0,0
	.dd LM79-_Cost_GetCost
	.dw 0x0d,0x0a
.code
LM79:
	// total=9, vars=9
	// frame_pointer_needed: 1
	push bp to [sp]
	sp-=9
	bp=sp+1

	R1=BP+12
	[BP]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,180,',0,0
	.dd LM80-_Cost_GetCost
	.dw 0x0d,0x0a
.code
LM80:
	R1=[_uiLongWay]	// QImode move
	CMP R1,0	// QImode test
	JNZ L49	// QImode EQ
	PC=L45
L49:
.debug
	.dw '.stabn 0x44,0,181,',0,0
	.dd LM81-_Cost_GetCost
	.dw 0x0d,0x0a
.code
LM81:
	call _Cost_WTimeToMilege	// call with return value
	[bp+3]=R1	// QImode move
	R1=[_fDayMilege]	// HFmode RD=[Label]
	R2=[_fDayMilege+1]
	R3=[_c_fPricePerKM]	// HFmode RD=[Label]
	R4=[_c_fPricePerKM+1]
	push R3,R4 to [sp]	// pushhf
	push R1,R2 to [sp]	// pushhf
	call __mulf2	// call with return value
	SP=SP+4
	[bp+4]=R1	// HFmode [BP+#IM6]=RS
	[bp+5]=R2
	R1=[_fNightMilege]	// HFmode RD=[Label]
	R2=[_fNightMilege+1]
	R3=[_c_fNightPricePerKM]	// HFmode RD=[Label]
	R4=[_c_fNightPricePerKM+1]
	push R3,R4 to [sp]	// pushhf
	push R1,R2 to [sp]	// pushhf
	call __mulf2	// call with return value
	SP=SP+4
	push R1,R2 to [sp]	// pushhf
	R3=[bp+4]	// HFmode RD=[BP+#IM6]
	R4=[bp+5]
	push R3,R4 to [sp]	// pushhf
	call __addf2	// call with return value
	SP=SP+4
	R3=[_c_fLongWayPrice]	// HFmode RD=[Label]
	R4=[_c_fLongWayPrice+1]
	push R3,R4 to [sp]	// pushhf
	push R1,R2 to [sp]	// pushhf
	call __mulf2	// call with return value
	SP=SP+4
	R3=[_fCost]	// HFmode RD=[Label]
	R4=[_fCost+1]
	push R3,R4 to [sp]	// pushhf
	push R1,R2 to [sp]	// pushhf
	call __addf2	// call with return value
	SP=SP+4
	[bp+1]=R1	// HFmode [BP+#IM6]=RS
	[bp+2]=R2
	R1=[bp+3]
	R2=0
	push R1,R2 to [sp]	// pushhi
	call __cvi2f2	// call with return value
	SP=SP+2
	R3=[_c_fWaitPrice]	// HFmode RD=[Label]
	R4=[_c_fWaitPrice+1]
	push R3,R4 to [sp]	// pushhf
	push R1,R2 to [sp]	// pushhf
	call __mulf2	// call with return value
	SP=SP+4
	push R1,R2 to [sp]	// pushhf
	R1=[bp+1]	// HFmode RD=[BP+#IM6]
	R2=[bp+2]
	push R1,R2 to [sp]	// pushhf
	call __addf2	// call with return value
	SP=SP+4
	[bp+1]=R1	// HFmode [BP+#IM6]=RS
	[bp+2]=R2
	R3=[bp+1]	// HFmode RD=[BP+#IM6]
	R4=[bp+2]
	R1=R3	// HFmode register to register move
	R2=R4
	pc=L44	// Indirect jump
	pc=L46	// Indirect jump
L45:
.debug
	.dw '.stabn 0x44,0,184,',0,0
	.dd LM82-_Cost_GetCost
	.dw 0x0d,0x0a
.code
LM82:
	R1=[_fDayMilege]	// HFmode RD=[Label]
	R2=[_fDayMilege+1]
	R3=[_fNightMilege]	// HFmode RD=[Label]
	R4=[_fNightMilege+1]
	push R3,R4 to [sp]	// pushhf
	push R1,R2 to [sp]	// pushhf
	call __addf2	// call with return value
	SP=SP+4
	R3=0	// HFmode immediate to register move
	R4=0
	push R3,R4 to [sp]	// pushhf
	push R1,R2 to [sp]	// pushhf
	call __cmpf2	// call with return value
	SP=SP+4
	CMP R1,1	// QImode compare
	JG L50	// QImode LE
	PC=L47
L50:
.debug
	.dw '.stabn 0x44,0,185,',0,0
	.dd LM83-_Cost_GetCost
	.dw 0x0d,0x0a
.code
LM83:
	call _Cost_WTimeToMilege	// call with return value
	[bp+8]=R1	// QImode move
	R1=[_fDayMilege]	// HFmode RD=[Label]
	R2=[_fDayMilege+1]
	R3=[_c_fPricePerKM]	// HFmode RD=[Label]
	R4=[_c_fPricePerKM+1]
	push R3,R4 to [sp]	// pushhf
	push R1,R2 to [sp]	// pushhf
	call __mulf2	// call with return value
	SP=SP+4
	R3=[_fCost]	// HFmode RD=[Label]
	R4=[_fCost+1]
	push R3,R4 to [sp]	// pushhf
	push R1,R2 to [sp]	// pushhf
	call __addf2	// call with return value
	SP=SP+4
	[bp+6]=R1	// HFmode [BP+#IM6]=RS
	[bp+7]=R2
	R1=[_fNightMilege]	// HFmode RD=[Label]
	R2=[_fNightMilege+1]
	R3=[_c_fNightPricePerKM]	// HFmode RD=[Label]
	R4=[_c_fNightPricePerKM+1]
	push R3,R4 to [sp]	// pushhf
	push R1,R2 to [sp]	// pushhf
	call __mulf2	// call with return value
	SP=SP+4
	push R1,R2 to [sp]	// pushhf
	R1=[bp+6]	// HFmode RD=[BP+#IM6]
	R2=[bp+7]
	push R1,R2 to [sp]	// pushhf
	call __addf2	// call with return value
	SP=SP+4
	[bp+6]=R1	// HFmode [BP+#IM6]=RS
	[bp+7]=R2
	R1=[bp+8]
	R2=0
	push R1,R2 to [sp]	// pushhi
	call __cvi2f2	// call with return value
	SP=SP+2
	R3=[_c_fWaitPrice]	// HFmode RD=[Label]
	R4=[_c_fWaitPrice+1]
	push R3,R4 to [sp]	// pushhf
	push R1,R2 to [sp]	// pushhf
	call __mulf2	// call with return value
	SP=SP+4
	push R1,R2 to [sp]	// pushhf
	R3=[bp+6]	// HFmode RD=[BP+#IM6]
	R4=[bp+7]
	push R3,R4 to [sp]	// pushhf
	call __addf2	// call with return value
	SP=SP+4
	[bp+6]=R1	// HFmode [BP+#IM6]=RS
	[bp+7]=R2
	R3=[bp+6]	// HFmode RD=[BP+#IM6]
	R4=[bp+7]
	R1=R3	// HFmode register to register move
	R2=R4
	pc=L44	// Indirect jump
	pc=L46	// Indirect jump
L47:
.debug
	.dw '.stabn 0x44,0,187,',0,0
	.dd LM84-_Cost_GetCost
	.dw 0x0d,0x0a
.code
LM84:
	call _Cost_WTimeToMilege	// call with return value
	R3=R1
	R4=0
	push R3,R4 to [sp]	// pushhi
	call __cvi2f2	// call with return value
	SP=SP+2
	R3=[_c_fWaitPrice]	// HFmode RD=[Label]
	R4=[_c_fWaitPrice+1]
	push R3,R4 to [sp]	// pushhf
	push R1,R2 to [sp]	// pushhf
	call __mulf2	// call with return value
	SP=SP+4
	R3=[_fCost]	// HFmode RD=[Label]
	R4=[_fCost+1]
	push R3,R4 to [sp]	// pushhf
	push R1,R2 to [sp]	// pushhf
	call __addf2	// call with return value
	SP=SP+4
	R3=R1	// HFmode register to register move
	R4=R2
	R1=R3	// HFmode register to register move
	R2=R4
	pc=L44	// Indirect jump
L48:
L46:
.debug
	.dw '.stabn 0x44,0,189,',0,0
	.dd LM85-_Cost_GetCost
	.dw 0x0d,0x0a
.code
LM85:
.debug
	.dw '.stabn 0x44,0,189,',0,0
	.dd LM86-_Cost_GetCost
	.dw 0x0d,0x0a
.code
LM86:
L44:

	sp+=9
	pop bp from [sp]
	retf
	.endp	// end of Cost_GetCost

.debug
	.dw '.stabf ',0,0
	.dd LME6-_Cost_GetCost
	.dw 0x0d,0x0a
.code
LME6:
.code
.debug
	.dw '.stabs "Cost_GetPrice:F12",36,0,0,',0,0,offset _Cost_GetPrice,seg _Cost_GetPrice,0x0d,0x0a
.CODE
.public _Cost_GetPrice
_Cost_GetPrice:	.proc
.debug
	.dw '.stabn 0x44,0,198,',0,0
	.dd LM87-_Cost_GetPrice
	.dw 0x0d,0x0a
.code
LM87:
	// 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,199,',0,0
	.dd LM88-_Cost_GetPrice
	.dw 0x0d,0x0a
.code
LM88:
	R3=[_fCurPrice]	// HFmode RD=[Label]
	R4=[_fCurPrice+1]
	[BP++]=R3	// [RD]=RS HFmode, RD!=RS+1
	[BP--]=R4
	R3=[BP++]	// RD=[RS] HFmode, RD!=RS
	R4=[BP--]
	R1=R3	// HFmode register to register move
	R2=R4
	pc=L51	// Indirect jump
.debug
	.dw '.stabn 0x44,0,200,',0,0
	.dd LM89-_Cost_GetPrice
	.dw 0x0d,0x0a
.code
LM89:
.debug
	.dw '.stabn 0x44,0,200,',0,0
	.dd LM90-_Cost_GetPrice
	.dw 0x0d,0x0a
.code
LM90:
L51:

	sp+=3
	pop bp from [sp]
	retf
	.endp	// end of Cost_GetPrice

.debug
	.dw '.stabf ',0,0
	.dd LME7-_Cost_GetPrice
	.dw 0x0d,0x0a
.code
LME7:
.code
.debug
	.dw '.stabs "Cost_GetWaitTime:F5",36,0,0,',0,0,offset _Cost_GetWaitTime,seg _Cost_GetWaitTime,0x0d,0x0a
.CODE
.public _Cost_GetWaitTime
_Cost_GetWaitTime:	.proc
.debug
	.dw '.stabn 0x44,0,209,',0,0
	.dd LM91-_Cost_GetWaitTime
	.dw 0x0d,0x0a
.code
LM91:
	// 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,210,',0,0
	.dd LM92-_Cost_GetWaitTime
	.dw 0x0d,0x0a
.code
LM92:
	R1=[_uiWaiting]	// QImode move
	CMP R1,0	// QImode test
	JNZ L55	// QImode EQ
	PC=L53
L55:
.debug
	.dw '.stabn 0x44,0,211,',0,0
	.dd LM93-_Cost_GetWaitTime
	.dw 0x0d,0x0a
.code
LM93:
	R1=1	// QImode move
	[SP--]=R1	// QImode move
	call _Cal_ReadTimer	// call with return value
	SP=SP+1
	R3=1	// QImode move
	[SP--]=R3	// QImode move
	push R1,R2 to [sp]	// pushhi
	call __rshu2	// call with return value
	SP=SP+3
	R3=R1+[_ulWaitTime]	// HImode RD=RS+[#IM16]
	R4=R2+[_ulWaitTime+1], Carry
	R1=R3	// HImode register to register move
	R2=R4
	pc=L52	// Indirect jump
	pc=L54	// Indirect jump
L53:
.debug
	.dw '.stabn 0x44,0,213,',0,0
	.dd LM94-_Cost_GetWaitTime
	.dw 0x0d,0x0a
.code
LM94:
	R3=[_ulWaitTime]	// HImode RD=[Label]
	R4=[_ulWaitTime+1]
	R1=R3	// HImode register to register move
	R2=R4
	pc=L52	// Indirect jump
L54:
.debug
	.dw '.stabn 0x44,0,214,',0,0
	.dd LM95-_Cost_GetWaitTime
	.dw 0x0d,0x0a
.code
LM95:
.debug
	.dw '.stabn 0x44,0,214,',0,0
	.dd LM96-_Cost_GetWaitTime
	.dw 0x0d,0x0a
.code
LM96:
L52:

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

.debug
	.dw '.stabf ',0,0
	.dd LME8-_Cost_GetWaitTime
	.dw 0x0d,0x0a
.code
LME8:
.code
.debug
	.dw '.stabs "Cost_WaitOrNot:F4",36,0,0,',0,0,offset _Cost_WaitOrNot,seg _Cost_WaitOrNot,0x0d,0x0a
.CODE
.public _Cost_WaitOrNot
_Cost_WaitOrNot:	.proc
.debug
	.dw '.stabn 0x44,0,224,',0,0
	.dd LM97-_Cost_WaitOrNot
	.dw 0x0d,0x0a
.code
LM97:
	// total=0, vars=0
	// frame_pointer_needed: 1
	push bp to [sp]
	bp=sp+1

	R2=BP+3
.debug
	.dw '.stabn 0x44,0,225,',0,0
	.dd LM98-_Cost_WaitOrNot
	.dw 0x0d,0x0a
.code
LM98:
	R3=[_uiWaiting]	// QImode move
	R1=R3	// QImode move
	pc=L56	// Indirect jump
.debug
	.dw '.stabn 0x44,0,226,',0,0
	.dd LM99-_Cost_WaitOrNot
	.dw 0x0d,0x0a
.code
LM99:
.debug
	.dw '.stabn 0x44,0,226,',0,0
	.dd LM100-_Cost_WaitOrNot
	.dw 0x0d,0x0a
.code
LM100:
L56:

	pop bp from [sp]
	retf
	.endp	// end of Cost_WaitOrNot

.debug
	.dw '.stabf ',0,0
	.dd LME9-_Cost_WaitOrNot
	.dw 0x0d,0x0a
.code
LME9:
.code
.debug
	.dw '.stabs "Cost_ServiceLoop:F19",36,0,0,',0,0,offset _Cost_ServiceLoop,seg _Cost_ServiceLoop,0x0d,0x0a
.CODE
.public _Cost_ServiceLoop
_Cost_ServiceLoop:	.proc
.debug
	.dw '.stabn 0x44,0,236,',0,0
	.dd LM101-_Cost_ServiceLoop
	.dw 0x0d,0x0a
.code
LM101:
	// total=15, vars=15
	// frame_pointer_needed: 1
	push bp to [sp]
	sp-=15
	bp=sp+1

	R1=BP+18
	[bp+3]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,237,',0,0
	.dd LM102-_Cost_ServiceLoop
	.dw 0x0d,0x0a
.code
LM102:
LBB3:
.debug
	.dw '.stabn 0x44,0,240,',0,0
	.dd LM103-_Cost_ServiceLoop
	.dw 0x0d,0x0a
.code
LM103:
	R1=[_uiWaiting]	// QImode move
	CMP R1,1	// QImode compare
	JZ L74	// QImode NE
	PC=L58
L74:
.debug
	.dw '.stabn 0x44,0,242,',0,0
	.dd LM104-_Cost_ServiceLoop
	.dw 0x0d,0x0a
.code
LM104:
	call _Dis_GetSpeed	// call with return value
	R3=R1
	R4=0
	push R3,R4 to [sp]	// pushhi
	call __cvi2f2	// call with return value
	SP=SP+2
	R3=[_c_fWaitSpeed2]	// HFmode RD=[Label]
	R4=[_c_fWaitSpeed2+1]
	push R3,R4 to [sp]	// pushhf
	push R1,R2 to [sp]	// pushhf
	call __cmpf2	// call with return value
	SP=SP+4
	CMP R1,1	// QImode compare
	JNL L75	// QImode LT
	PC=L59
L75:
.debug
	.dw '.stabn 0x44,0,244,',0,0
	.dd LM105-_Cost_ServiceLoop
	.dw 0x0d,0x0a
.code
LM105:
	R1=1	// QImode move
	[SP--]=R1	// QImode move
	call _Cal_ReadTimer	// call with return value
	SP=SP+1
	R3=1	// QImode move
	[SP--]=R3	// QImode move
	push R1,R2 to [sp]	// pushhi
	call __rshu2	// call with return value
	SP=SP+3
	[bp+13]=R1	// HImode [BP+#IM6]=RS
	[bp+14]=R2
	R3=[_ulWaitTime]	// HImode RD=[Label]
	R4=[_ulWaitTime+1]
	[bp+4]=R3	// HImode [BP+#IM6]=RS
	[bp+5]=R4
	R4=[bp+4]	// QImode move
	[bp+6]=R4	// QImode move
	R3=[bp+6]	// QImode move
	R4=[bp+13]	// QImode move
	R3+=R4	// addqi3_r0r
	[bp+6]=R3	// QImode move
	R1=[bp+6]	// QImode move
	R3=1	// QImode move
	[bp+7]=R3	// QImode move
	R4=[bp+6]	// QImode move
	R3=[bp+4]	// QImode move
	CMP R4,R3	// QImode compare
	JNB L76	// QImode LTU
	PC=L60
L76:
	R4=0	// QImode move
	[bp+7]=R4	// QImode move
L60:
	R3=[bp+5]	// QImode move
	[bp+8]=R3	// QImode move
	R4=[bp+8]	// QImode move
	R3=[bp+14]	// QImode move
	R4+=R3	// addqi3_r0r
	[bp+8]=R4	// QImode move
	R2=[bp+8]	// QImode move
	R3=[bp+8]	// QImode move
	R4=[bp+7]	// QImode move
	R3+=R4	// addqi3_r0r
	R2=R3	// QImode move
	[_ulWaitTime]=R1	// HImode [Label]=RS
	[_ulWaitTime+1]=R2
.debug
	.dw '.stabn 0x44,0,245,',0,0
	.dd LM106-_Cost_ServiceLoop
	.dw 0x0d,0x0a
.code
LM106:
	R1=1	// QImode move
	[SP--]=R1	// QImode move
	call _Cal_ClearTimer	// call without return value
	SP=SP+1
.debug
	.dw '.stabn 0x44,0,246,',0,0
	.dd LM107-_Cost_ServiceLoop
	.dw 0x0d,0x0a
.code
LM107:
	R1=0	// QImode move
	[_uiWaiting]=R1	// QImode move
L59:
.debug
	.dw '.stabn 0x44,0,248,',0,0
	.dd LM108-_Cost_ServiceLoop
	.dw 0x0d,0x0a
.code
LM108:
	pc=L61	// Indirect jump
L58:
.debug
	.dw '.stabn 0x44,0,249,',0,0
	.dd LM109-_Cost_ServiceLoop
	.dw 0x0d,0x0a
.code
LM109:
	call _Dis_GetSpeed	// call with return value
	R3=R1
	R4=0
	push R3,R4 to [sp]	// pushhi
	call __cvi2f2	// call with return value
	SP=SP+2
	R3=[_c_fWaitSpeed1]	// HFmode RD=[Label]
	R4=[_c_fWaitSpeed1+1]
	push R3,R4 to [sp]	// pushhf
	push R1,R2 to [sp]	// pushhf
	call __cmpf2	// call with return value
	SP=SP+4
	CMP R1,1	// QImode compare
	JNG L77	// QImode GT
	PC=L61
L77:
.debug
	.dw '.stabn 0x44,0,251,',0,0
	.dd LM110-_Cost_ServiceLoop
	.dw 0x0d,0x0a
.code
LM110:
	R1=1	// QImode move
	[SP--]=R1	// QImode move
	call _Cal_StartTimer	// call without return value
	SP=SP+1
.debug
	.dw '.stabn 0x44,0,252,',0,0
	.dd LM111-_Cost_ServiceLoop
	.dw 0x0d,0x0a
.code
LM111:
	R1=1	// QImode move
	[_uiWaiting]=R1	// QImode move
L62:
L61:
.debug
	.dw '.stabn 0x44,0,255,',0,0
	.dd LM112-_Cost_ServiceLoop
	.dw 0x0d,0x0a
.code
LM112:
	call _Dis_GetDistance	// call with return value
	[BP++]=R1	// [RD]=RS HFmode, RD!=RS+1
	[BP--]=R2
.debug
	.dw '.stabn 0x44,0,256,',0,0
	.dd LM113-_Cost_ServiceLoop
	.dw 0x0d,0x0a
.code
LM113:

⌨️ 快捷键说明

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