📄 speech.asm
字号:
// D:\PROGRA~1\Sunplus\UNSPID~1.3\\be::0.9.14
//-----------------------------------------------------------
// Compiling E:\A1600\speech.c (C:\DOCUME~1\dqs\LOCALS~1\Temp\ccB.3)
//-----------------------------------------------------------
//-----------------------------------------------------------
// Options:
//-----------------------------------------------------------
// Target:unSP, ISA:ISA_1.1, Pointer Size:32
// -O0 (Optimization level)
// -g2 (Debug level)
// -m1 (Report warnings)
//-----------------------------------------------------------
.stabs "E:\A1600",100,0,3,Ltext0
.stabs "E:\A1600\speech.c",100,0,3,Ltext0
.code
Ltext0:
.stabs "int:t1=r1;-32768;32767;",128,0,0,0
.stabs "char:t2=r2;-32768;32767;",128,0,0,0
.stabs "long int:t3=r3;-2147483648;2147483647;",128,0,0,0
.stabs "unsigned int:t4=r4;0;65535;",128,0,0,0
.stabs "long unsigned int:t5=r5;0;4294967295;",128,0,0,0
.stabs "long long int:t6=r1;4;0;",128,0,0,0
.stabs "long long unsigned int:t7=r1;4;0;",128,0,0,0
.stabs "short int:t8=r8;-32768;32767;",128,0,0,0
.stabs "short unsigned int:t9=r9;0;65535;",128,0,0,0
.stabs "signed char:t10=r10;-32768;32767;",128,0,0,0
.stabs "unsigned char:t11=r11;0;65535;",128,0,0,0
.stabs "float:t12=r1;2;0;",128,0,0,0
.stabs "double:t13=r1;4;0;",128,0,0,0
.stabs "long double:t14=r1;4;0;",128,0,0,0
.stabs "complex float:t15=r1;4;0;",128,0,0,0
.stabs "complex double:t16=r1;8;0;",128,0,0,0
.stabs "complex long double:t17=r1;8;0;",128,0,0,0
.stabs "void:t18=18",128,0,0,0
.stabs "Bit8Def:T19=s1bitl:4,0,8;bith:4,8,8;;",128,0,0,0
.stabs "wordfielddef:T20=s1bit:4,0,16;;",128,0,0,0
.iram
.stabs "StatusData:G4",32,0,0,_StatusData
.public _StatusData
_StatusData:
.dw 1 dup(0)
.stabs "toteldata:G4",32,0,0,_toteldata
.public _toteldata
_toteldata:
.dw 1 dup(0)
.stabs "data1:G4",32,0,0,_data1
.public _data1
_data1:
.dw 1 dup(0)
.stabs "data2:G4",32,0,0,_data2
.public _data2
_data2:
.dw 1 dup(0)
.stabs "data3:G4",32,0,0,_data3
.public _data3
_data3:
.dw 1 dup(0)
.stabs "data4:G4",32,0,0,_data4
.public _data4
_data4:
.dw 1 dup(0)
.stabs "VolumeValue:G4",32,0,0,_VolumeValue
.public _VolumeValue
_VolumeValue:
.dw 1 dup(0)
.code
.stabs "KeyValue:F4",36,0,0,_KeyValue
// Program Unit: KeyValue
.public _KeyValue
_KeyValue: .proc
.stabn 0xa6,0,0,0
// old_frame_pointer = 0
// return_address = 1
// //.file 0 "E:\A1600\speech.c"
// .loc 0 29 0
// 25 //入口:无
// 26 //出口:处理过的键值
// 27 //-------------------------
// 28 U16 KeyValue(void)
// 29 {
LM1:
.stabn 68,0,29,LM1-_KeyValue
BB1_PU0: // 0x0
// BB:1 cycle count: 68
push BP to [SP] // [0:29]
BP = SP + 1 // [6:29]
// .loc 0 30 0
// 30 data1+=1;
LM2:
.stabn 68,0,30,LM2-_KeyValue
SR = SR & 63 // [10:30]
SR = SR | high6 _data1 // [12:30] data1
R4 = offset _data1 // [16:30] data1
R4 = DS:[R4] // [20:30]
R4 = R4 + 1 // [26:30]
SR = SR & 63 // [28:30]
SR = SR | high6 _data1 // [30:30] data1
R3 = offset _data1 // [34:30] data1
DS:[R3] = R4 // [38:30]
// .loc 0 31 0
// 31 if (data1>=0x5f53)
LM3:
.stabn 68,0,31,LM3-_KeyValue
SR = SR & 63 // [44:31]
SR = SR | high6 _data1 // [46:31] data1
R4 = offset _data1 // [50:31] data1
R4 = DS:[R4] // [54:31]
cmp R4, 24402 // [60:31]
jbe L_0_1 // [64:31]
BB2_PU0: // 0x19
// BB:2 cycle count: 52
// .loc 0 33 0
// 32 {
// 33 data1=0;
LM4:
.stabn 68,0,33,LM4-_KeyValue
R3 = 0 // [0:33]
SR = SR & 63 // [2:33]
SR = SR | high6 _data1 // [4:33] data1
R4 = offset _data1 // [8:33] data1
DS:[R4] = R3 // [12:33]
// .loc 0 34 0
// 34 data2+=1;
LM5:
.stabn 68,0,34,LM5-_KeyValue
SR = SR & 63 // [18:34]
SR = SR | high6 _data2 // [20:34] data2
R4 = offset _data2 // [24:34] data2
R4 = DS:[R4] // [28:34]
R4 = R4 + 1 // [34:34]
SR = SR & 63 // [36:34]
SR = SR | high6 _data2 // [38:34] data2
R3 = offset _data2 // [42:34] data2
DS:[R3] = R4 // [46:34]
L_0_1: // 0x2d
// BB:3 cycle count: 30
// .loc 0 36 0
// 35 }
// 36 return data2;
LM6:
.stabn 68,0,36,LM6-_KeyValue
SR = SR & 63 // [0:36]
SR = SR | high6 _data2 // [2:36] data2
R4 = offset _data2 // [6:36] data2
R1 = DS:[R4] // [10:36]
pop BP from [SP] // [16:36]
retf // [22:36]
.endp
LME1:
.stabf LME1-_KeyValue
.code
.stabs "PlaySpeech:F4",36,0,0,_PlaySpeech
// Program Unit: PlaySpeech
.public _PlaySpeech
_PlaySpeech: .proc
.stabn 0xa6,0,0,2
// key_value = 0
// bit_exit = 1
// old_frame_pointer = 2
// return_address = 3
// .loc 0 46 0
// 42 //入口:Volume(音量0--3) SongIndex(歌曲索引)
// 43 //出口:无
// 44 //----------------------------
// 45 U16 PlaySpeech(U16 Volume,U16 SongIndex)
// 46 {
LM7:
.stabn 68,0,46,LM7-_PlaySpeech
BB1_PU1: // 0x35
// BB:1 cycle count: 71
push BP to [SP] // [0:46]
SP = SP - 2 // [6:46]
BP = SP + 1 // [8:46]
LBB2:
// .loc 0 47 0
// 47 U16 key_value=0,bit_exit=00;
LM8:
.stabn 68,0,47,LM8-_PlaySpeech
R4 = 0 // [12:47]
[BP + 0] = R4 // [14:47] key_value
R4 = 0 // [20:47]
[BP + 1] = R4 // [22:47] bit_exit
// .loc 0 49 0
// 48
// 49 InilSpeech(SongIndex,Volume); //---语音播放初始化 入口:音量(0-3)和歌曲索引 出口:无
LM9:
.stabn 68,0,49,LM9-_PlaySpeech
SP = SP - 2 // [28:49]
R3 = [BP + 6] // [30:49] SongIndex
R4 = SP + 1 // [36:49]
[R4] = R3 // [40:49]
R3 = [BP + 5] // [46:49] Volume
R4 = SP + 2 // [52:49]
[R4] = R3 // [56:49]
call _InilSpeech // [62:49] InilSpeech
BB2_PU1: // 0x48
// BB:2 cycle count: 11
SP = SP + 2 // [0:49]
// .loc 0 50 0
// 50 T_SACM_DVR1600_Status(); //---在汇编中调用播放状态库函数 返回播放状态
LM10:
.stabn 68,0,50,LM10-_PlaySpeech
call _T_SACM_DVR1600_Status // [2:50] T_SACM_DVR1600_Status
L_1_1: // 0x4b
// BB:3 cycle count: 24
// .loc 0 51 0
// 51 while((StatusData&0x03)!=0x00)
LM11:
.stabn 68,0,51,LM11-_PlaySpeech
SR = SR & 63 // [0:51]
SR = SR | high6 _StatusData // [2:51] StatusData
R4 = offset _StatusData // [6:51] StatusData
R4 = DS:[R4] // [10:51]
R4 = R4 & 3 // [16:51]
cmp R4, 0 // [18:51]
je L_1_2 // [20:51]
BB4_PU1: // 0x54
// BB:4 cycle count: 9
// .loc 0 87 0
// 83 // break;
// 84 // }
// 85 // if (bit_exit==0x55)
// 86 // break;
// 87 T_SACM_DVR1600_ServiceLoop(); //---在汇编中调用解码库函数
LM12:
.stabn 68,0,87,LM12-_PlaySpeech
call _T_SACM_DVR1600_ServiceLoop // [0:87] T_SACM_DVR1600_ServiceLoop
BB5_PU1: // 0x56
// BB:5 cycle count: 28
// .loc 0 88 0
// 88 bit_exit++;
LM13:
.stabn 68,0,88,LM13-_PlaySpeech
R4 = [BP + 1] // [0:88] bit_exit
R4 = R4 + 1 // [6:88]
[BP + 1] = R4 // [8:88] bit_exit
// .loc 0 89 0
// 89 if(bit_exit == 65000)
LM14:
.stabn 68,0,89,LM14-_PlaySpeech
R4 = [BP + 1] // [14:89] bit_exit
cmp R4, 65000 // [20:89]
jne L_1_3 // [24:89]
BB6_PU1: // 0x5d
// BB:6 cycle count: 14
// .loc 0 90 0
// 90 key_value++;
LM15:
.stabn 68,0,90,LM15-_PlaySpeech
R4 = [BP + 0] // [0:90] key_value
R4 = R4 + 1 // [6:90]
[BP + 0] = R4 // [8:90] key_value
L_1_3: // 0x60
// BB:7 cycle count: 9
// .loc 0 91 0
// 91 FillRamBuf(); //---手动模式下填写播放内容 入口:无 出口:无
LM16:
.stabn 68,0,91,LM16-_PlaySpeech
call _FillRamBuf // [0:91] FillRamBuf
BB8_PU1: // 0x62
// BB:8 cycle count: 9
// .loc 0 92 0
// 92 T_SACM_DVR1600_Status(); //---在汇编中调用播放状态库函数 返回播放状态
LM17:
.stabn 68,0,92,LM17-_PlaySpeech
call _T_SACM_DVR1600_Status // [0:92] T_SACM_DVR1600_Status
BB9_PU1: // 0x64
// BB:9 cycle count: 4
jmp L_1_1 // [0:92]
L_1_2: // 0x65
// BB:10 cycle count: 31
// .loc 0 95 0
// 93 }
// 94 //---播放结束后复位一些用到的寄存器
// 95 key_value=toteldata;
LM18:
.stabn 68,0,95,LM18-_PlaySpeech
SR = SR & 63 // [0:95]
SR = SR | high6 _toteldata // [2:95] toteldata
R4 = offset _toteldata // [6:95] toteldata
R4 = DS:[R4] // [10:95]
[BP + 0] = R4 // [16:95] key_value
// .loc 0 96 0
// 96 T_Stop_Play();
LM19:
.stabn 68,0,96,LM19-_PlaySpeech
call _T_Stop_Play // [22:96] T_Stop_Play
BB11_PU1: // 0x6e
// BB:11 cycle count: 16
SP = SP + 2 // [0:96]
pop BP from [SP] // [2:96]
retf // [8:96]
LBE2:
.endp
.stabs "Volume:p4",160,0,0,5
.stabs "SongIndex:p4",160,0,0,6
.stabn 192,0,0,LBB2-_PlaySpeech
.stabs "key_value:4",128,0,0,0
.stabs "bit_exit:4",128,0,0,1
.stabn 224,0,0,LBE2-_PlaySpeech
LME2:
.stabf LME2-_PlaySpeech
.code
.stabs "main:F1",36,0,0,_main
// Program Unit: main
.public _main
_main: .proc
.stabn 0xa6,0,0,1
// i = 0
// old_frame_pointer = 1
// return_address = 2
// .loc 0 101 0
// 97 }
// 98
// 99
// 100 int main()
// 101 {
LM20:
.stabn 68,0,101,LM20-_main
BB1_PU2: // 0x71
// BB:1 cycle count: 74
push BP to [SP] // [0:101]
SP = SP - 1 // [6:101]
BP = SP + 1 // [8:101]
LBB3:
// .loc 0 103 0
// 102 U16 i;
// 103 VolumeValue=10;
LM21:
.stabn 68,0,103,LM21-_main
R3 = 10 // [12:103]
SR = SR & 63 // [14:103]
SR = SR | high6 _VolumeValue // [16:103] VolumeValue
R4 = offset _VolumeValue // [20:103] VolumeValue
DS:[R4] = R3 // [24:103]
// .loc 0 104 0
// 104 data1=0;data2=0;
LM22:
.stabn 68,0,104,LM22-_main
R3 = 0 // [30:104]
SR = SR & 63 // [32:104]
SR = SR | high6 _data1 // [34:104] data1
R4 = offset _data1 // [38:104] data1
DS:[R4] = R3 // [42:104]
R3 = 0 // [48:104]
SR = SR & 63 // [50:104]
SR = SR | high6 _data2 // [52:104] data2
R4 = offset _data2 // [56:104] data2
DS:[R4] = R3 // [60:104]
// .loc 0 106 0
// 105
// 106 for (i=0;i<57;i++)
LM23:
.stabn 68,0,106,LM23-_main
R4 = 0 // [66:106]
[BP + 0] = R4 // [68:106] i
L_2_2: // 0x8c
// BB:2 cycle count: 12
R4 = [BP + 0] // [0:106] i
cmp R4, 56 // [6:106]
ja L_2_3 // [8:106]
BB3_PU2: // 0x8f
// BB:3 cycle count: 53
// .loc 0 108 0
// 107 {
// 108 PlaySpeech(VolumeValue,i);
LM24:
.stabn 68,0,108,LM24-_main
SP = SP - 2 // [0:108]
SR = SR & 63 // [2:108]
SR = SR | high6 _VolumeValue // [4:108] VolumeValue
R4 = offset _VolumeValue // [8:108] VolumeValue
R3 = DS:[R4] // [12:108]
R4 = SP + 1 // [18:108]
[R4] = R3 // [22:108]
R3 = [BP + 0] // [28:108] i
R4 = SP + 2 // [34:108]
[R4] = R3 // [38:108]
call _PlaySpeech // [44:108] PlaySpeech
BB4_PU2: // 0x9f
// BB:4 cycle count: 2
SP = SP + 2 // [0:108]
Lt_2_1: // 0xa0
// BB:5 cycle count: 18
// .loc 0 106 0
LM25:
.stabn 68,0,106,LM25-_main
R4 = [BP + 0] // [0:106] i
R4 = R4 + 1 // [6:106]
[BP + 0] = R4 // [8:106] i
jmp L_2_2 // [14:106]
L_2_3: // 0xa4
// BB:6 cycle count: 35
// .loc 0 111 0
// 109 }
// 110
// 111 PlaySpeech(1,1);
LM26:
.stabn 68,0,111,LM26-_main
SP = SP - 2 // [0:111]
R3 = 1 // [2:111]
R4 = SP + 1 // [4:111]
[R4] = R3 // [8:111]
R3 = 1 // [14:111]
R4 = SP + 2 // [16:111]
[R4] = R3 // [20:111]
call _PlaySpeech // [26:111] PlaySpeech
BB7_PU2: // 0xaf
// BB:7 cycle count: 2
SP = SP + 2 // [0:111]
L_2_4: // 0xb0
// BB:8 cycle count: 4
// .loc 0 112 0
// 112 while(1) ;
LM27:
.stabn 68,0,112,LM27-_main
jmp L_2_4 // [0:112]
L_2_5: // 0xb1
// BB:9 cycle count: 16
SP = SP + 1 // [0:112]
pop BP from [SP] // [2:112]
retf // [8:112]
LBE3:
.endp
.stabn 192,0,0,LBB3-_main
.stabs "i:4",128,0,0,0
.stabn 224,0,0,LBE3-_main
LME3:
.stabf LME3-_main
.external _InilSpeech
.external _T_SACM_DVR1600_Status
.external _T_SACM_DVR1600_ServiceLoop
.external _FillRamBuf
.external _T_Stop_Play
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -