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

📄 pyzc3.lst

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

  346             
  347             void main(void)
  348             {
          02D9                        main: 
          02D9  69040018                     sub     SP,#4
          02DD  C800               E         push    ?FRAME01
          02DF  A01800             E         ld      ?FRAME01,SP
          02E2  C800               R         push    ?OVRBASE
          02E4  C802               R         push    ?OVRBASE+2
  349     1        unsigned char i,chno=0;
          02E6  1103               R         clrb    chno
  35      1        unsigned int result,ad_result[2];
  351     1        init_serial();
          02E8  2E9C                         call    init_serial
  352     1        init_timer1();
          02EA  2EF0                         call    init_timer1
  353     1        init_pwm0();
          02EC  2F0E                         call    init_pwm0
  354     1        init_hso1_5();
          02EE  2F31                         call    init_hso1_5
  355     1        init_atod_converter();
          02F0  2F8A                         call    init_atod_converter
  356     1        enable();
          02F2  EF0000             E         call    enable
  357     1       /*   The following line will loop until the letter 'Q' is 
  358     1            received.   */
  359     1        putchar('H');
          02F5  C94800                       push    #48H
          02F8  2D32                         call    putchar
          02FA  65020018                     add     SP,#2
  36      1        putchar('e');
          02FE  C96500                       push    #65H
          0301  2D29                         call    putchar
          0303  65020018                     add     SP,#2
  361     1        putchar('l');
          0307  C96C00                       push    #6CH
          030A  2D20                         call    putchar
C196  Compiler   pyzc3                                                                      14-Dec-106 09:06:41  Page  15
                 Assembly Listing of Object Code


          030C  65020018                     add     SP,#2
  362     1        putchar('l');
          0310  C96C00                       push    #6CH
          0313  2D17                         call    putchar
          0315  65020018                     add     SP,#2
  363     1        putchar('o');
          0319  C96F00                       push    #6FH
          031C  2D0E                         call    putchar
          031E  65020018                     add     SP,#2
          0322  20AE                         br      @0051
          0324                        @005: 
  364     1        //while(getchar() != 'Q')
  365     1        while(1)
  366     1        {
  367     2         //result = convert_atod(0x00);
  368     2         result = convert_atod(chno);
          0324  AC031C             R         ldbze   Tmp0,chno
          0327  C81C                         push    Tmp0
          0329  2F74                         call    convert_atod
          032B  65020018                     add     SP,#2
          032F  A01C00             R         ld      result,Tmp0
  369     2         ad_result[chno]=result;
          0332  AC031E             R         ldbze   Tmp2,chno
          0335  641E1E                       add     Tmp2,Tmp2
          0338  64001E             E         add     Tmp2,?FRAME01
          033B  C31E021C                     st      Tmp0,ad_result[Tmp2]
  37      2         if(++chno==2) chno=0;
          033F  1703               R         incb    chno
          0341  990203             R         cmpb    chno,#2
          0344  D702                         bne     @0053
          0346  1103               R         clrb    chno
          0348                        @0053: 
  371     2         if(triggle_out==1)
          0348  990101             R         cmpb    triggle_out,#1
          034B  D754                         bne     @0054
  372     2         {
  373     3           triggle_out=0;
          034D  1101               R         clrb    triggle_out
  374     3           wsr=0;
          034F  1100               E         clrb    wsr
  375     3           wsr = 0x0;
          0351  1100               E         clrb    wsr
  376     3           mess[1]=ad_result[0]>>8;
          0353  B300031C           E         ldb     Tmp0,ad_result+1[?FRAME01]
          0357  C70101001C         R         stb     Tmp0,mess+1
  377     3           mess[2]=ad_result[0];
          035C  B300021C           E         ldb     Tmp0,ad_result[?FRAME01]
          0360  C70102001C         R         stb     Tmp0,mess+2
  378     3           mess[3]=ad_result[1]>>8;
          0365  B300051C           E         ldb     Tmp0,ad_result+3[?FRAME01]
          0369  C70103001C         R         stb     Tmp0,mess+3
  379     3           mess[4]=ad_result[1];
          036E  B300041C           E         ldb     Tmp0,ad_result+2[?FRAME01]
          0372  C70104001C         R         stb     Tmp0,mess+4
  38      3           mess[5]= hsi_status;
          0377  C701050000         E         stb     hsi_status,mess+5
C196  Compiler   pyzc3                                                                      14-Dec-106 09:06:41  Page  16
                 Assembly Listing of Object Code


  381     3           mess[6]=ioport0;
          037C  C701060000         E         stb     ioport0,mess+6
  382     3           mess[7]=ioport2;
          0381  C701070000         E         stb     ioport2,mess+7
  383     3           for(i=0;i<10;i++) putchar(mess[i]);
          0386  1102               R         clrb    i
          0388  2012                         br      @0057
          038A                        @0055: 
          038A  AC021C             R         ldbze   Tmp0,i
          038D  AF1D00001C         R         ldbze   Tmp0,mess[Tmp0]
          0392  C81C                         push    Tmp0
          0394  2C96                         call    putchar
          0396  65020018                     add     SP,#2
          039A  1702               R         incb    i
          039C                        @0057: 
          039C  990A02             R         cmpb    i,#0AH
          039F  D3E9                         bnc     @0055
          03A1                        @0054: 
  384     3         }  
  385     2         if(triggle_in==1)
          03A1  990102             R         cmpb    triggle_in,#1
          03A4  D72C                         bne     @0059
  386     2         {
  387     3          triggle_in=0;
          03A6  1102               R         clrb    triggle_in
  388     3          pwm0_control=pwm0_byte; //receive_buff[(end_rec_buff+RECEIVE_BUF_SIZE-4)%RECEIVE_BUF_SIZE];
          03A8  B00700             E         ldb     pwm_control,pwm0_byte
  389     3          ioport1=ioport1_byte; //receive_buff[(end_rec_buff+RECEIVE_BUF_SIZE-3)%RECEIVE_BUF_SIZE];
          03AB  B00800             E         ldb     ioport1,ioport1_byte
  39      3          for(i=0;i<5;i++)
          03AE  1102               R         clrb    i
          03B0  201B                         br      @005C
          03B2                        @005A: 
  391     3          {
  392     4           hso_command=((hso_byte & (1<<i))>>i)*0x20+i;
          03B2  AD011C                       ldbze   Tmp0,#1
          03B5  09021C             R         shl     Tmp0,i
          03B8  AC091E             R         ldbze   Tmp2,hso_byte
          03BB  601E1C                       and     Tmp0,Tmp2
          03BE  0A021C             R         shra    Tmp0,i
          03C1  19051C                       shlb    Tmp0,#5
          03C4  541C0200           E         addb    hso_command,i,Tmp0
  393     4           hso_time=20;
          03C8  AD1400             E         ldbze   hso_time,#14H
          03CB  1702               R         incb    i
          03CD                        @005C: 
          03CD  990502             R         cmpb    i,#5
          03D0  D3E0                         bnc     @005A
          03D2                        @0059: 
  394     4          }
  395     3         }    
  396     2        }
          03D2                        @0051: 
          03D2  2750                         br      @005
  397     1       /*   Example of sending out buffered data.    */
  398     1        //while(1);  
C196  Compiler   pyzc3                                                                      14-Dec-106 09:06:41  Page  17
                 Assembly Listing of Object Code


  399     1       }
          03D4  CC02               R         pop     ?OVRBASE+2
          03D6  CC00               R         pop     ?OVRBASE
          03D8  CC00               E         pop     ?FRAME01
          03DA  65040018                     add     SP,#4
          03DE  F0                           ret     
                                      
                ; Function Statistics for: main
                ;    Code Size :  262     Parameter Count:   
                ;    Stack Size:    4     Parameter Size :   
                ;    OReg Size :    4     Stack Depth    :  16

                                             end
  4               
  4                 
  4               
