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

📄 ~kbtemp.tmp

📁 一款KingB公司的语音编码解码程序
💻 TMP
📖 第 1 页 / 共 2 页
字号:
+###########################################################
+#                  KBLINKER Copyright 1998                #
+#                     (c)Copyright 1998                   #
+#                  King Billion Electronics               #
+###########################################################
+
+Area                               Addr   Size   Decimal Bytes (Attributes)
+--------------------------------   ----   ----   ------- ----- ------------
+CODE                               0012   4F56 =  20310. bytes (REL,CON)+
+
+      Value  Global
+      -----  --------------------------------
+       4E18  .tc_play                        
+       4EB1  .tc_int                         
+       4EC4  slope_table                     
+       4F04  next_step                       
+       4F44  Wait_Drdy                       
+       4F53  macro_TP_ACC                    
+
+Area                               Addr   Size   Decimal Bytes (Attributes)
+--------------------------------   ----   ----   ------- ----- ------------
+DATA                               0005   0011 =     17. bytes (ABS,OVR,PAG)   Boundary Error+
+
+      Value  Global
+      -----  --------------------------------
+       0007  speechlow                       
+       0008  speechhigh                      
+       0009  speechtpp                       
+       000A  b_talk_end                      
+       000B  voice                           
+       000C  v_int_tpl                       
+       000D  v_int_tph                       
+       000E  v_talk_data                     
+       000F  x                               
+       0010  p_voice                         
+       0011  q_index                         
+       0012  s_data                          
+       0013  k                               
+       0014  j                               
+       0015  b_talk_high                     
+
+Area                               Addr   Size   Decimal Bytes (Attributes)
+--------------------------------   ----   ----   ------- ----- ------------
+RCODE                              0000   0012 =     18. bytes (ABS,OVR)+
+
+      Value  Global
+      -----  --------------------------------
+       0012  .STARTUP                        
+
+Files Linked      [ module(s) ]
+
+m_jcode.obj       [          ]
+jadpcm.obj        [          ]
+
+User Base Address Definitions
+
+CODE=.STARTUP
+DATA=0x05
+
+User Global Definitions
+
+SP_INIT=0x7F
+
+###########################################################
+###   m_jcode.asl                                       ###                          
+###########################################################
+                     1 ;------------------------------------------------------------------------------
+                     2 ;       Program : m_jcode.asm
+                     3 ;       Version : I
+                     4 ;       Date    : Sept 00
+                     5 ;       Purpose : For demo new adpcm algorithm (JCODE).
+                     6 ;               : using D/A output.
+                     7 ;       Resource :
+                     8 ;               Timer 1 : not used.
+                     9 ;               Timer 2 : speech sampling interrupt, 8k sampling rate.
+                    10 ;       Description :
+                    11 ;               Using D-version ICE target board.
+                    12 ;               MCU     : dual clock, 4MHz Crystal, 32768Hz Slow clock.
+                    13 ;               To play the voice, press any Port D key(s).
+                    14 ;       Usage   :
+                    15 ;               1. For demonstrate how to link with jadpcm.obj for JCODE
+                    16 ;                  voice output.
+                    17 ;               2. Function call inside nc_main.obj
+                    18 ;                  a. .tc_int()   - for initialize the variables.
+                    19 ;                  b. .tc_play() - calling within interrupt routine.
+                    20 ;                                        - a 7-bit encoded data is placed in
+                    21 ;                                        - a variable named as voice.
+                    22 ;               3. RAM used.
+                    23 ;                  Total of 15 bytes used.
+                    24 ;                  a. b_talk_end        - 0ffh : means the voice is being stopped.
+                    25 ;                                       - 0 : means the voice is being played.
+                    26 ;                  b. speechtpp,high,low    - 3 bytes, for storing the speech pointer.
+                    27 ;                  c. Other                 - see below RAM declaration.
+                    28 ;
+                    29 ;               4. Procedure
+                    30 ;                       a. turn on voc and pwmc.
+                    31 ;                       b. play head if nescessary (for d/a output).
+                    32 ;                       c. setup .speechtpp,high,low
+                    33 ;                       d. call .tc_int()
+                    34 ;                       e. setup timer 1 or 2 for speech sampling time.
+                    35 ;                       f. enable timer 1 or 2 for speech playing
+                    36 ;                       g. check b_talk_end to know when speech ends.
+                    37 ;
+                    38 ;--------------------------------------------------------------------------
+                    39 ;------------------------------
+                    40 ; constant declaration
+                    41 ;------------------------------
014C                 42 t8ksample       equ     332     ;(4M/1.5/8000)-1
0040                 43 silence_level   equ     40h
00FF                 44 pcm_end_code    equ     0xff
+                    45 
+                    46 ;------------------------------
+                    47 ; RAM declaration
+                    48 ;------------------------------
+                    49 .area DATA(ABS,PAG)
0005                 50 acc:            .ds     1
0006                 51 mirr_flag:      .ds     1
+                    52 
+                    53 
+                    54 ;--------------------------------------------------------------
+                    55 ; The following RAM is used for JCODE encoding.
+                    56 ; It can be released when not in used JCODE voice playing.
+                    57 ;--------------------------------------------------------------
0007                 58 speechlow::                     .ds     1
0008                 59 speechhigh::                    .ds     1
0009                 60 speechtpp::                     .ds     1
000A                 61 b_talk_end::                    .ds     1
000B                 62 voice::                         .ds     1
+                    63 
000C                 64 v_int_tpl::                     .ds     1
000D                 65 v_int_tph::                     .ds     1
000E                 66 v_talk_data::                   .ds     1
000F                 67 x::                             .ds     1
0010                 68 p_voice::                       .ds     1
0011                 69 q_index::                       .ds     1
0012                 70 s_data::                        .ds     1
0013                 71 k::                             .ds     1
0014                 72 j::                             .ds     1
0015                 73 b_talk_high::                   .ds     1
+                    74 
+                    75 
+                    76 ;------------------------------
+                    77 ; main program
+                    78 ;------------------------------
+                    79 .area   RCODE(ABS)
+                    80         org     0x00
0000 02 00 B0        81         br      main
+                    82         org     0x03
0003 02 00 13        83         br      ttrap1
+                    84         org     0x06
0006 02 00 14        85         br      int1
+                    86         org     0x09
0009 02 00 12        87         br      tc1
+                    88         org     0x0c
000C 02 00 16        89         br      tc2
+                    90         org     0x0f
000F 02 00 15        91         br      int2
+                    92 
0012                 93 .STARTUP::
+                    94         .area   CODE
+                    95 
0012                 96 tc1:
0012 25              97         reti
0013                 98 ttrap1:
0013 26              99         rett
0014                100 int1:
0014 25             101         reti
0015                102 int2:
0015 25             103         reti
+                   104 
+                   105 ;----------------------------------------------------------------------
+                   106 ;
+                   107 ;       function : tc2() interrupt service function
+                   108 ;
+                   109 ;----------------------------------------------------------------------
0016                110 tc2:
+                   111 ;save acc., flag
0016 FD 05          112         sta     acc
0018 F0 22          113         lda     r_op1
001A FD 06          114         sta     mirr_flag
+                   115 
+                   116 ;play JCODE routine
001C F1 0A          117         lda     b_talk_end
001E A7 00          118         cmpe    #00
0020 07 00 2A       119         brnz    tc2_ret
+                   120 
+                   121 ;call JCODE library
0023 20 4E 18       122         call    .tc_play
0026 F1 0B          123         lda     voice
0028 FC 34          124         sta     r_pwmc
+                   125 
002A                126 tc2_ret:
+                   127 ;restore acc. and flag
002A F1 06          128         lda     mirr_flag
002C FC 22          129         sta     r_op1
002E F1 05          130         lda     acc
0030 25             131         reti
+                   132 
+                   133 ;------------------------------------------------------
+                   134 ;
+                   135 ;       function : play_head()
+                   136 ;
+                   137 ;------------------------------------------------------
0031                138 play_head:
0031 F3 00          139         lda     #0
0033                140 play_head_l0:
0033 FC 34          141         sta     r_pwmc
0035 20 00 85       142         call    dummy_loop
0038 20 00 85       143         call    dummy_loop
003B 20 00 85       144         call    dummy_loop
003E 20 00 85       145         call    dummy_loop
0041 20 00 85       146         call    dummy_loop
0044 20 00 85       147         call    dummy_loop
0047 20 00 85       148         call    dummy_loop
004A 20 00 85       149         call    dummy_loop
004D 20 00 85       150         call    dummy_loop
0050 20 00 85       151         call    dummy_loop
0053 1F             152         inca
0054 A7 40          153         cmpe    #silence_level
0056 07 00 33       154         brnz    play_head_l0

⌨️ 快捷键说明

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