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

📄 os_core.asm

📁 此代码是ucos-II在凌阳61单片机上的移植
💻 ASM
📖 第 1 页 / 共 5 页
字号:
.debug
	.dw '.stabs "OSInit:F19",36,0,0,',0,0,offset _OSInit,seg _OSInit,0x0d,0x0a
.CODE
.public _OSInit
_OSInit:	.proc
.debug
	.dw '.stabn 0x44,0,226,',0,0
	.dd LM43-_OSInit
	.dw 0x0d,0x0a
.code
LM43:
	// total=3, vars=3
	// frame_pointer_needed: 1
	push bp to [sp]
	sp-=3
	bp=sp+1

	R1=BP+6
	[bp+1]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,227,',0,0
	.dd LM44-_OSInit
	.dw 0x0d,0x0a
.code
LM44:
LBB4:
.debug
	.dw '.stabn 0x44,0,230,',0,0
	.dd LM45-_OSInit
	.dw 0x0d,0x0a
.code
LM45:
	//split R1, 0
	R1=0	// QImode move
	R2=0	// QImode move
	//split [_OSTime], R1
	[_OSTime]=R1	// QImode move
	[_OSTime+1]=R2	// QImode move
.debug
	.dw '.stabn 0x44,0,231,',0,0
	.dd LM46-_OSInit
	.dw 0x0d,0x0a
.code
LM46:
	R1=0	// QImode move
	[_OSIntNesting]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,232,',0,0
	.dd LM47-_OSInit
	.dw 0x0d,0x0a
.code
LM47:
	R1=0	// QImode move
	[_OSLockNesting]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,234,',0,0
	.dd LM48-_OSInit
	.dw 0x0d,0x0a
.code
LM48:
	R1=0	// QImode move
	[_OSTaskCtr]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,236,',0,0
	.dd LM49-_OSInit
	.dw 0x0d,0x0a
.code
LM49:
	R1=0	// QImode move
	[_OSRunning]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,237,',0,0
	.dd LM50-_OSInit
	.dw 0x0d,0x0a
.code
LM50:
	//split R1, 0
	R1=0	// QImode move
	R2=0	// QImode move
	//split [_OSIdleCtr], R1
	[_OSIdleCtr]=R1	// QImode move
	[_OSIdleCtr+1]=R2	// QImode move
.debug
	.dw '.stabn 0x44,0,243,',0,0
	.dd LM51-_OSInit
	.dw 0x0d,0x0a
.code
LM51:
	//split R1, 0
	R1=0	// QImode move
	R2=0	// QImode move
	//split [_OSCtxSwCtr], R1
	[_OSCtxSwCtr]=R1	// QImode move
	[_OSCtxSwCtr+1]=R2	// QImode move
.debug
	.dw '.stabn 0x44,0,244,',0,0
	.dd LM52-_OSInit
	.dw 0x0d,0x0a
.code
LM52:
	R1=0	// QImode move
	[_OSRdyGrp]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,245,',0,0
	.dd LM53-_OSInit
	.dw 0x0d,0x0a
.code
LM53:
	R1=0	// QImode move
	[BP]=R1	// QImode move
L20:
	R1=[BP]	// QImode move
	CMP R1,1	// QImode compare
	NSJNA L23	//QImode LEU
	pc=L21	// Indirect jump
L23:
.debug
	.dw '.stabn 0x44,0,246,',0,0
	.dd LM54-_OSInit
	.dw 0x0d,0x0a
.code
LM54:
	R2=[BP]	// QImode move
	R1=R2	// QImode move
	R1=R1+_OSRdyTbl
	R2=0	// QImode move
	R3=R1	// QImode move
	[R3]=R2	// QImode move
.debug
	.dw '.stabn 0x44,0,245,',0,0
	.dd LM55-_OSInit
	.dw 0x0d,0x0a
.code
LM55:
L22:
	R1=[BP]	// QImode move
	R2=R1+1
	[BP]=R2	// QImode move
	pc=L20	// Indirect jump
