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

📄 pyzc3.lst

📁 基于80196KB开发的C程序,在伟福和星研环境中编译通过,用于学习8096系列单片机的中断编程技术.并成功地用于某地机动车检测业务.
💻 LST
📖 第 1 页 / 共 4 页
字号:
          01C7  61FDFF00           R         and     tmpreg,#0FFFDH
          01CB  2000                         br      @0029
          01CD                        @0029: 
          01CD  B00000             E         ldb     imask1,tmpreg
  251     1       
  252     1       
  253     1        end_rec_buff=0;          /* initialize buffer pointers        */
          01D0  1105               R         clrb    end_rec_buff
  254     1        begin_rec_buff=0;
          01D2  1106               R         clrb    begin_rec_buff
C196  Compiler   pyzc3                                                                      14-Dec-106 09:06:41  Page  1  255     1        end_trans_buff=0;
          01D4  1104               R         clrb    end_trans_buff
  256     1        begin_trans_buff=0;
          01D6  1103               R         clrb    begin_trans_buff
  257     1        sp_status_image = 0x20;  /*  Init for initial transmittion  */
          01D8  B12002             R         ldb     sp_status_image,#2
  258     1       }
          01DB  F0                           ret     
                                      
                ; Function Statistics for: init_serial
                ;    Code Size :   86     Parameter Count:   
                ;    Stack Size:         Parameter Size :   
                ;    OReg Size :         Stack Depth    :   

  259             
  26              void init_timer1(void)
  261             {
          01DC                        init_timer1: 
  262     1       /*
  263     1       * Timer 1 configuration:
  264     1       *   overflow detection         = enabled
  265     1       */
  266     1       
  267     1         _SetSFR_bit (ioc1, T1OVF_DETECTION);
          01DC  B10F00             E         ldb     wsr,#0FH
          01DF  B00000             E         ldb     tmpreg,ioc1
          01E2  910400             R         orb     tmpreg,#4
          01E5  1101               R         clrb    tmpreg+1
          01E7  1100               E         clrb    wsr
          01E9  B00000             E         ldb     ioc1,tmpreg
  268     1       
  269     1       /*
  27      1       *   timer overflow interrupt   = enabled
  271     1       */
  272     1       
  273     1         _SetSFR_bit (int_mask, TOVF_INT_MSK);
          01EC  2000                         br      @002D
          01EE                        @002D: 
          01EE  B00000             E         ldb     tmpreg,int_mask
          01F1  910100             R         orb     tmpreg,#1
          01F4  1101               R         clrb    tmpreg+1
          01F6  2000                         br      @002E
          01F8                        @002E: 
          01F8  B00000             E         ldb     int_mask,tmpreg
  274     1       }
          01FB  F0                           ret     
                                      
                ; Function Statistics for: init_timer1
                ;    Code Size :   32     Parameter Count:   
                ;    Stack Size:         Parameter Size :   
                ;    OReg Size :         Stack Depth    :   

  275             
  276             void init_pwm0(void)
  277             {
          01FC                        init_pwm0: 
C196  Compiler   pyzc3                                                                      14-Dec-106 09:06:41  Page  11
                 Assembly Listing of Object Code


  278     1       /*
  279     1       * PWM0 configuration:
  28      1       *   prescaler mode  = divide by 1
  281     1       *   PWM output      = enabled
  282     1       *   PWM duty cycle  = 50.00 %
  283     1       *
  284     1       * pwm0_control = 256 * (Duty Cycle) / 100
  285     1       */
  286     1       
  287     1         _ClrSFR_bit (ioc2, PWM_PRESCALE);
          01FC  B10F00             E         ldb     wsr,#0FH
          01FF  AC0000             E         ldbze   tmpreg,ioc2
          0202  61FBFF00           R         and     tmpreg,#0FFFBH
          0206  1100               E         clrb    wsr
          0208  B00000             E         ldb     ioc2,tmpreg
  288     1         _WriteSFR   (pwm0_control, 0x80);
          020B  1100               E         clrb    wsr
          020D  B18000             E         ldb     pwm_control,#8
  289     1         _SetSFR_bit (ioc1, PWM0_ENABLE);
          0210  B10F00             E         ldb     wsr,#0FH
          0213  B00000             E         ldb     tmpreg,ioc1
          0216  910100             R         orb     tmpreg,#1
          0219  1101               R         clrb    tmpreg+1
          021B  1100               E         clrb    wsr
          021D  B00000             E         ldb     ioc1,tmpreg
  29      1       }
          0220  F0                           ret     
                                      
                ; Function Statistics for: init_pwm0
                ;    Code Size :   37     Parameter Count:   
                ;    Stack Size:         Parameter Size :   
                ;    OReg Size :         Stack Depth    :   

  291             
  292             void init_hso1_5(void)
  293             {
          0221                        init_hso1_5: 
  294     1       /*
  295     1       * HSO 5 module initialization:
  296     1       *   HSO5 output  = enabled
  297     1       *   cam locking  = disabled
  298     1       *   clear cam    = no
  299     1       */
  3       1       
  3       1         _SetSFR_bit (ioc1, HSO4_PIN_ENABLE);
          0221  B10F00             E         ldb     wsr,#0FH
          0224  B00000             E         ldb     tmpreg,ioc1
          0227  911000             R         orb     tmpreg,#1
          022A  1101               R         clrb    tmpreg+1
          022C  1100               E         clrb    wsr
          022E  B00000             E         ldb     ioc1,tmpreg
  3       1         _SetSFR_bit (ioc1, HSO5_PIN_ENABLE);
          0231  B10F00             E         ldb     wsr,#0FH
          0234  B00000             E         ldb     tmpreg,ioc1
          0237  914000             R         orb     tmpreg,#4
          023A  1101               R         clrb    tmpreg+1
C196  Compiler   pyzc3                                                                      14-Dec-106 09:06:41  Page  12
                 Assembly Listing of Object Code


          023C  1100               E         clrb    wsr
          023E  B00000             E         ldb     ioc1,tmpreg
  3       1         _ClrSFR_bit (ioc2, CAM_LOCK_BIT);
          0241  B10F00             E         ldb     wsr,#0FH
          0244  AC0000             E         ldbze   tmpreg,ioc2
          0247  61BFFF00           R         and     tmpreg,#0FFBFH
          024B  1100               E         clrb    wsr
          024D  B00000             E         ldb     ioc2,tmpreg
  3       1         _ClrSFR_bit (ioc2, CLEAR_CAM_BIT);
          0250  B10F00             E         ldb     wsr,#0FH
          0253  AC0000             E         ldbze   tmpreg,ioc2
          0256  617FFF00           R         and     tmpreg,#0FF7FH
          025A  1100               E         clrb    wsr
          025C  B00000             E         ldb     ioc2,tmpreg
  3       1       
  3       1       /*
  3       1       * Interrupts:
  3       1       *   HSO interrupt      = disabled
  3       1       *   software timer int = disabled
  31      1       */
  311     1       
  312     1         _ClrSFR_bit (int_mask, HSO_INT);
          025F  2000                         br      @003E
          0261                        @003E: 
          0261  AC0000             E         ldbze   tmpreg,int_mask
          0264  61F7FF00           R         and     tmpreg,#0FFF7H
          0268  2000                         br      @003F
          026A                        @003F: 
          026A  B00000             E         ldb     int_mask,tmpreg
  313     1         _ClrSFR_bit (int_mask, SW_TIMER_INT);
          026D  2000                         br      @004
          026F                        @004: 
          026F  AC0000             E         ldbze   tmpreg,int_mask
          0272  61DFFF00           R         and     tmpreg,#0FFDFH
          0276  2000                         br      @0041
          0278                        @0041: 
          0278  B00000             E         ldb     int_mask,tmpreg
  314     1       }
          027B  F0                           ret     
                                      
                ; Function Statistics for: init_hso1_5
                ;    Code Size :   91     Parameter Count:   
                ;    Stack Size:         Parameter Size :   
                ;    OReg Size :         Stack Depth    :   

  315             
  316             void init_atod_converter(void)
  317             {
          027C                        init_atod_converter: 
  318     1       /* 
  319     1       * A/D conversion configuration:
  32      1       *    speed           = normal
  321     1       *    interrupt       = disabled 
  322     1       *    channel         = 0
  323     1       *    start time      = started immediately
  324     1       *    mode            = 10-bit
C196  Compiler   pyzc3                                                                      14-Dec-106 09:06:41  Page  13
                 Assembly Listing of Object Code


  325     1       */
  326     1       
  327     1         _ClrSFR_bit (ioc2, AD_SPEED);
          027C  B10F00             E         ldb     wsr,#0FH
          027F  AC0000             E         ldbze   tmpreg,ioc2
          0282  61EFFF00           R         and     tmpreg,#0FFEFH
          0286  1100               E         clrb    wsr
          0288  B00000             E         ldb     ioc2,tmpreg
  328     1         _ClrSFR_bit (int_mask, AD_INT);
          028B  2000                         br      @0045
          028D                        @0045: 
          028D  AC0000             E         ldbze   tmpreg,int_mask
          0290  61FDFF00           R         and     tmpreg,#0FFFDH
          0294  2000                         br      @0046
          0296                        @0046: 
          0296  B00000             E         ldb     int_mask,tmpreg
  329     1         _WriteSFR   (ad_command, 0x8);
          0299  1100               E         clrb    wsr
          029B  B10800             E         ldb     ad_command,#8
  33      1       }
          029E  F0                           ret     
                                      
                ; Function Statistics for: init_atod_converter
                ;    Code Size :   35     Parameter Count:   
                ;    Stack Size:         Parameter Size :   
                ;    OReg Size :         Stack Depth    :   

  331             /*   convert_atod performs an atod conversion and.  This routine 
  332                  waits until the atod busy bit is cleared before and after the 
  333                  conversion. Interrupts should be disabled and the ATOD 
  334                  should be initialized prior to calling this routine.     */
  335             
  336             unsigned int convert_atod(unsigned char channel)
  337             {
          029F                        convert_atod: 
          029F  C800               R         push    ?OVRBASE
          02A1  B3180400           R         ldb     channel,4[SP]
  338     1        wsr = 0;
          02A5  1100               E         clrb    wsr
          02A7  2000                         br      @004A
          02A9                        @0049: 
  339     1        while(ATOD_BUSY);
          02A9                        @004A: 
          02A9  410800001C         E         and     Tmp0,ad_result,#8
          02AE  881C00                       cmp     R0,Tmp0
          02B1  D7F6                         bne     @0049
  34      1        ad_command =  channel | GO_NOW | TEN_BIT_MODE;
          02B3  B0001C             R         ldb     Tmp0,channel
          02B6  91081C                       orb     Tmp0,#8
          02B9  B01C00             E         ldb     ad_command,Tmp0
  341     1        zero_reg=zero_reg+zero_reg;     /*  needed for 4 state delay  */
          02BC  640000             E         add     r0,r0
  342     1        zero_reg=zero_reg+zero_reg;     /*  needed for 4 state delay  */
          02BF  640000             E         add     r0,r0
          02C2  2000                         br      @004D
          02C4                        @004C: 
C196  Compiler   pyzc3                                                                      14-Dec-106 09:06:41  Page  14
                 Assembly Listing of Object Code


  343     1        while(ATOD_BUSY);
          02C4                        @004D: 
          02C4  410800001C         E         and     Tmp0,ad_result,#8
          02C9  881C00                       cmp     R0,Tmp0
          02CC  D7F6                         bne     @004C
  344     1        return((ad_result >> 6));
          02CE  A0001C             E         ld      Tmp0,ad_result
          02D1  08061C                       shr     Tmp0,#6
          02D4  2000                         br      @0048
  345     1       }
          02D6                        @0048: 
          02D6  CC00               R         pop     ?OVRBASE
          02D8  F0                           ret     
                                      
                ; Function Statistics for: convert_atod

⌨️ 快捷键说明

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