C196  Compiler   pyzc3                                                                      14-Dec-106 09:06:41  Page  18
                                   Symbol Table


  Name            Size    Class    Address    Attributes

  ad_command      1       Extern               register volatile unsigned char
  ad_result       2       Extern               register volatile unsigned short
  ad_result       4       Auto     2           array[2] of unsigned int in function(main)
  baud_rate       1       Extern               register volatile unsigned char
  begin_rec_buff  1       Static   6           register signed char
  begin_trans_buff
                  1       Static   3           register signed char
  c               2       Auto     4           int in function(putchar)
  c               1       Auto                 overlayable register unsigned char in function(receive)
  ccr             2       Public   8216        located const unsigned int
  channel         1       Auto                 overlayable register unsigned char in function(convert_atod)
  chno            1       Auto     3           initialized overlayable register unsigned char in function(main)
  convert_atod            Public               reentrant VPL function returning unsigned int
  enable                  Extern               VPL function returning void
  end_rec_buff    1       Static   5           register signed char
  end_trans_buff  1       Static   4           register signed char
  getchar                 Public               reentrant VPL function returning unsigned char
  hsi_status      1       Extern               register volatile unsigned char
  hso_byte        1       Static   9           register unsigned char
  hso_command     1       Extern               register volatile unsigned char
  hso_time        2       Extern               register volatile unsigned short
  i               1       Auto     2           overlayable register unsigned char in function(main)
  imask1          1       Extern               register volatile unsigned char
  init_atod_converter
                          Public               reentrant VPL function returning void
  init_hso1_5             Public               reentrant VPL function returning void
  init_pwm0               Public               reentrant VPL function returning void
  init_serial             Public               reentrant VPL function returning void
  init_timer1             Public               reentrant VPL function returning void
  int_mask        1       Extern               register volatile unsigned char
  int_pending     1       Extern               register volatile unsigned char
  ioc1            1       Extern               register volatile unsigned char
  ioc2            1       Extern               register volatile unsigned char
  ioport0         1       Extern               register volatile unsigned char
  ioport1         1       Extern               register volatile unsigned char
  ioport1_byte    1       Static   8           register unsigned char
  ioport2         1       Extern               register volatile unsigned char
  main                    Public               reentrant VPL function returning void
  mess            1       Static               initialized array[1] of unsigned char
  putchar                 Public               reentrant VPL function returning int
  pwm0_byte       1       Static   7           register unsigned char
  pwm_control     1       Extern               register volatile unsigned char
  r0              2       Extern               register volatile unsigned short
  receive                 Public               reentrant VPL function returning void
  receive_buff    2       Static   2           array[2] of unsigned char
  result          2       Auto                 overlayable register unsigned int in function(main)
  sbuf            1       Extern               register volatile unsigned char
  serial_isr              Public               interrupt function returning void
  sp_con          1       Extern               register volatile unsigned char
  sp_stat         1       Extern               register volatile unsigned char
  sp_status_image 1       Static   2           register unsigned char
  timer1_count    1       Static               initialized register unsigned char
  tmpreg          2       Public               register unsigned int
  tovf_isr                Public               interrupt function returning void
C196  Compiler   pyzc3                                                                      14-Dec-106 09:06:41  Page  19
                                   Symbol Table


  trans_buff      2       Static               array[2] of unsigned char
  transmit                Public               reentrant VPL function returning void
  triggle_in      1       Static   2           initialized register unsigned char
  triggle_out     1       Static   1           initialized register unsigned char
  wsr             1       Extern               register volatile unsigned char



Module Information:

     Code Area Size             =   03DFH       991D
     Constant Area Size         =   0002H         2D
     Data Area Size             =   0032H        50D
     Static Regs Area Size      =   000DH        13D
     Overlayable Regs Area Size =   0004H         4D
     Initial Data-Size          =   000DH        13D
     Maximum Stack Size         =   0018H        24D

C196 Compilation Complete.      0 Warnings,     0 Errors

⌨️ 快捷键说明

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