📄 main.asm
字号:
// GCC for SUNPLUS u'nSP version 1.0.21-3
// Command: C:\PROGRA~1\Sunplus\UNSPID~1.0\cc1.exe C:\TEMP\ccE9dbaa.i -fkeep-inline-functions -quiet -dumpbase main.c -mglobal-var-iram -gstabs -Wall -o .\Debug/main.asm
.external __sn_func_ptr_sec
// gcc2_compiled.:
.debug
.dw '.stabs "K:/ucosii/",0x64,0,3,',0,0,offset Ltext0,seg Ltext0,0x0d,0x0a
.code
.debug
.dw '.stabs "K:/ucosii/main.c",0x64,0,3,',0,0,offset Ltext0,seg Ltext0,0x0d,0x0a
.code
.code
Ltext0:
.debug
.dw '.stabs "int:t1=r1;-32768;32767;",128,0,0,0',0x0d,0x0a
.CODE
.debug
.dw '.stabs "char:t2=r2;0;127;",128,0,0,0',0x0d,0x0a
.CODE
.debug
.dw '.stabs "long int:t3=r3;-2147483648;2147483647;",128,0,0,0',0x0d,0x0a
.CODE
.debug
.dw '.stabs "unsigned int:t4=r4;0;65535;",128,0,0,0',0x0d,0x0a
.CODE
.debug
.dw '.stabs "long unsigned int:t5=r5;0;4294967295;",128,0,0,0',0x0d,0x0a
.CODE
.debug
.dw '.stabs "long long int:t6=r6;-2147483648;2147483647;",128,0,0,0',0x0d,0x0a
.CODE
.debug
.dw '.stabs "long long unsigned int:t7=r7;0;4294967295;",128,0,0,0',0x0d,0x0a
.CODE
.debug
.dw '.stabs "short int:t8=r8;-32768;32767;",128,0,0,0',0x0d,0x0a
.CODE
.debug
.dw '.stabs "short unsigned int:t9=r9;0;65535;",128,0,0,0',0x0d,0x0a
.CODE
.debug
.dw '.stabs "signed char:t10=r10;-32768;32767;",128,0,0,0',0x0d,0x0a
.CODE
.debug
.dw '.stabs "unsigned char:t11=r11;0;65535;",128,0,0,0',0x0d,0x0a
.CODE
.debug
.dw '.stabs "float:t12=r1;2;0;",128,0,0,0',0x0d,0x0a
.CODE
.debug
.dw '.stabs "double:t13=r1;2;0;",128,0,0,0',0x0d,0x0a
.CODE
.debug
.dw '.stabs "long double:t14=r1;2;0;",128,0,0,0',0x0d,0x0a
.CODE
.debug
.dw '.stabs "complex int:t15=s2real:1,0,16;imag:1,16,16;;",128,0,0,0',0x0d,0x0a
.CODE
.debug
.dw '.stabs "complex float:t16=r16;2;0;",128,0,0,0',0x0d,0x0a
.CODE
.debug
.dw '.stabs "complex double:t17=r17;2;0;",128,0,0,0',0x0d,0x0a
.CODE
.debug
.dw '.stabs "complex long double:t18=r18;2;0;",128,0,0,0',0x0d,0x0a
.CODE
.debug
.dw '.stabs "void:t19=19",128,0,0,0',0x0d,0x0a
.CODE
.debug
.dw '.stabs "BOOLEAN:t20=9",128,0,0,0',0x0d,0x0a
.CODE
.debug
.dw '.stabs "INT8U:t21=9",128,0,0,0',0x0d,0x0a
.CODE
.debug
.dw '.stabs "INT8S:t22=8",128,0,0,0',0x0d,0x0a
.CODE
.debug
.dw '.stabs "INT16U:t23=4",128,0,0,0',0x0d,0x0a
.CODE
.debug
.dw '.stabs "INT16S:t24=1",128,0,0,0',0x0d,0x0a
.CODE
.debug
.dw '.stabs "INT32U:t25=5",128,0,0,0',0x0d,0x0a
.CODE
.debug
.dw '.stabs "INT32S:t26=3",128,0,0,0',0x0d,0x0a
.CODE
.debug
.dw '.stabs "FP32:t27=12",128,0,0,0',0x0d,0x0a
.CODE
.debug
.dw '.stabs "FP64:t28=13",128,0,0,0',0x0d,0x0a
.CODE
.debug
.dw '.stabs "OS_STK:t29=4",128,0,0,0',0x0d,0x0a
.CODE
.debug
.dw '.stabs "OS_EVENT:t30=31=s6OSEventPtr:32=*19,0,16;OSEventTbl:33=ar1;0;1;21,16,32;\\",128,0,0,0',0x0d,0x0a
.DW '.stabs "OSEventCnt:23,48,16;OSEventType:21,64,16;OSEventGrp:21,80,16;;",128,0,0,0',0x0d,0x0a
.CODE
.debug
.dw '.stabs "OS_SEM_DATA:t34=35=s4OSCnt:23,0,16;OSEventTbl:33,16,32;\\",128,0,0,0',0x0d,0x0a
.DW '.stabs "OSEventGrp:21,48,16;;",128,0,0,0',0x0d,0x0a
.CODE
.debug
.dw '.stabs "os_tcb:T36=s11OSTCBStkPtr:37=*29,0,16;OSTCBNext:38=*36,16,16;\\",128,0,0,0',0x0d,0x0a
.DW '.stabs "OSTCBPrev:38,32,16;OSTCBEventPtr:39=*30,48,16;\\",128,0,0,0',0x0d,0x0a
.DW '.stabs "OSTCBDly:23,64,16;OSTCBStat:21,80,16;OSTCBPrio:21,96,16;\\",128,0,0,0',0x0d,0x0a
.DW '.stabs "OSTCBX:21,112,16;OSTCBY:21,128,16;OSTCBBitX:21,144,16;\\",128,0,0,0',0x0d,0x0a
.DW '.stabs "OSTCBBitY:21,160,16;;",128,0,0,0',0x0d,0x0a
.CODE
.debug
.dw '.stabs "OS_TCB:t40=36",128,0,0,0',0x0d,0x0a
.CODE
.debug
.dw '.stabs "TaskAStk:G41=ar1;0;50;29",32,0,0,',0,0,offset _TaskAStk,seg _TaskAStk,0x0d,0x0a
.CODE
.debug
.dw '.stabs "TaskBStk:G41",32,0,0,',0,0,offset _TaskBStk,seg _TaskBStk,0x0d,0x0a
.CODE
.debug
.dw '.stabs "TaskCStk:G41",32,0,0,',0,0,offset _TaskCStk,seg _TaskCStk,0x0d,0x0a
.CODE
.public _StringA
.iram
_StringA:
.str 'T', 'a', 's', 'k', ' ', 'A', 10, 9, 0
// length = 9
.dw 1 dup(0)
.debug
.dw '.stabs "StringA:G42=ar1;0;9;2",32,0,0,',0,0,offset _StringA,seg _StringA,0x0d,0x0a
.CODE
.public _StringB
.iram
_StringB:
.str 'T', 'a', 's', 'k', ' ', 'B', 10, 9, 0
// length = 9
.dw 1 dup(0)
.debug
.dw '.stabs "StringB:G42",32,0,0,',0,0,offset _StringB,seg _StringB,0x0d,0x0a
.CODE
.public _StringC
.iram
_StringC:
.str 'T', 'a', 's', 'k', ' ', 'C', 10, 9, 0
// length = 9
.dw 1 dup(0)
.debug
.dw '.stabs "StringC:G42",32,0,0,',0,0,offset _StringC,seg _StringC,0x0d,0x0a
.CODE
.debug
.dw '.stabs "sem:G39",32,0,0,',0,0,offset _sem,seg _sem,0x0d,0x0a
.CODE
.code
.debug
.dw '.stabs "main:F1",36,0,0,',0,0,offset _main,seg _main,0x0d,0x0a
.CODE
.public _main
_main: .proc
.debug
.dw '.stabn 0x44,0,34,',0,0
.dd LM1-_main
.dw 0x0d,0x0a
.code
LM1:
// 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,35,',0,0
.dd LM2-_main
.dw 0x0d,0x0a
.code
LM2:
R1=3 // QImode move
[28686]=R1 // QImode move
.debug
.dw '.stabn 0x44,0,36,',0,0
.dd LM3-_main
.dw 0x0d,0x0a
.code
LM3:
R1=2 // QImode move
[28688]=R1 // QImode move
.debug
.dw '.stabn 0x44,0,38,',0,0
.dd LM4-_main
.dw 0x0d,0x0a
.code
LM4:
call _OSInit // call without return value
.debug
.dw '.stabn 0x44,0,41,',0,0
.dd LM5-_main
.dw 0x0d,0x0a
.code
LM5:
R1=1 // QImode move
[SP--]=R1 // QImode move
call _OSSemCreate // call with return value
SP = SP + 1 //SP
[_sem]=R1 // QImode move
.debug
.dw '.stabn 0x44,0,42,',0,0
.dd LM6-_main
.dw 0x0d,0x0a
.code
LM6:
call _SerialInit // call without return value
.debug
.dw '.stabn 0x44,0,43,',0,0
.dd LM7-_main
.dw 0x0d,0x0a
.code
LM7:
R1=2 // QImode move
[SP--]=R1 // QImode move
R1=_TaskAStk // QImode move
[SP--]=R1 // QImode move
R1=0 // QImode move
[SP--]=R1 // QImode move
R1=TaskA_entry // QImode move, function pointer
[SP--]=R1 // QImode move
call _OSTaskCreate // call with return value
SP = SP + 4 //SP
.debug
.dw '.stabn 0x44,0,44,',0,0
.dd LM8-_main
.dw 0x0d,0x0a
.code
LM8:
R1=3 // QImode move
[SP--]=R1 // QImode move
R1=_TaskBStk // QImode move
[SP--]=R1 // QImode move
R1=0 // QImode move
[SP--]=R1 // QImode move
R1=TaskB_entry // QImode move, function pointer
[SP--]=R1 // QImode move
call _OSTaskCreate // call with return value
SP = SP + 4 //SP
.debug
.dw '.stabn 0x44,0,45,',0,0
.dd LM9-_main
.dw 0x0d,0x0a
.code
LM9:
R1=4 // QImode move
[SP--]=R1 // QImode move
R1=_TaskCStk // QImode move
[SP--]=R1 // QImode move
R1=0 // QImode move
[SP--]=R1 // QImode move
R1=TaskC_entry // QImode move, function pointer
[SP--]=R1 // QImode move
call _OSTaskCreate // call with return value
SP = SP + 4 //SP
.debug
.dw '.stabn 0x44,0,47,',0,0
.dd LM10-_main
.dw 0x0d,0x0a
.code
LM10:
call _OSStart // call without return value
.debug
.dw '.stabn 0x44,0,48,',0,0
.dd LM11-_main
.dw 0x0d,0x0a
.code
LM11:
R1=0 // QImode move
pc=L2 // Indirect jump
.debug
.dw '.stabn 0x44,0,49,',0,0
.dd LM12-_main
.dw 0x0d,0x0a
.code
LM12:
.debug
.dw '.stabn 0x44,0,49,',0,0
.dd LM13-_main
.dw 0x0d,0x0a
.code
LM13:
L2:
sp+=1
pop bp from [sp]
retf
.endp // end of main
.debug
.dw '.stabf ',0,0
.dd LME1-_main
.dw 0x0d,0x0a
.code
LME1:
.code
.debug
.dw '.stabs "TaskA:F19",36,0,0,',0,0,offset _TaskA,seg _TaskA,0x0d,0x0a
.CODE
.public _TaskA
_TaskA: .proc
.debug
.dw '.stabn 0x44,0,54,',0,0
.dd LM14-_TaskA
.dw 0x0d,0x0a
.code
LM14:
// 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,55,',0,0
.dd LM15-_TaskA
.dw 0x0d,0x0a
.code
LM15:
LBB2:
.debug
.dw '.stabn 0x44,0,56,',0,0
.dd LM16-_TaskA
.dw 0x0d,0x0a
.code
LM16:
call _OSTickISR // call without return value
L4:
.debug
.dw '.stabn 0x44,0,61,',0,0
.dd LM17-_TaskA
.dw 0x0d,0x0a
.code
LM17:
[SP--]=BP // QImode move
R1=0 // QImode move
[SP--]=R1 // QImode move
R1=[_sem] // QImode move
[SP--]=R1 // QImode move
call _OSSemPend // call without return value
SP = SP + 3 //SP
.debug
.dw '.stabn 0x44,0,64,',0,0
.dd LM18-_TaskA
.dw 0x0d,0x0a
.code
LM18:
R1=(-1) // QImode move
[28675]=R1 // QImode move
.debug
.dw '.stabn 0x44,0,65,',0,0
.dd LM19-_TaskA
.dw 0x0d,0x0a
.code
LM19:
R1=(-1) // QImode move
[28674]=R1 // QImode move
.debug
.dw '.stabn 0x44,0,66,',0,0
.dd LM20-_TaskA
.dw 0x0d,0x0a
.code
LM20:
R1=(-256) // QImode move
[28672]=R1 // QImode move
.debug
.dw '.stabn 0x44,0,68,',0,0
.dd LM21-_TaskA
.dw 0x0d,0x0a
.code
LM21:
R1=[_sem] // QImode move
[SP--]=R1 // QImode move
call _OSSemPost // call with return value
SP = SP + 1 //SP
.debug
.dw '.stabn 0x44,0,71,',0,0
.dd LM22-_TaskA
.dw 0x0d,0x0a
.code
LM22:
R1=6400 // QImode move
[SP--]=R1 // QImode move
call _OSTimeDly // call without return value
SP = SP + 1 //SP
.debug
.dw '.stabn 0x44,0,58,',0,0
.dd LM23-_TaskA
.dw 0x0d,0x0a
.code
LM23:
L6:
pc=L4 // Indirect jump
L5:
.debug
.dw '.stabn 0x44,0,73,',0,0
.dd LM24-_TaskA
.dw 0x0d,0x0a
.code
LM24:
LBE2:
.debug
.dw '.stabn 0x44,0,73,',0,0
.dd LM25-_TaskA
.dw 0x0d,0x0a
.code
LM25:
L3:
sp+=2
pop bp from [sp]
retf
.endp // end of TaskA
.debug
.dw '.stabs "data:p32",160,0,0,5',0x0d,0x0a
.CODE
.debug
.dw '.stabn 0xc0,0,0,',0,0
.dd LBB2-_TaskA
.dw 0x0d,0x0a
.code
.debug
.dw '.stabs "erra:21",128,0,0,0',0x0d,0x0a
.CODE
.debug
.dw '.stabn 0xe0,0,0,',0,0
.dd LBE2-_TaskA
.dw 0x0d,0x0a
.code
.debug
.dw '.stabf ',0,0
.dd LME2-_TaskA
.dw 0x0d,0x0a
.code
LME2:
.code
.debug
.dw '.stabs "TaskB:F19",36,0,0,',0,0,offset _TaskB,seg _TaskB,0x0d,0x0a
.CODE
.public _TaskB
_TaskB: .proc
.debug
.dw '.stabn 0x44,0,79,',0,0
.dd LM26-_TaskB
.dw 0x0d,0x0a
.code
LM26:
// 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,80,',0,0
.dd LM27-_TaskB
.dw 0x0d,0x0a
.code
LM27:
LBB3:
L8:
.debug
.dw '.stabn 0x44,0,83,',0,0
.dd LM28-_TaskB
.dw 0x0d,0x0a
.code
LM28:
[SP--]=BP // QImode move
R1=0 // QImode move
[SP--]=R1 // QImode move
R1=[_sem] // QImode move
[SP--]=R1 // QImode move
call _OSSemPend // call without return value
SP = SP + 3 //SP
.debug
.dw '.stabn 0x44,0,85,',0,0
.dd LM29-_TaskB
.dw 0x0d,0x0a
.code
LM29:
R1=[_sem] // QImode move
[SP--]=R1 // QImode move
call _OSSemPost // call with return value
SP = SP + 1 //SP
.debug
.dw '.stabn 0x44,0,88,',0,0
.dd LM30-_TaskB
.dw 0x0d,0x0a
.code
LM30:
R1=0 // QImode move
[28672]=R1 // QImode move
.debug
.dw '.stabn 0x44,0,90,',0,0
.dd LM31-_TaskB
.dw 0x0d,0x0a
.code
LM31:
R1=6400 // QImode move
[SP--]=R1 // QImode move
call _OSTimeDly // call without return value
SP = SP + 1 //SP
.debug
.dw '.stabn 0x44,0,81,',0,0
.dd LM32-_TaskB
.dw 0x0d,0x0a
.code
LM32:
L10:
pc=L8 // Indirect jump
L9:
.debug
.dw '.stabn 0x44,0,93,',0,0
.dd LM33-_TaskB
.dw 0x0d,0x0a
.code
LM33:
LBE3:
.debug
.dw '.stabn 0x44,0,93,',0,0
.dd LM34-_TaskB
.dw 0x0d,0x0a
.code
LM34:
L7:
sp+=2
pop bp from [sp]
retf
.endp // end of TaskB
.debug
.dw '.stabs "data:p32",160,0,0,5',0x0d,0x0a
.CODE
.debug
.dw '.stabn 0xc0,0,0,',0,0
.dd LBB3-_TaskB
.dw 0x0d,0x0a
.code
.debug
.dw '.stabs "errb:21",128,0,0,0',0x0d,0x0a
.CODE
.debug
.dw '.stabn 0xe0,0,0,',0,0
.dd LBE3-_TaskB
.dw 0x0d,0x0a
.code
.debug
.dw '.stabf ',0,0
.dd LME3-_TaskB
.dw 0x0d,0x0a
.code
LME3:
.code
.debug
.dw '.stabs "TaskC:F19",36,0,0,',0,0,offset _TaskC,seg _TaskC,0x0d,0x0a
.CODE
.public _TaskC
_TaskC: .proc
.debug
.dw '.stabn 0x44,0,98,',0,0
.dd LM35-_TaskC
.dw 0x0d,0x0a
.code
LM35:
// 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,99,',0,0
.dd LM36-_TaskC
.dw 0x0d,0x0a
.code
LM36:
LBB4:
L12:
.debug
.dw '.stabn 0x44,0,102,',0,0
.dd LM37-_TaskC
.dw 0x0d,0x0a
.code
LM37:
[SP--]=BP // QImode move
R1=0 // QImode move
[SP--]=R1 // QImode move
R1=[_sem] // QImode move
[SP--]=R1 // QImode move
call _OSSemPend // call without return value
SP = SP + 3 //SP
.debug
.dw '.stabn 0x44,0,104,',0,0
.dd LM38-_TaskC
.dw 0x0d,0x0a
.code
LM38:
R1=[_sem] // QImode move
[SP--]=R1 // QImode move
call _OSSemPost // call with return value
SP = SP + 1 //SP
.debug
.dw '.stabn 0x44,0,106,',0,0
.dd LM39-_TaskC
.dw 0x0d,0x0a
.code
LM39:
R1=(-4096) // QImode move
[28672]=R1 // QImode move
.debug
.dw '.stabn 0x44,0,107,',0,0
.dd LM40-_TaskC
.dw 0x0d,0x0a
.code
LM40:
R1=6400 // QImode move
[SP--]=R1 // QImode move
call _OSTimeDly // call without return value
SP = SP + 1 //SP
.debug
.dw '.stabn 0x44,0,100,',0,0
.dd LM41-_TaskC
.dw 0x0d,0x0a
.code
LM41:
L14:
pc=L12 // Indirect jump
L13:
.debug
.dw '.stabn 0x44,0,110,',0,0
.dd LM42-_TaskC
.dw 0x0d,0x0a
.code
LM42:
LBE4:
.debug
.dw '.stabn 0x44,0,110,',0,0
.dd LM43-_TaskC
.dw 0x0d,0x0a
.code
LM43:
L11:
sp+=2
pop bp from [sp]
retf
.endp // end of TaskC
.debug
.dw '.stabs "data:p32",160,0,0,5',0x0d,0x0a
.CODE
.debug
.dw '.stabn 0xc0,0,0,',0,0
.dd LBB4-_TaskC
.dw 0x0d,0x0a
.code
.debug
.dw '.stabs "errc:21",128,0,0,0',0x0d,0x0a
.CODE
.debug
.dw '.stabn 0xe0,0,0,',0,0
.dd LBE4-_TaskC
.dw 0x0d,0x0a
.code
.debug
.dw '.stabf ',0,0
.dd LME4-_TaskC
.dw 0x0d,0x0a
.code
LME4:
.iram
.public _TaskAStk
_TaskAStk:
.dw 51 dup(0)
.iram
.public _TaskBStk
_TaskBStk:
.dw 51 dup(0)
.iram
.public _TaskCStk
_TaskCStk:
.dw 51 dup(0)
.iram
.public _sem
_sem:
.dw 0
.external _OSTimeDly
.external _OSSemPost
.external _OSSemPend
.external _OSTickISR
.external _OSStart
.external _OSTaskCreate
.external _SerialInit
.external _OSSemCreate
.external _OSInit
// far pointer entry table:
TaskC_ptsec: .section .vtbl
TaskC_entry: .dw seg _TaskC, offset _TaskC
TaskB_ptsec: .section .vtbl
TaskB_entry: .dw seg _TaskB, offset _TaskB
TaskA_ptsec: .section .vtbl
TaskA_entry: .dw seg _TaskA, offset _TaskA
.end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -