main.asm
来自「基于NRF2401和SPCE061A的无线通信系统源程序」· 汇编 代码 · 共 738 行
ASM
738 行
// GCC for SUNPLUS u'nSP version 1.0.17
// Command: C:\PROGRA~1\Sunplus\UNSPID~1.1\unSPIDE\cc1.exe C:\DOCUME~1\glg\LOCALS~1\Temp\ccCabaaa.i -quiet -dumpbase main.c -mglobal-var-iram -gstabs -Wall -o .\Debug/main.asm
// gcc2_compiled.:
.stabs "D:\\glg\\23无线语音传输系统礼包\\参考代码\\WirelessCom/", 0x64, 0, 3, Ltext0
.stabs "D:/glg/23蝄\336蟎\337覾\357襖\364碶\253蔦\344蟎\265蚛\263繺\361癨\374/瞈\316縗\274碶\372耚\353/WirelessCom/main.c", 0x64, 0, 3, Ltext0
.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 "SourceBuf:G20=ar1;0;13;4",32,0,0,',0,0,offset _SourceBuf,seg _SourceBuf,0x0d,0x0a
.CODE
.public _Address
.iram
_Address:
.dw 0
.dw 0
.dw 0
.dw 1
.dw 1 dup(0)
.debug
.dw '.stabs "Address:G21=ar1;0;4;4",32,0,0,',0,0,offset _Address,seg _Address,0x0d,0x0a
.CODE
.public _PlayFlag
.iram
_PlayFlag:
.dw 0
.debug
.dw '.stabs "PlayFlag:G4",32,0,0,',0,0,offset _PlayFlag,seg _PlayFlag,0x0d,0x0a
.CODE
.public _Cnt
.iram
_Cnt:
.dw 0
.debug
.dw '.stabs "Cnt:G4",32,0,0,',0,0,offset _Cnt,seg _Cnt,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,47,',0,0
.dd LM1-_main
.dw 0x0d,0x0a
.code
LM1:
// 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,48,',0,0
.dd LM2-_main
.dw 0x0d,0x0a
.code
LM2:
LBB2:
.debug
.dw '.stabn 0x44,0,49,',0,0
.dd LM3-_main
.dw 0x0d,0x0a
.code
LM3:
call _nRF2401_Initial // call without return value
.debug
.dw '.stabn 0x44,0,50,',0,0
.dd LM4-_main
.dw 0x0d,0x0a
.code
LM4:
R1=4 // QImode move
[SP--]=R1 // QImode move
R1=_Address // QImode move
[SP--]=R1 // QImode move
call _nRF2401_SetAddress // call without return value
SP=SP+2
.debug
.dw '.stabn 0x44,0,51,',0,0
.dd LM5-_main
.dw 0x0d,0x0a
.code
LM5:
R1=0 // QImode move
[SP--]=R1 // QImode move
call _nRF2401_Mode // call without return value
SP=SP+1
.debug
.dw '.stabn 0x44,0,52,',0,0
.dd LM6-_main
.dw 0x0d,0x0a
.code
LM6:
R1=[28717] // QImode move
R2=R1|16
[28717]=R2 // QImode move
.debug
.dw '.stabn 0x44,0,53,',0,0
.dd LM7-_main
.dw 0x0d,0x0a
.code
LM7:
// GCC inline ASM start
int fiq,irq
// GCC inline ASM end
.debug
.dw '.stabn 0x44,0,55,',0,0
.dd LM8-_main
.dw 0x0d,0x0a
.code
LM8:
L3:
pc=L5 // Indirect jump
pc=L4 // Indirect jump
L5:
.debug
.dw '.stabn 0x44,0,57,',0,0
.dd LM9-_main
.dw 0x0d,0x0a
.code
LM9:
R1=1 // QImode move
[28690]=R1 // QImode move
.debug
.dw '.stabn 0x44,0,59,',0,0
.dd LM10-_main
.dw 0x0d,0x0a
.code
LM10:
R2=[28672] // QImode move
R1=R2&1
CMP R1,0 // QImode test
JNZ L19 // QImode EQ
PC=L6
L19:
.debug
.dw '.stabn 0x44,0,61,',0,0
.dd LM11-_main
.dw 0x0d,0x0a
.code
LM11:
R1=[28717] // QImode move
R2=R1&(-17)
[28717]=R2 // QImode move
.debug
.dw '.stabn 0x44,0,62,',0,0
.dd LM12-_main
.dw 0x0d,0x0a
.code
LM12:
R1=1 // QImode move
[SP--]=R1 // QImode move
call _nRF2401_Mode // call without return value
SP=SP+1
.debug
.dw '.stabn 0x44,0,64,',0,0
.dd LM13-_main
.dw 0x0d,0x0a
.code
LM13:
call _Queue_Init // call without return value
.debug
.dw '.stabn 0x44,0,65,',0,0
.dd LM14-_main
.dw 0x0d,0x0a
.code
LM14:
call _SACM_DVR1600_Initial // call without return value
.debug
.dw '.stabn 0x44,0,66,',0,0
.dd LM15-_main
.dw 0x0d,0x0a
.code
LM15:
R1=1 // QImode move
[SP--]=R1 // QImode move
R1=0 // QImode move
[SP--]=R1 // QImode move
call _SACM_DVR1600_Rec // call without return value
SP=SP+2
.debug
.dw '.stabn 0x44,0,68,',0,0
.dd LM16-_main
.dw 0x0d,0x0a
.code
LM16:
L7:
R2=[28672] // QImode move
R1=R2&1
CMP R1,0 // QImode test
JZ L20 // QImode NE
PC=L9
L20:
pc=L8 // Indirect jump
L9:
.debug
.dw '.stabn 0x44,0,70,',0,0
.dd LM17-_main
.dw 0x0d,0x0a
.code
LM17:
R1=1 // QImode move
[28690]=R1 // QImode move
.debug
.dw '.stabn 0x44,0,71,',0,0
.dd LM18-_main
.dw 0x0d,0x0a
.code
LM18:
call _SACM_DVR1600_ServiceLoop // call without return value
.debug
.dw '.stabn 0x44,0,72,',0,0
.dd LM19-_main
.dw 0x0d,0x0a
.code
LM19:
call _Queue_Test // call with return value
CMP R1,(-1) // QImode compare
JNZ L21 // QImode EQ
PC=L10
L21:
.debug
.dw '.stabn 0x44,0,74,',0,0
.dd LM20-_main
.dw 0x0d,0x0a
.code
LM20:
R1=0 // QImode move
[BP]=R1 // QImode move
L11:
R1=[BP] // QImode move
CMP R1,11 // QImode compare
JA L22 // QImode LEU
PC=L14
L22:
pc=L12 // Indirect jump
L14:
.debug
.dw '.stabn 0x44,0,76,',0,0
.dd LM21-_main
.dw 0x0d,0x0a
.code
LM21:
call _Queue_Read // call with return value
R2=_SourceBuf // QImode move
R3=[BP] // QImode move
R2+=R3 // addqi3_r0r
R3=R2 // QImode move
[R3]=R1 // QImode move
.debug
.dw '.stabn 0x44,0,74,',0,0
.dd LM22-_main
.dw 0x0d,0x0a
.code
LM22:
L13:
R1=[BP] // QImode move
R2=R1+1
[BP]=R2 // QImode move
pc=L11 // Indirect jump
L12:
.debug
.dw '.stabn 0x44,0,78,',0,0
.dd LM23-_main
.dw 0x0d,0x0a
.code
LM23:
R1=12 // QImode move
[SP--]=R1 // QImode move
R1=_SourceBuf // QImode move
[SP--]=R1 // QImode move
call _nRF2401_SendBuffer_Word // call without return value
SP=SP+2
L10:
.debug
.dw '.stabn 0x44,0,80,',0,0
.dd LM24-_main
.dw 0x0d,0x0a
.code
LM24:
pc=L7 // Indirect jump
L8:
.debug
.dw '.stabn 0x44,0,82,',0,0
.dd LM25-_main
.dw 0x0d,0x0a
.code
LM25:
call _SACM_DVR1600_Stop // call without return value
.debug
.dw '.stabn 0x44,0,83,',0,0
.dd LM26-_main
.dw 0x0d,0x0a
.code
LM26:
R1=0 // QImode move
[SP--]=R1 // QImode move
call _nRF2401_Mode // call without return value
SP=SP+1
.debug
.dw '.stabn 0x44,0,84,',0,0
.dd LM27-_main
.dw 0x0d,0x0a
.code
LM27:
R1=[28717] // QImode move
R2=R1|16
[28717]=R2 // QImode move
L6:
.debug
.dw '.stabn 0x44,0,87,',0,0
.dd LM28-_main
.dw 0x0d,0x0a
.code
LM28:
R1=[_PlayFlag] // QImode move
CMP R1,255 // QImode compare
JZ L23 // QImode NE
PC=L15
L23:
.debug
.dw '.stabn 0x44,0,89,',0,0
.dd LM29-_main
.dw 0x0d,0x0a
.code
LM29:
call _Queue_Init // call without return value
.debug
.dw '.stabn 0x44,0,90,',0,0
.dd LM30-_main
.dw 0x0d,0x0a
.code
LM30:
call _SACM_DVR1600_Initial // call without return value
.debug
.dw '.stabn 0x44,0,91,',0,0
.dd LM31-_main
.dw 0x0d,0x0a
.code
LM31:
R1=3 // QImode move
[SP--]=R1 // QImode move
R1=3 // QImode move
[SP--]=R1 // QImode move
R1=0 // QImode move
[SP--]=R1 // QImode move
call _SACM_DVR1600_Play // call without return value
SP=SP+3
.debug
.dw '.stabn 0x44,0,93,',0,0
.dd LM32-_main
.dw 0x0d,0x0a
.code
LM32:
L16:
R1=[_PlayFlag] // QImode move
CMP R1,255 // QImode compare
JNZ L24 // QImode EQ
PC=L18
L24:
pc=L17 // Indirect jump
L18:
.debug
.dw '.stabn 0x44,0,95,',0,0
.dd LM33-_main
.dw 0x0d,0x0a
.code
LM33:
call _SACM_DVR1600_ServiceLoop // call without return value
.debug
.dw '.stabn 0x44,0,96,',0,0
.dd LM34-_main
.dw 0x0d,0x0a
.code
LM34:
R1=1 // QImode move
[28690]=R1 // QImode move
.debug
.dw '.stabn 0x44,0,97,',0,0
.dd LM35-_main
.dw 0x0d,0x0a
.code
LM35:
pc=L16 // Indirect jump
L17:
.debug
.dw '.stabn 0x44,0,98,',0,0
.dd LM36-_main
.dw 0x0d,0x0a
.code
LM36:
call _SACM_DVR1600_Stop // call without return value
L15:
.debug
.dw '.stabn 0x44,0,100,',0,0
.dd LM37-_main
.dw 0x0d,0x0a
.code
LM37:
pc=L3 // Indirect jump
L4:
.debug
.dw '.stabn 0x44,0,101,',0,0
.dd LM38-_main
.dw 0x0d,0x0a
.code
LM38:
LBE2:
.debug
.dw '.stabn 0x44,0,101,',0,0
.dd LM39-_main
.dw 0x0d,0x0a
.code
LM39:
L2:
sp+=2
pop bp from [sp]
retf
.endp // end of main
.debug
.dw '.stabn 0xc0,0,0,',0,0
.dd LBB2-_main
.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 LBE2-_main
.dw 0x0d,0x0a
.code
.debug
.dw '.stabf ',0,0
.dd LME1-_main
.dw 0x0d,0x0a
.code
LME1:
// ISR ATTRIBUTE FUNCTION, LOCATE in .text SECTION
.text
.debug
.dw '.stabs "IRQ4:F19",36,0,0,',0,0,offset _IRQ4,seg _IRQ4,0x0d,0x0a
.TEXT
.public _IRQ4
_IRQ4: .proc
.debug
.dw '.stabn 0x44,0,111,',0,0
.dd LM40-_IRQ4
.dw 0x0d,0x0a
.text
LM40:
// ISR ATTRIBUTE FUNCTION, PUSH r1,bp
push r1,bp to [sp]
// total=2, vars=2
// frame_pointer_needed: 1
sp-=2
bp=sp+1
R1=BP+5
[bp+1]=R1 // QImode move
.debug
.dw '.stabn 0x44,0,112,',0,0
.dd LM41-_IRQ4
.dw 0x0d,0x0a
.text
LM41:
LBB3:
.debug
.dw '.stabn 0x44,0,113,',0,0
.dd LM42-_IRQ4
.dw 0x0d,0x0a
.text
LM42:
call _nRF2401_RxStatus // call with return value
CMP R1,1 // QImode compare
JZ L34 // QImode NE
PC=L26
L34:
.debug
.dw '.stabn 0x44,0,115,',0,0
.dd LM43-_IRQ4
.dw 0x0d,0x0a
.text
LM43:
R1=255 // QImode move
[_PlayFlag]=R1 // QImode move
.debug
.dw '.stabn 0x44,0,116,',0,0
.dd LM44-_IRQ4
.dw 0x0d,0x0a
.text
LM44:
R1=0 // QImode move
[_Cnt]=R1 // QImode move
.debug
.dw '.stabn 0x44,0,117,',0,0
.dd LM45-_IRQ4
.dw 0x0d,0x0a
.text
LM45:
R1=_SourceBuf // QImode move
[SP--]=R1 // QImode move
call _nRF2401_ReceiveWord // call without return value
SP=SP+1
.debug
.dw '.stabn 0x44,0,119,',0,0
.dd LM46-_IRQ4
.dw 0x0d,0x0a
.text
LM46:
call _Queue_Test // call with return value
CMP R1,11 // QImode compare
JA L35 // QImode LEU
PC=L27
L35:
.debug
.dw '.stabn 0x44,0,121,',0,0
.dd LM47-_IRQ4
.dw 0x0d,0x0a
.text
LM47:
R1=0 // QImode move
[BP]=R1 // QImode move
L28:
R1=[BP] // QImode move
CMP R1,11 // QImode compare
JG L36 // QImode LE
PC=L31
L36:
pc=L27 // Indirect jump
L31:
.debug
.dw '.stabn 0x44,0,123,',0,0
.dd LM48-_IRQ4
.dw 0x0d,0x0a
.text
LM48:
R1=_SourceBuf // QImode move
R2=[BP] // QImode move
R1+=R2 // addqi3_r0r
R3=R1 // QImode move
R2=[R3] // QImode move
[SP--]=R2 // QImode move
call _Queue_Write // call without return value
SP=SP+1
.debug
.dw '.stabn 0x44,0,121,',0,0
.dd LM49-_IRQ4
.dw 0x0d,0x0a
.text
LM49:
L30:
R1=[BP] // QImode move
R2=R1+1
[BP]=R2 // QImode move
pc=L28 // Indirect jump
L29:
L27:
.debug
.dw '.stabn 0x44,0,127,',0,0
.dd LM50-_IRQ4
.dw 0x0d,0x0a
.text
LM50:
pc=L32 // Indirect jump
L26:
.debug
.dw '.stabn 0x44,0,130,',0,0
.dd LM51-_IRQ4
.dw 0x0d,0x0a
.text
LM51:
R1=[_Cnt] // QImode move
R2=1 // QImode move
[_Cnt]=R1+R2
.debug
.dw '.stabn 0x44,0,131,',0,0
.dd LM52-_IRQ4
.dw 0x0d,0x0a
.text
LM52:
R1=[_Cnt] // QImode move
CMP R1,499 // QImode compare
JA L37 // QImode LEU
PC=L32
L37:
.debug
.dw '.stabn 0x44,0,133,',0,0
.dd LM53-_IRQ4
.dw 0x0d,0x0a
.text
LM53:
R1=0 // QImode move
[_PlayFlag]=R1 // QImode move
.debug
.dw '.stabn 0x44,0,134,',0,0
.dd LM54-_IRQ4
.dw 0x0d,0x0a
.text
LM54:
R1=0 // QImode move
[_Cnt]=R1 // QImode move
L33:
L32:
.debug
.dw '.stabn 0x44,0,137,',0,0
.dd LM55-_IRQ4
.dw 0x0d,0x0a
.text
LM55:
R1=16 // QImode move
[28689]=R1 // QImode move
.debug
.dw '.stabn 0x44,0,138,',0,0
.dd LM56-_IRQ4
.dw 0x0d,0x0a
.text
LM56:
LBE3:
.debug
.dw '.stabn 0x44,0,138,',0,0
.dd LM57-_IRQ4
.dw 0x0d,0x0a
.text
LM57:
L25:
sp+=2
// ISR ATTRIBUTE FUNCTION, POP r1,bp
pop r1,bp from [sp]
reti
.endp // end of IRQ4
.debug
.dw '.stabn 0xc0,0,0,',0,0
.dd LBB3-_IRQ4
.dw 0x0d,0x0a
.text
.debug
.dw '.stabs "i:1",128,0,0,0',0x0d,0x0a
.TEXT
.debug
.dw '.stabn 0xe0,0,0,',0,0
.dd LBE3-_IRQ4
.dw 0x0d,0x0a
.text
.debug
.dw '.stabf ',0,0
.dd LME2-_IRQ4
.dw 0x0d,0x0a
.text
LME2:
.iram
.public _SourceBuf
_SourceBuf:
.dw 14 dup(0)
.external _Queue_Write
.external _nRF2401_ReceiveWord
.external _nRF2401_RxStatus
.external _SACM_DVR1600_Play
.external _SACM_DVR1600_Stop
.external _nRF2401_SendBuffer_Word
.external _Queue_Read
.external _Queue_Test
.external _SACM_DVR1600_ServiceLoop
.external _SACM_DVR1600_Rec
.external _SACM_DVR1600_Initial
.external _Queue_Init
.external _nRF2401_Mode
.external _nRF2401_SetAddress
.external _nRF2401_Initial
.end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?