L21:
.debug
	.dw '.stabn 0x44,0,249,',0,0
	.dd LM56-_OSInit
	.dw 0x0d,0x0a
.code
LM56:
	R1=0	// QImode move
	[_OSPrioCur]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,250,',0,0
	.dd LM57-_OSInit
	.dw 0x0d,0x0a
.code
LM57:
	R1=0	// QImode move
	[_OSPrioHighRdy]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,251,',0,0
	.dd LM58-_OSInit
	.dw 0x0d,0x0a
.code
LM58:
	R1=0	// QImode move
	[_OSTCBHighRdy]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,252,',0,0
	.dd LM59-_OSInit
	.dw 0x0d,0x0a
.code
LM59:
	R1=0	// QImode move
	[_OSTCBCur]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,253,',0,0
	.dd LM60-_OSInit
	.dw 0x0d,0x0a
.code
LM60:
	R1=0	// QImode move
	[_OSTCBList]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,254,',0,0
	.dd LM61-_OSInit
	.dw 0x0d,0x0a
.code
LM61:
	R1=0	// QImode move
	[BP]=R1	// QImode move
L24:
	R1=[BP]	// QImode move
	CMP R1,12	// QImode compare
	NSJNA L27	//QImode LEU
	pc=L25	// Indirect jump
L27:
.debug
	.dw '.stabn 0x44,0,255,',0,0
	.dd LM62-_OSInit
	.dw 0x0d,0x0a
.code
LM62:
	R1=_OSTCBPrioTbl	// QImode move
	R2=[BP]	// QImode move
	R1 = R1 + R2	//addqi3
	R2=0	// QImode move
	R4=R1	// QImode move
	[R4]=R2	// QImode move
.debug
	.dw '.stabn 0x44,0,254,',0,0
	.dd LM63-_OSInit
	.dw 0x0d,0x0a
.code
LM63:
L26:
	R1=[BP]	// QImode move
	R2=R1+1
	[BP]=R2	// QImode move
	pc=L24	// Indirect jump
L25:
.debug
	.dw '.stabn 0x44,0,257,',0,0
	.dd LM64-_OSInit
	.dw 0x0d,0x0a
.code
LM64:
	R1=0	// QImode move
	[BP]=R1	// QImode move
L28:
	R1=[BP]	// QImode move
	CMP R1,11	// QImode compare
	NSJNA L31	//QImode LEU
	pc=L29	// Indirect jump
L31:
.debug
	.dw '.stabn 0x44,0,258,',0,0
	.dd LM65-_OSInit
	.dw 0x0d,0x0a
.code
LM65:
	R1=[BP]	// QImode move
	R2=11	// QImode move
	mr=R1*R2	// r3=R1*R2 16bit=16bit*16bit
	R2=_OSTCBTbl+1	// QImode move
	R1=R2	// QImode move
	R1 = R1 + R3	//addqi3
	R2=[BP]	// QImode move
	R3=11	// QImode move
	[bp+2]=R3	// QImode move
	R4=[bp+2]	// QImode move
	mr=R2*R4	// r3=R2*R4 16bit=16bit*16bit
	R4=_OSTCBTbl+11	// QImode move
	R2=R4	// QImode move
	R2 = R2 + R3	//addqi3
	R3=R1	// QImode move
	[R3]=R2	// QImode move
.debug
	.dw '.stabn 0x44,0,257,',0,0
	.dd LM66-_OSInit
	.dw 0x0d,0x0a
.code
LM66:
L30:
	R1=[BP]	// QImode move
	R2=R1+1
	[BP]=R2	// QImode move
	pc=L28	// Indirect jump
L29:
.debug
	.dw '.stabn 0x44,0,260,',0,0
	.dd LM67-_OSInit
	.dw 0x0d,0x0a
.code
LM67:
	R1=0	// QImode move
	[_OSTCBTbl+133]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,261,',0,0
	.dd LM68-_OSInit
	.dw 0x0d,0x0a
.code
LM68:
	R1=_OSTCBTbl	// QImode move
	[_OSTCBFreeList]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,264,',0,0
	.dd LM69-_OSInit
	.dw 0x0d,0x0a
.code
LM69:
	R1=0	// QImode move
	[BP]=R1	// QImode move
L32:
	R1=[BP]	// QImode move
	CMP R1,0	// QImode test
	NSJZ L35	//QImode EQ
	pc=L33	// Indirect jump
L35:
.debug
	.dw '.stabn 0x44,0,265,',0,0
	.dd LM70-_OSInit
	.dw 0x0d,0x0a
.code
LM70:
	R1=[BP]	// QImode move
	R2=6	// QImode move
	mr=R1*R2	// r3=R1*R2 16bit=16bit*16bit
	R2=_OSEventTbl	// QImode move
	R1=R2	// QImode move
	R1 = R1 + R3	//addqi3
	R2=[BP]	// QImode move
	R3=6	// QImode move
	[bp+2]=R3	// QImode move
	R4=[bp+2]	// QImode move
	mr=R2*R4	// r3=R2*R4 16bit=16bit*16bit
	R4=_OSEventTbl+6	// QImode move
	R2=R4	// QImode move
	R2 = R2 + R3	//addqi3
	R3=R1	// QImode move
	[R3]=R2	// QImode move
.debug
	.dw '.stabn 0x44,0,264,',0,0
	.dd LM71-_OSInit
	.dw 0x0d,0x0a
.code
LM71:
L34:
	R1=[BP]	// QImode move
	R2=R1+1
	[BP]=R2	// QImode move
	pc=L32	// Indirect jump
L33:
.debug
	.dw '.stabn 0x44,0,267,',0,0
	.dd LM72-_OSInit
	.dw 0x0d,0x0a
.code
LM72:
	R1=0	// QImode move
	[_OSEventTbl+6]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,268,',0,0
	.dd LM73-_OSInit
	.dw 0x0d,0x0a
.code
LM73:
	R1=_OSEventTbl	// QImode move
	[_OSEventFreeList]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,305,',0,0
	.dd LM74-_OSInit
	.dw 0x0d,0x0a
.code
LM74:
	R1=12	// QImode move
	[SP--]=R1	// QImode move
	R1=_OSTaskIdleStk	// QImode move
	[SP--]=R1	// QImode move
	R1=0	// QImode move
	[SP--]=R1	// QImode move
	R1=OSTaskIdle_entry	// QImode move, function pointer
	[SP--]=R1	// QImode move
	call _OSTaskCreate	// call with return value
	SP = SP + 4	//SP
.debug
	.dw '.stabn 0x44,0,339,',0,0
	.dd LM75-_OSInit
	.dw 0x0d,0x0a
.code
LM75:
	R1=11	// QImode move
	[SP--]=R1	// QImode move
	R1=_OSTaskStatStk	// QImode move
	[SP--]=R1	// QImode move
	R1=0	// QImode move
	[SP--]=R1	// QImode move
	R1=OSTaskStat_entry	// QImode move, function pointer
	[SP--]=R1	// QImode move
	call _OSTaskCreate	// call with return value
	SP = SP + 4	//SP
.debug
	.dw '.stabn 0x44,0,346,',0,0
	.dd LM76-_OSInit
	.dw 0x0d,0x0a
.code
LM76:
LBE4:
.debug
	.dw '.stabn 0x44,0,346,',0,0
	.dd LM77-_OSInit
	.dw 0x0d,0x0a
.code
LM77:
L19:

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

.debug
	.dw '.stabn 0xc0,0,0,',0,0
	.dd LBB4-_OSInit
	.dw 0x0d,0x0a
.code
.debug
	.dw '.stabs "i:23",128,0,0,0',0x0d,0x0a
.CODE
.debug
	.dw '.stabn 0xe0,0,0,',0,0
	.dd LBE4-_OSInit
	.dw 0x0d,0x0a
.code
.debug
	.dw '.stabf ',0,0
	.dd LME5-_OSInit
	.dw 0x0d,0x0a
.code
LME5:
.code
.debug
	.dw '.stabs "OSIntEnter:F19",36,0,0,',0,0,offset _OSIntEnter,seg _OSIntEnter,0x0d,0x0a
