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

📄 pyzc4.lst

📁 基于80196KB开发的C程序,在伟福和星研环境中编译通过,用于学习8096系列单片机的中断编程技术.并成功地用于某地机动车检测业务.
💻 LST
📖 第 1 页 / 共 5 页
字号:
                                      
                ; Function Statistics for: receive
                ;    Code Size :  2     Parameter Count:   
                ;    Stack Size:         Parameter Size :   
                ;    OReg Size :    1     Stack Depth    :   4

  238             
  239             /*   The seperate txd and rxd interrupts can more efficiently process
  24                   the interrupts than the generic serial interrupt as this one 
  241                  does.
  242             */                 
  243             
  244             void serial_isr(void)
  245             {
          019C                        serial_isr: 
          019C  F2                           pushf   
          019D  C81C                         push    Tmp0
          019F  C81E                         push    Tmp2
          01A1  C820                         push    Tmp4
          01A3  C822                         push    Tmp6
  246     1       sp_status_image |= sp_stat;       /*  image sp_stat into status_image  */
          01A5  900002             E         orb     sp_status_image,sp_stat
  247     1       
  248     1       if(checkbit(sp_status_image, RI_BIT))
          01A8  5140021C           R         andb    Tmp0,sp_status_image,#4
          01AC  981C00                       cmpb    R0,Tmp0
          01AF  DF04                         be      @001E
  249     1            receive();
          01B1  2F1A                         call    receive
  25      1       else if(checkbit(sp_status_image, TI_BIT))
          01B3  200B                         br      @001F
          01B5                        @001E: 
          01B5  5120021C           R         andb    Tmp0,sp_status_image,#2
          01B9  981C00                       cmpb    R0,Tmp0
          01BC  DF02                         be      @002
  251     1            transmit();
          01BE  2E93                         call    transmit
          01C0                        @002: 
          01C0                        @001F: 
  252     1       }
          01C0  CC22                         pop     Tmp6
          01C2  CC20                         pop     Tmp4
          01C4  CC1E                         pop     Tmp2
          01C6  CC1C                         pop     Tmp0
          01C8  F3                           popf    
          01C9  F0                           ret     
                                      
                ; Function Statistics for: serial_isr
                ;    Code Size :   46     Parameter Count:   
