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

📄 wuxicar.lst

📁 基于80196KB开发的C程序,在伟福和星研环境中编译通过,用于学习8096系列单片机的中断编程技术.并成功地用于某地机动车检测业务.
💻 LST
📖 第 1 页 / 共 5 页
字号:
C196  Compiler   wuxicar                                                                    30-May-107 11:11:06  Page   1


80C196 C compiler v5.0 r3              SN000000-194 (C)1996 Tasking Software BV
Object module placed in wuxicar.obj
Compiler invoked by: C:\XINGYAN\C196\BIN\C196.EXE wuxicar.C md(kb) DB SB CO MS Ot(1) SP(0) DN(1) RG(220) SI(C:\XingYan\c
                -196\Include) 

 Line Level  Incl 

                                             cseg   
    1             //#pragma model(196)
    2             #include <80c196kd.h>
    3             
    4             #define   SP_MODE0           0x00
    5             #define   SP_MODE1           0x01
    6             #define   SP_MODE2           0x02
    7             #define   SP_MODE3           0x03
    8             #define   REC_ENABLE         0x08
    9             #define   REC_DISABLE        0x00
   1              #define   TXD_ENABLE_BIT     0x05         
   11             #define   EVEN_PARITY        0x08
   12             #define   ODD_PARITY         0x28
   13             #define   NO_PARITY          0x00
   14             #define   SET_BIT_8          0x04
   15             #define   SP_INTERNAL_CLK    0x8000
   16             #define   SP_EXTERNAL_CLK    0x0000
   17             #define   TXD_INTERRUPT      0x00
   18             #define   RXD_INTERRUPT      0x01
   19             //#define   SERIAL_INT         0x06
   2              #define   TI_BIT             0x05
   21             #define   RI_BIT             0x06
   22             #define   FE_BIT             0x04
   23             #define   OE_BIT             0x02
   24             #define   RPE_BIT            0x07
   25             #define   RB8_BIT            0x07
   26             #define   TXE_BIT            0x03
   27             #define   T1OVF_DETECTION       2
   28             #define   TOVF_INT_MSK          0
   29             #define   T2OVF_INT_MSK         4
   3              #define   T2CAPTURE_INT_MSK     3
   31             #define   T2OVF_DETECTION       3
   32             #define   T2_CLOCK_INTERNAL     0
   33              #define   TOVF_INT             0
   34              #define   AD_INT               1
   35              #define   HSI_DATA_AVAIL_INT   2
   36              #define   HSO_INT              3
   37              #define   HSI0_INT             4
   38              #define   SW_TIMER_INT         5
   39              #define   SERIAL_INT           6
   4               #define   EXT_INT              7
   41              #define   TRAP_INT             8
   42              #define   UNIMPLEMENTED_INT    9
   43              #define   TXD_INT              24
   44              #define   RXD_INT              25
   45              #define   HSI_FIFO4_INT        26
   46              #define   TIMER2_CAPT_INT      27
   47              #define   T2OVF_INT            28
   48              #define   EXT1_INT             29
   49              #define   HSI_FIFO_FULL_INT    30
C196  Compiler   wuxicar                                                                    30-May-107 11:11:06  Page   2
                 Assembly Listing of Object Code


   5               #define   NONMASKABLE_INT      31
   51              #define   PWM0_ENABLE     0
   52              #define   PWM_PRESCALE    2
   53             
   54             #define   HSO4_PIN_ENABLE   4
   55             #define   HSO5_PIN_ENABLE   6
   56             #define   CAM_LOCK_BIT      6
   57             #define   CLEAR_CAM_BIT     7
   58             #define  ATOD_BUSY            (ad_result & 0x08)
   59             #define  GO_NOW               0x08
   6              #define  GO_EPA               0x00
   61             #define  TEN_BIT_MODE         0x00
   62             #define  EIGHT_BIT_MODE       0x10
   63             #define  AD_SPEED             4
   64             #define  AD_INT               1
   65             #define   HSI0_PIN_ENABLE      0
   66             #define   HSI0_EXT_INT         0x10
   67             #define   HSI1_PIN_ENABLE      2
   68             #define   HSI2_PIN_ENABLE      4
   69             #define   HSI3_PIN_ENABLE      6
   7              #define   SELECT_INT_VECTOR    7
   71             #define   HSI_FIFO_FULL_INTMSK 0x40
   72             #define   HSI_FIFO_4_INT       0x4
   73             #define   EXTINT_SRC  1
   74             
   75             
   76             /****************************************************************************/
   77             /*                                                                          */
   78             /* Usefull bit macros.                                                      */
   79             /*                                                                          */
   8              /****************************************************************************/
   81             
   82             #define   checkbit(var,bit)  (var & (0x01 << (bit)))
   83             #define   setbit(var,bit)    (var |= (0x01 << (bit)))
   84             #define   clrbit(var,bit)    (var &= (~(0x01 << (bit))))
   85             
   86             static unsigned char sp_status_image;
   87             register unsigned int tmpreg;
   88             #pragma interrupt(serial_isr=6)
   89             #pragma interrupt (tovf_isr = TOVF_INT)
   9              #pragma interrupt (ext_isr = EXT_INT)
   91             #pragma interrupt (hsi0_isr = HSI0_INT)
   92             const unsigned int ccr = {0x20CD};
   93             #pragma locate(ccr=0x2018)
   94             
   95             #define TRANSMIT_BUF_SIZE 20
   96             #define RECEIVE_BUF_SIZE 20
   97             
   98             static unsigned char trans_buff[TRANSMIT_BUF_SIZE];
   99             static unsigned char mess[12]={'S',0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,'E'};
  1               static char begin_trans_buff,end_trans_buff;
  1               
  1               static unsigned char receive_buff[RECEIVE_BUF_SIZE];
  1               static char end_rec_buff,begin_rec_buff;
  1               static unsigned char pwm0_byte,ioport1_byte,hso_byte,pulse=0;
  1               static unsigned char timer1_count=0,triggle_out=0,triggle_in=0,emergence_flag=0;