.CODE
.public _OSIntEnter
_OSIntEnter:	.proc
.debug
	.dw '.stabn 0x44,0,372,',0,0
	.dd LM78-_OSIntEnter
	.dw 0x0d,0x0a
.code
LM78:
	// total=0, vars=0
	// frame_pointer_needed: 1
	push bp to [sp]
	bp=sp+1

	R1=BP+3
.debug
	.dw '.stabn 0x44,0,373,',0,0
	.dd LM79-_OSIntEnter
	.dw 0x0d,0x0a
.code
LM79:
// GCC inline ASM start
	INT OFF 
	
// GCC inline ASM end
.debug
	.dw '.stabn 0x44,0,374,',0,0
	.dd LM80-_OSIntEnter
	.dw 0x0d,0x0a
.code
LM80:
	R2=[_OSIntNesting]	// QImode move
	R3=1	// QImode move
	[_OSIntNesting]=R2+R3  //addqi3_Qrr
.debug
	.dw '.stabn 0x44,0,375,',0,0
	.dd LM81-_OSIntEnter
	.dw 0x0d,0x0a
.code
LM81:
// GCC inline ASM start
	INT IRQ 
	INT FIQ 
	
// GCC inline ASM end
.debug
	.dw '.stabn 0x44,0,376,',0,0
	.dd LM82-_OSIntEnter
	.dw 0x0d,0x0a
.code
LM82:
.debug
	.dw '.stabn 0x44,0,376,',0,0
	.dd LM83-_OSIntEnter
	.dw 0x0d,0x0a
.code
LM83:
L40:

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

.debug
	.dw '.stabf ',0,0
	.dd LME6-_OSIntEnter
	.dw 0x0d,0x0a
.code
LME6:
.code
.debug
	.dw '.stabs "OSIntExit:F19",36,0,0,',0,0,offset _OSIntExit,seg _OSIntExit,0x0d,0x0a
.CODE
.public _OSIntExit
_OSIntExit:	.proc
.debug
	.dw '.stabn 0x44,0,398,',0,0
	.dd LM84-_OSIntExit
	.dw 0x0d,0x0a
.code
LM84:
	// total=2, vars=2
	// frame_pointer_needed: 1
	push bp to [sp]
	sp-=2
	bp=sp+1

	R1=BP+5
	[BP]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,399,',0,0
	.dd LM85-_OSIntExit
	.dw 0x0d,0x0a
.code
LM85:
// GCC inline ASM start
	INT OFF 
	
// GCC inline ASM end
.debug
	.dw '.stabn 0x44,0,400,',0,0
	.dd LM86-_OSIntExit
	.dw 0x0d,0x0a
.code
LM86:
	R2=[_OSIntNesting]	// QImode move
	R1=R2+(-1)
	R2=R1	// QImode move
	[_OSIntNesting]=R2	// QImode move
	R1=R2|[_OSLockNesting]
	CMP R1,0	// QImode test
	NSJNZ L42	//QImode NE
.debug
	.dw '.stabn 0x44,0,401,',0,0
	.dd LM87-_OSIntExit
	.dw 0x0d,0x0a
.code
LM87:
	R1=_OSUnMapTbl	// QImode move
	R2=[_OSRdyGrp]	// QImode move
	R1 = R1 + R2	//addqi3
	R3=R1	// QImode move
	R2=[R3]	// QImode move
	[_OSIntExitY]=R2	// QImode move
.debug
	.dw '.stabn 0x44,0,402,',0,0
	.dd LM88-_OSIntExit
	.dw 0x0d,0x0a
.code
LM88:
	R2=[_OSIntExitY]	// QImode move
	R1=R2 lsl 3
	R3=[_OSIntExitY]	// QImode move
	R2=R3	// QImode move
	R2=R2+_OSRdyTbl
	R3=_OSUnMapTbl	// QImode move
	R4=R2	// QImode move
	R4=[R4]	// QImode move
	[bp+1]=R4	// QImode move
	R2=R3	// QImode move
	R2 = R2 + [bp+1]	//addqi3
	R4=R2	// QImode move
	R3=[R4]	// QImode move
	[_OSPrioHighRdy]=R1+R3  //addqi3_Qrr