C196  Compiler   pyzc4                                                                      15-Dec-106 17:34:24  Page  1                ;    Stack Size:         Parameter Size :   
                ;    OReg Size :         Stack Depth    :  18

  253             
  254             void init_serial()
  255             {
          01CA                        init_serial: 
  256     1       
  257     1       /*
  258     1       * Serial port configuration:
  259     1       *   serial mode     = 1
  26      1       *   even parity     = disabled
  261     1       *   serial receive  = enabled
  262     1       *   serial transmit = enabled
  263     1       */
  264     1       
  265     1         _SetSFR_bit (ioc1, TXD_ENABLE_BIT);
          01CA  B10F00             E         ldb     wsr,#0FH
          01CD  B00000             E         ldb     tmpreg,ioc1
          01D0  912000             R         orb     tmpreg,#2
          01D3  1101               R         clrb    tmpreg+1
          01D5  1100               E         clrb    wsr
          01D7  B00000             E         ldb     ioc1,tmpreg
  266     1         _WriteSFR   (sp_con, 0x9);
          01DA  1100               E         clrb    wsr
          01DC  B10900             E         ldb     sp_con,#9
  267     1       
  268     1       /*
  269     1       * Baud Rate = 0
  27      1       */
  271     1       
  272     1         _WriteSFR   (baud_rate, 0x70);
          01DF  1100               E         clrb    wsr
          01E1  B17000             E         ldb     baud_rate,#7
  273     1         _WriteSFR   (baud_rate, 0x82);
          01E4  1100               E         clrb    wsr
          01E6  B18200             E         ldb     baud_rate,#82H
  274     1       
  275     1       /*
  276     1       * Interrupts:
  277     1       *   transmit interrupt = disabled
  278     1       *   receive interrupt  = disabled
  279     1       *   serial interrupt   = enabled
  28      1       */
  281     1       
  282     1         _SetSFR_bit (int_mask, SERIAL_INT);
          01E9  2000                         br      @0027
          01EB                        @0027: 
          01EB  B00000             E         ldb     tmpreg,int_mask
          01EE  914000             R         orb     tmpreg,#4
          01F1  1101               R         clrb    tmpreg+1
          01F3  2000                         br      @0028
          01F5                        @0028: 
          01F5  B00000             E         ldb     int_mask,tmpreg
  283     1         _ClrSFR_bit (int_mask1, TXD_INTERRUPT);
          01F8  2000                         br      @0029
C196  Compiler   pyzc4                                                                      15-Dec-106 17:34:24  Page  11
                 Assembly Listing of Object Code


          01FA                        @0029: 
          01FA  AC0000             E         ldbze   tmpreg,imask1
          01FD  61FEFF00           R         and     tmpreg,#0FFFEH
          0201  2000                         br      @002A
          0203                        @002A: 
          0203  B00000             E         ldb     imask1,tmpreg
  284     1         _ClrSFR_bit (int_mask1, RXD_INTERRUPT);
          0206  2000                         br      @002B
          0208                        @002B: 
          0208  AC0000             E         ldbze   tmpreg,imask1
          020B  61FDFF00           R         and     tmpreg,#0FFFDH
          020F  2000                         br      @002C
          0211                        @002C: 
          0211  B00000             E         ldb     imask1,tmpreg
  285     1       
  286     1       
  287     1        end_rec_buff=0;          /* initialize buffer pointers        */
          0214  1105               R         clrb    end_rec_buff
  288     1        begin_rec_buff=0;
          0216  1106               R         clrb    begin_rec_buff
  289     1        end_trans_buff=0;
          0218  1104               R         clrb    end_trans_buff
  29      1        begin_trans_buff=0;
          021A  1103               R         clrb    begin_trans_buff
  291     1        sp_status_image = 0x20;  /*  Init for initial transmittion  */
          021C  B12002             R         ldb     sp_status_image,#2
  292     1       }
          021F  F0                           ret     
                                      
                ; Function Statistics for: init_serial
                ;    Code Size :   86     Parameter Count:   
                ;    Stack Size:         Parameter Size :   
                ;    OReg Size :         Stack Depth    :   

  293             
  294             void init_timer1(void)
  295             {
          0220                        init_timer1: 
  296     1       /*
  297     1       * Timer 1 configuration:
  298     1       *   overflow detection         = enabled
  299     1       */
  3       1       
  3       1         _SetSFR_bit (ioc1, T1OVF_DETECTION);
          0220  B10F00             E         ldb     wsr,#0FH
          0223  B00000             E         ldb     tmpreg,ioc1
          0226  910400             R         orb     tmpreg,#4
          0229  1101               R         clrb    tmpreg+1
          022B  1100               E         clrb    wsr
          022D  B00000             E         ldb     ioc1,tmpreg
  3       1       
  3       1       /*
  3       1       *   timer overflow interrupt   = enabled
  3       1       */
  3       1       
  3       1         _SetSFR_bit (int_mask, TOVF_INT_MSK);
C196  Compiler   pyzc4                                                                      15-Dec-106 17:34:24  Page  12
                 Assembly Listing of Object Code


          0230  2000                         br      @003
          0232                        @003: 
          0232  B00000             E         ldb     tmpreg,int_mask
          0235  910100             R         orb     tmpreg,#1
          0238  1101               R         clrb    tmpreg+1
          023A  2000                         br      @0031
          023C                        @0031: 
          023C  B00000             E         ldb     int_mask,tmpreg
  3       1       }
          023F  F0                           ret     
                                      
                ; Function Statistics for: init_timer1
                ;    Code Size :   32     Parameter Count:   
                ;    Stack Size:         Parameter Size :   
                ;    OReg Size :         Stack Depth    :   

  3               
  31              void init_pwm0(void)
  311             {
          0240                        init_pwm0: 
  312     1       /*
  313     1       * PWM0 configuration:
  314     1       *   prescaler mode  = divide by 1
  315     1       *   PWM output      = enabled
  316     1       *   PWM duty cycle  = 50.00 %
  317     1       *
  318     1       * pwm0_control = 256 * (Duty Cycle) / 100
  319     1       */
  32      1       
  321     1         _ClrSFR_bit (ioc2, PWM_PRESCALE);
          0240  B10F00             E         ldb     wsr,#0FH
          0243  AC0000             E         ldbze   tmpreg,ioc2
          0246  61FBFF00           R         and     tmpreg,#0FFFBH
          024A  1100               E         clrb    wsr
          024C  B00000             E         ldb     ioc2,tmpreg
  322     1         _WriteSFR   (pwm0_control, 0x80);
          024F  1100               E         clrb    wsr
          0251  B18000             E         ldb     pwm_control,#8
  323     1         _SetSFR_bit (ioc1, PWM0_ENABLE);
          0254  B10F00             E         ldb     wsr,#0FH
          0257  B00000             E         ldb     tmpreg,ioc1
          025A  910100             R         orb     tmpreg,#1
          025D  1101               R         clrb    tmpreg+1
          025F  1100               E         clrb    wsr
          0261  B00000             E         ldb     ioc1,tmpreg
  324     1       }
          0264  F0                           ret     
                                      
                ; Function Statistics for: init_pwm0
                ;    Code Size :   37     Parameter Count:   
                ;    Stack Size:         Parameter Size :   
                ;    OReg Size :         Stack Depth    :   

  325             
  326             void init_hso1_5(void)
  327             {
C196  Compiler   pyzc4                                                                      15-Dec-106 17:34:24  Page  13
                 Assembly Listing of Object Code


          0265                        init_hso1_5: 
  328     1       /*
  329     1       * HSO 5 module initialization:
  33      1       *   HSO5 output  = enabled
  331     1       *   cam locking  = disabled
  332     1       *   clear cam    = no
  333     1       */
  334     1       
  335     1         _SetSFR_bit (ioc1, HSO4_PIN_ENABLE);
          0265  B10F00             E         ldb     wsr,#0FH
          0268  B00000             E         ldb     tmpreg,ioc1
          026B  911000             R         orb     tmpreg,#1
          026E  1101               R         clrb    tmpreg+1
          0270  1100               E         clrb    wsr
          0272  B00000             E         ldb     ioc1,tmpreg
  336     1         _SetSFR_bit (ioc1, HSO5_PIN_ENABLE);

⌨️ 快捷键说明

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