C196  Compiler   wuxicar                                                                    30-May-107 11:11:06  Page   3
                 Assembly Listing of Object Code


  1               extern void enable(void);
  1               
  1               void ext_isr(void)
  1               {
          0000                        ext_isr: 
          0000  F2                           pushf   
  11      1          /* User code goes here */
  111     1          emergence_flag=1;
          0001  B10104             R         ldb     emergence_flag,#1
  112     1       }
          0004  F3                           popf    
          0005  F0                           ret     
                                      
                ; Function Statistics for: ext_isr
                ;    Code Size :    6     Parameter Count:   
                ;    Stack Size:         Parameter Size :   
                ;    OReg Size :         Stack Depth    :   4

  113             
  114             void hsi0_isr(void)
  115             {
          0006                        hsi0_isr: 
          0006  F2                           pushf   
          0007  69020018                     sub     SP,#2
          000B  C800               E         push    ?FRAME01
          000D  A01800             E         ld      ?FRAME01,SP
          0010  C800               R         push    ?OVRBASE
  116     1          /* User code goes here */
  117     1          unsigned char temp_byte;
  118     1          unsigned int temp_word;
  119     1          pulse++;
          0012  1700               R         incb    pulse
  12      1          temp_byte=hsi_status;
          0014  B00000             E         ldb     temp_byte,hsi_status
  121     1          temp_word=hsi_time;
          0017  C3000200           E         st      hsi_time,temp_word[?FRAME01]
  122     1       }
          001B  CC00               R         pop     ?OVRBASE
          001D  CC00               E         pop     ?FRAME01
          001F  65020018                     add     SP,#2
          0023  F3                           popf    
          0024  F0                           ret     
                                      
                ; Function Statistics for: hsi0_isr
                ;    Code Size :   31     Parameter Count:   
                ;    Stack Size:    2     Parameter Size :   
                ;    OReg Size :    1     Stack Depth    :  1

  123             
  124             void tovf_isr(void)
  125             {
          0025                        tovf_isr: 
          0025  F2                           pushf   
          0026  C81C                         push    Tmp0
  126     1        /* User code goes here */
  127     1        ++timer1_count;
C196  Compiler   wuxicar                                                                    30-May-107 11:11:06  Page   4
                 Assembly Listing of Object Code


          0028  1701               R         incb    timer1_count
  128     1        if(timer1_count==3||timer1_count==6||timer1_count==9)
          002A  990301             R         cmpb    timer1_count,#3
          002D  DF0A                         be      @0005
          002F  990601             R         cmpb    timer1_count,#6
          0032  DF05                         be      @0005
          0034  990901             R         cmpb    timer1_count,#9
          0037  D703                         bne     @0004
          0039                        @0005: 
  129     1        {
  13      2         triggle_out=1;
          0039  B10102             R         ldb     triggle_out,#1
          003C                        @0004: 
  131     2        }
  132     1        if(timer1_count==12)
          003C  990C01             R         cmpb    timer1_count,#0CH
          003F  D720                         bne     @0006
  133     1        {
  134     2         triggle_out=1;
          0041  B10102             R         ldb     triggle_out,#1
  135     2         timer1_count=0;
          0044  1101               R         clrb    timer1_count
  136     2         mess[8]=pulse;
          0046  C701080000         R         stb     pulse,mess+8
  137     2         if(emergence_flag==1)
          004B  990104             R         cmpb    emergence_flag,#1
          004E  D70F                         bne     @0007
  138     2         {
  139     3          emergence_flag=0;
          0050  1104               R         clrb    emergence_flag
  14      3          mess[8]|=0x80;
          0052  B30108001C         R         ldb     Tmp0,mess+8
          0057  91801C                       orb     Tmp0,#8
          005A  C70108001C         R         stb     Tmp0,mess+8
          005F                        @0007: 
  141     3         }
  142     2         pulse=0;
          005F  1100               R         clrb    pulse
          0061                        @0006: 
  143     2        }   
  144     1       }
          0061  CC1C                         pop     Tmp0
          0063  F3                           popf    
          0064  F0                           ret     
                                      
                ; Function Statistics for: tovf_isr
                ;    Code Size :   64     Parameter Count:   
                ;    Stack Size:         Parameter Size :   
                ;    OReg Size :         Stack Depth    :   6

  145             
  146             void transmit(void)             /*  serial interrupt routine  */
  147             {
          0065                        transmit: 
  148     1       sp_status_image |= sp_stat;       /*  image sp_stat into
          0065  900002             E         orb     sp_status_image,sp_stat
C196  Compiler   wuxicar                                                                    30-May-107 11:11:06  Page   5
                 Assembly Listing of Object Code


  149     1                                               sp_status_image  */

⌨️ 快捷键说明

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