.debug
	.dw '.stabn 0x44,0,403,',0,0
	.dd LM89-_OSIntExit
	.dw 0x0d,0x0a
.code
LM89:
	R1=[_OSPrioHighRdy]	// QImode move
	CMP R1,[_OSPrioCur]	// QImode compare
	NSJZ L42	//QImode EQ
.debug
	.dw '.stabn 0x44,0,404,',0,0
	.dd LM90-_OSIntExit
	.dw 0x0d,0x0a
.code
LM90:
	R1=_OSTCBPrioTbl	// QImode move
	R2=[_OSPrioHighRdy]	// QImode move
	R1 = R1 + R2	//addqi3
	R3=R1	// QImode move
	R2=[R3]	// QImode move
	[_OSTCBHighRdy]=R2	// QImode move
.debug
	.dw '.stabn 0x44,0,405,',0,0
	.dd LM91-_OSIntExit
	.dw 0x0d,0x0a
.code
LM91:
	//split R1, [_OSCtxSwCtr]
	R1=[_OSCtxSwCtr]	// QImode move
	R2=[_OSCtxSwCtr+1]	// QImode move
	R3=R1+1	// HImode RD=RS+#IMM16
	R4=R2+0, Carry
	//split [_OSCtxSwCtr], R3
	[_OSCtxSwCtr]=R3	// QImode move
	[_OSCtxSwCtr+1]=R4	// QImode move
.debug
	.dw '.stabn 0x44,0,406,',0,0
	.dd LM92-_OSIntExit
	.dw 0x0d,0x0a
.code
LM92:
	call _OSIntCtxSw	// call without return value
L43:
L42:
.debug
	.dw '.stabn 0x44,0,409,',0,0
	.dd LM93-_OSIntExit
	.dw 0x0d,0x0a
.code
LM93:
// GCC inline ASM start
	INT IRQ 
	INT FIQ 
	
// GCC inline ASM end
.debug
	.dw '.stabn 0x44,0,410,',0,0
	.dd LM94-_OSIntExit
	.dw 0x0d,0x0a
.code
LM94:
.debug
	.dw '.stabn 0x44,0,410,',0,0
	.dd LM95-_OSIntExit
	.dw 0x0d,0x0a
.code
LM95:
L41:

	sp+=2
	pop bp from [sp]
	retf
	.endp	// end of OSIntExit

.debug
	.dw '.stabf ',0,0
	.dd LME7-_OSIntExit
	.dw 0x0d,0x0a
.code
LME7:
.code
.debug
	.dw '.stabs "OSSched:F19",36,0,0,',0,0,offset _OSSched,seg _OSSched,0x0d,0x0a
.CODE
.public _OSSched
_OSSched:	.proc
.debug
	.dw '.stabn 0x44,0,430,',0,0
	.dd LM96-_OSSched
	.dw 0x0d,0x0a
.code
LM96:
	// total=3, vars=3
	// frame_pointer_needed: 1
	push bp to [sp]
	sp-=3
	bp=sp+1

	R1=BP+6
	[bp+1]=R1	// QImode move
.debug
	.dw '.stabn 0x44,0,431,',0,0
	.dd LM97-_OSSched
	.dw 0x0d,0x0a
.code
LM97:
LBB5:
.debug
	.dw '.stabn 0x44,0,434,',0,0
	.dd LM98-_OSSched
	.dw 0x0d,0x0a
.code
LM98:
// GCC inline ASM start
	INT OFF 
	
// GCC inline ASM end
.debug
	.dw '.stabn 0x44,0,435,',0,0
	.dd LM99-_OSSched
	.dw 0x0d,0x0a
.code
LM99:
	R1=[_OSLockNesting]	// QImode move
	R2=[_OSIntNesting]	// QImode move
	R1|=R2
	CMP R1,0	// QImode test
	NSJNZ L47	//QImode NE

⌨️ 快捷键说明

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