C51 COMPILER V7.07   AT89S51PRO                                                            10/28/2003 18:27:18 PAGE 1   


C51 COMPILER V7.07, COMPILATION OF MODULE AT89S51PRO
OBJECT MODULE PLACED IN AT89S51PRO.OBJ
COMPILER INVOKED BY: f:\winsoft\Keil\C51\BIN\C51.EXE AT89S51PRO.C WARNINGLEVEL(1) OPTIMIZE(5,SIZE) REGFILE(.\E51Pro.ORC)
                    - BROWSE INCDIR(G:\MCU工程\E51Pro\) DEBUG OBJECTEXTEND CODE

stmt level    source

   1          ///////////////////////////////////////////////////////////////////////////////////////////////////
   2          //FID=02:AT89S51系列编程器
   3          //实现编程的读，写，擦等细节
   4          //特殊处:采用ISP编程方式，只需对P1.5,P1.6,P1.7,RST引脚控制；用MOSI串行发送命令的同时用MISO接收相关数据
   5          //SCK输出同步时钟脉冲
   6          ///////////////////////////////////////////////////////////////////////////////////////////////////
   7          
   8          #include <e51pro.h>
   9          
  10          #define MOSI    P1_5
  11          #define MISO    P1_6
  12          #define SCK             P1_7    
  13          
  14          BYTE OutBuf[4];//发送命令缓冲
  15          BYTE InBuf[4];//接收缓冲
  16          
  17          void SendInstrc(BYTE nByte)//用MOSI串行发送命令的同时用MISO接收相关数据
  18          {
  19   1              BYTE n;
  20   1              for(n=0;n<nByte;n++)//发送nByte个字节
  21   1              {
  22   2                      ACC=OutBuf[n];
  23   2                      SCK=0;
  24   2                      MOSI=A_7;//低电平时输出一位
  25   2                      SCK=1;
  26   2                      B_7=MISO;//高电平时接收一位
  27   2                      SCK=0;
  28   2                      MOSI=A_6;
  29   2                      SCK=1;
  30   2                      B_6=MISO;
  31   2                      SCK=0;
  32   2                      MOSI=A_5;
  33   2                      SCK=1;
  34   2                      B_5=MISO;
  35   2                      SCK=0;
  36   2                      MOSI=A_4;
  37   2                      SCK=1;
  38   2                      B_4=MISO;
  39   2                      SCK=0;
  40   2                      MOSI=A_3;
  41   2                      SCK=1;
  42   2                      B_3=MISO;
  43   2                      SCK=0;
  44   2                      MOSI=A_2;
  45   2                      SCK=1;
  46   2                      B_2=MISO;
  47   2                      SCK=0;
  48   2                      MOSI=A_1;
  49   2                      SCK=1;
  50   2                      B_1=MISO;
  51   2                      SCK=0;
  52   2                      MOSI=A_0;
  53   2                      SCK=1;
  54   2                      B_0=MISO;
C51 COMPILER V7.07   AT89S51PRO                                                            10/28/2003 18:27:18 PAGE 2   

  55   2                      SCK=0;
  56   2                      InBuf[n]=B;
  57   2              }
  58   1      }
  59          
  60          void InitPro02()//编程前的准备工作
  61          {
  62   1              SetVpp5V();
  63   1              P3_5=0;//p3.5接RST
  64   1              P3_2=1;//p3.2接PROG
  65   1              P0=0xff;
  66   1              P1=0xff;
  67   1              P2=0xff;
  68   1              Delay_ms(10);
  69   1              MOSI=0;
  70   1              MISO=1;
  71   1              SCK=1;
  72   1              P3_5=1;
  73   1              Delay_ms(10);
  74   1              nAddress=0x0000;
  75   1              OutBuf[0]=0xac;//正好在这里可以安排DataSheet上所规定的
  76   1              OutBuf[1]=0x53;//Eanable Programming命令
  77   1              OutBuf[2]=0;
  78   1              OutBuf[3]=0;
  79   1              SendInstrc(4);
  80   1      }
  81          
  82          void ProOver02()//编程结束后的工作，设置合适的引脚电平
  83          {
  84   1              SetVpp5V();
  85   1              P0=0xff;
  86   1              P1=0xff;
  87   1              P2=0xff;
  88   1              P3_6=1;
  89   1              P3_7=1;
  90   1              P3_5=0;//RST=0;
  91   1              P3_2=2;//PROG=0
  92   1      }
  93          
  94          BYTE Read02()
  95          {
  96   1              OutBuf[0]=0x20;
  97   1              OutBuf[1]=((BYTE*)&nAddress)[0];
  98   1              OutBuf[2]=((BYTE*)&nAddress)[1];
  99   1              SendInstrc(4);
 100   1              return InBuf[3];
 101   1      }
 102          
 103          void ReadSign02()//读特征字
 104          {
 105   1              InitPro02();//先设置成编程状态
 106   1      //-----------------------------------------------------------------------------
 107   1              //根据器件的DataSheet，设置相应的编程控制信号
 108   1              OutBuf[0]=0x28;
 109   1              OutBuf[1]=0x00;
 110   1              OutBuf[2]=0x00;
 111   1              OutBuf[3]=0x00;
 112   1              SendInstrc(4);
 113   1              ComBuf[2]=InBuf[3];
 114   1              OutBuf[1]=0x01;
 115   1              SendInstrc(4);
 116   1              ComBuf[3]=InBuf[3];
C51 COMPILER V7.07   AT89S51PRO                                                            10/28/2003 18:27:18 PAGE 3   

 117   1              OutBuf[1]=0x02;
 118   1              SendInstrc(4);
 119   1              ComBuf[4]=InBuf[3];
 120   1      //-----------------------------------------------------------------------------
 121   1              ProOver02();
 122   1      }
 123          
 124          void Erase02()//擦除器件
 125          {
 126   1              InitPro02();
 127   1      //-----------------------------------------------------------------------------
 128   1              //根据器件的DataSheet，设置相应的编程控制信号
 129   1              OutBuf[0]=0xac;
 130   1              OutBuf[1]=0x80;
 131   1              SendInstrc(4);
 132   1              Delay_ms(500);  
 133   1      //-----------------------------------------------------------------------------
 134   1              ProOver02();
 135   1      }
 136          
 137          BOOL Write02(BYTE Data)//写器件
 138          {
 139   1      
 140   1      //-----------------------------------------------------------------------------
 141   1              //根据器件的DataSheet，设置相应的编程控制信号
 142   1              //写一个单元
 143   1              OutBuf[0]=0x40;
 144   1              OutBuf[1]=((BYTE*)&nAddress)[0];
 145   1              OutBuf[2]=((BYTE*)&nAddress)[1];
 146   1              OutBuf[3]=Data;
 147   1              SendInstrc(4);
 148   1              nTimeOut=0;
 149   1              while(Read02()!=Data)//效验:循环读，直到读出与写入的数相同
 150   1              {
 151   2                      nTimeOut++;
 152   2                      if(nTimeOut>1000)//超时了
 153   2                      {
 154   3                              return  0;
 155   3                      }
 156   2                                      
 157   2              }
 158   1      //-----------------------------------------------------------------------------
 159   1              return 1;
 160   1      }
 161          
 162          void Lock02()//写锁定位
 163          {
 164   1      //-----------------------------------------------------------------------------
 165   1              //根据器件的DataSheet，设置相应的编程控制信号
 166   1              if(ComBuf[2]>=1)//ComBuf[2]为锁定位
 167   1              {
 168   2                      InitPro02();
 169   2                      OutBuf[0]=0xac;
 170   2                      OutBuf[1]=0xe1;
 171   2                      SendInstrc(4);
 172   2                      Delay_ms(1);
 173   2              }
 174   1              if(ComBuf[2]>=2)
 175   1              {
 176   2                      InitPro02();
 177   2                      OutBuf[0]=0xac;
 178   2                      OutBuf[1]=0xe2;
C51 COMPILER V7.07   AT89S51PRO                                                            10/28/2003 18:27:18 PAGE 4   

 179   2                      SendInstrc(4);
 180   2                      Delay_ms(1);
 181   2              }
 182   1              if(ComBuf[2]==3)
 183   1              {
 184   2                      InitPro02();
 185   2                      OutBuf[0]=0xac;
 186   2                      OutBuf[1]=0xe3;
 187   2                      SendInstrc(4);
 188   2                      Delay_ms(1);
 189   2              }
 190   1      //-----------------------------------------------------------------------------
 191   1              ProOver02();
 192   1      }
 193          
 194          void PreparePro02()//设置pw中的函数指针，让主程序可以调用上面的函数
 195          {
 196   1              pw.fpInitPro=InitPro02;
 197   1              pw.fpReadSign=ReadSign02;
 198   1              pw.fpErase=Erase02;
 199   1              pw.fpWrite=Write02;
 200   1              pw.fpRead=Read02;
 201   1              pw.fpLock=Lock02;
 202   1              pw.fpProOver=ProOver02;
 203   1      }
C51 COMPILER V7.07   AT89S51PRO                                                            10/28/2003 18:27:18 PAGE 5   

ASSEMBLY LISTING OF GENERATED OBJECT CODE


             ; FUNCTION _SendInstrc (BEGIN)
                                           ; SOURCE LINE # 17
;---- Variable 'nByte' assigned to Register 'R7' ----
                                           ; SOURCE LINE # 18
                                           ; SOURCE LINE # 20
;---- Variable 'n' assigned to Register 'R6' ----
0000 E4                CLR     A
0001 FE                MOV     R6,A
0002         ?C0001:
0002 EE                MOV     A,R6
0003 C3                CLR     C
0004 9F                SUBB    A,R7
0005 5070              JNC     ?C0004
                                           ; SOURCE LINE # 21
                                           ; SOURCE LINE # 22
0007 7400        R     MOV     A,#LOW OutBuf
0009 2E                ADD     A,R6
000A F8                MOV     R0,A
000B E6                MOV     A,@R0
                                           ; SOURCE LINE # 23
000C C297              CLR     P1_7
                                           ; SOURCE LINE # 24
000E A2E7              MOV     C,A_7
0010 9295              MOV     P1_5,C
                                           ; SOURCE LINE # 25
0012 D297              SETB    P1_7
                                           ; SOURCE LINE # 26
0014 A296              MOV     C,P1_6
0016 92F7              MOV     B_7,C
                                           ; SOURCE LINE # 27
0018 C297              CLR     P1_7
                                           ; SOURCE LINE # 28
001A A2E6              MOV     C,A_6
001C 9295              MOV     P1_5,C
                                           ; SOURCE LINE # 29
001E D297              SETB    P1_7
                                           ; SOURCE LINE # 30
0020 A296              MOV     C,P1_6
0022 92F6              MOV     B_6,C
                                           ; SOURCE LINE # 31
0024 C297              CLR     P1_7
                                           ; SOURCE LINE # 32
0026 A2E5              MOV     C,A_5
0028 9295              MOV     P1_5,C
                                           ; SOURCE LINE # 33
002A D297              SETB    P1_7
                                           ; SOURCE LINE # 34
002C A296              MOV     C,P1_6
002E 92F5              MOV     B_5,C
                                           ; SOURCE LINE # 35
0030 C297              CLR     P1_7
                                           ; SOURCE LINE # 36
0032 A2E4              MOV     C,A_4
0034 9295              MOV     P1_5,C
                                           ; SOURCE LINE # 37
0036 D297              SETB    P1_7
                                           ; SOURCE LINE # 38
0038 A296              MOV     C,P1_6
003A 92F4              MOV     B_4,C
C51 COMPILER V7.07   AT89S51PRO                                                            10/28/2003 18:27:18 PAGE 6   

                                           ; SOURCE LINE # 39
003C C297              CLR     P1_7
                                           ; SOURCE LINE # 40
003E A2E3              MOV     C,A_3
0040 9295              MOV     P1_5,C
                                           ; SOURCE LINE # 41
0042 D297              SETB    P1_7
                                           ; SOURCE LINE # 42
0044 A296              MOV     C,P1_6
0046 92F3              MOV     B_3,C
                                           ; SOURCE LINE # 43
0048 C297              CLR     P1_7
                                           ; SOURCE LINE # 44
004A A2E2              MOV     C,A_2
004C 9295              MOV     P1_5,C
                                           ; SOURCE LINE # 45
004E D297              SETB    P1_7
                                           ; SOURCE LINE # 46
0050 A296              MOV     C,P1_6
0052 92F2              MOV     B_2,C
                                           ; SOURCE LINE # 47
0054 C297              CLR     P1_7
                                           ; SOURCE LINE # 48
0056 A2E1              MOV     C,A_1
0058 9295              MOV     P1_5,C
                                           ; SOURCE LINE # 49
005A D297              SETB    P1_7
                                           ; SOURCE LINE # 50
005C A296              MOV     C,P1_6
005E 92F1              MOV     B_1,C
                                           ; SOURCE LINE # 51
0060 C297              CLR     P1_7
                                           ; SOURCE LINE # 52
0062 A2E0              MOV     C,A_0
0064 9295              MOV     P1_5,C
                                           ; SOURCE LINE # 53
0066 D297              SETB    P1_7
                                           ; SOURCE LINE # 54
0068 A296              MOV     C,P1_6
006A 92F0              MOV     B_0,C
                                           ; SOURCE LINE # 55
006C C297              CLR     P1_7
                                           ; SOURCE LINE # 56
006E 7400        R     MOV     A,#LOW InBuf
0070 2E                ADD     A,R6
0071 F8                MOV     R0,A
0072 A6F0              MOV     @R0,B
                                           ; SOURCE LINE # 57
0074 0E                INC     R6
0075 808B              SJMP    ?C0001
                                           ; SOURCE LINE # 58
0077         ?C0004:
0077 22                RET     
             ; FUNCTION _SendInstrc (END)

             ; FUNCTION InitPro02 (BEGIN)
                                           ; SOURCE LINE # 60
                                           ; SOURCE LINE # 61
                                           ; SOURCE LINE # 62
0000 120000      E     LCALL   SetVpp5V
                                           ; SOURCE LINE # 63
0003 C2B5              CLR     P3_5
C51 COMPILER V7.07   AT89S51PRO                                                            10/28/2003 18:27:18 PAGE 7   

                                           ; SOURCE LINE # 64
0005 D2B2              SETB    P3_2
                                           ; SOURCE LINE # 65
0007 7580FF            MOV     P0,#0FFH
                                           ; SOURCE LINE # 66
000A 7590FF            MOV     P1,#0FFH
                                           ; SOURCE LINE # 67
000D 75A0FF            MOV     P2,#0FFH
                                           ; SOURCE LINE # 68
0010 7F0A              MOV     R7,#0AH
0012 7E00              MOV     R6,#00H
0014 120000      E     LCALL   _Delay_ms
                                           ; SOURCE LINE # 69
0017 C295              CLR     P1_5
                                           ; SOURCE LINE # 70
0019 D296              SETB    P1_6
                                           ; SOURCE LINE # 71
001B D297              SETB    P1_7
                                           ; SOURCE LINE # 72
001D D2B5              SETB    P3_5
                                           ; SOURCE LINE # 73
001F 120000      E     LCALL   _Delay_ms
                                           ; SOURCE LINE # 74
0022 E4                CLR     A
0023 F500        E     MOV     nAddress,A
0025 F500        E     MOV     nAddress+01H,A
                                           ; SOURCE LINE # 75
0027 7500AC      R     MOV     OutBuf,#0ACH
                                           ; SOURCE LINE # 76
002A 750053      R     MOV     OutBuf+01H,#053H
                                           ; SOURCE LINE # 77
002D F500        R     MOV     OutBuf+02H,A
                                           ; SOURCE LINE # 78
002F F500        R     MOV     OutBuf+03H,A
                                           ; SOURCE LINE # 79
0031 7F04              MOV     R7,#04H
0033 120000      R     LCALL   _SendInstrc
                                           ; SOURCE LINE # 80
0036 22                RET     
             ; FUNCTION InitPro02 (END)

             ; FUNCTION ProOver02 (BEGIN)
                                           ; SOURCE LINE # 82
                                           ; SOURCE LINE # 83
                                           ; SOURCE LINE # 84
0000 120000      E     LCALL   SetVpp5V
                                           ; SOURCE LINE # 85
0003 7580FF            MOV     P0,#0FFH
                                           ; SOURCE LINE # 86
0006 7590FF            MOV     P1,#0FFH
                                           ; SOURCE LINE # 87
0009 75A0FF            MOV     P2,#0FFH
                                           ; SOURCE LINE # 88
000C D2B6              SETB    P3_6
                                           ; SOURCE LINE # 89
000E D2B7              SETB    P3_7
                                           ; SOURCE LINE # 90
0010 C2B5              CLR     P3_5
                                           ; SOURCE LINE # 91
0012 D2B2              SETB    P3_2
                                           ; SOURCE LINE # 92
0014 22                RET     
C51 COMPILER V7.07   AT89S51PRO                                                            10/28/2003 18:27:18 PAGE 8   

             ; FUNCTION ProOver02 (END)

             ; FUNCTION Read02 (BEGIN)
                                           ; SOURCE LINE # 94
                                           ; SOURCE LINE # 95
                                           ; SOURCE LINE # 96
0000 750020      R     MOV     OutBuf,#020H
                                           ; SOURCE LINE # 97
0003 850000      R     MOV     OutBuf+01H,nAddress
                                           ; SOURCE LINE # 98
0006 850000      R     MOV     OutBuf+02H,nAddress+01H
                                           ; SOURCE LINE # 99
0009 7F04              MOV     R7,#04H
000B 120000      R     LCALL   _SendInstrc
                                           ; SOURCE LINE # 100
000E AF00        R     MOV     R7,InBuf+03H
                                           ; SOURCE LINE # 101
0010         ?C0007:
0010 22                RET     
             ; FUNCTION Read02 (END)

             ; FUNCTION ReadSign02 (BEGIN)
                                           ; SOURCE LINE # 103
                                           ; SOURCE LINE # 104
                                           ; SOURCE LINE # 105
0000 120000      R     LCALL   InitPro02
                                           ; SOURCE LINE # 108
0003 750028      R     MOV     OutBuf,#028H
                                           ; SOURCE LINE # 109
0006 E4                CLR     A
0007 F500        R     MOV     OutBuf+01H,A
                                           ; SOURCE LINE # 110
0009 F500        R     MOV     OutBuf+02H,A
                                           ; SOURCE LINE # 111
000B F500        R     MOV     OutBuf+03H,A
                                           ; SOURCE LINE # 112
000D 7F04              MOV     R7,#04H
000F 120000      R     LCALL   _SendInstrc
                                           ; SOURCE LINE # 113
0012 850000      E     MOV     ComBuf+02H,InBuf+03H
                                           ; SOURCE LINE # 114
0015 750001      R     MOV     OutBuf+01H,#01H
                                           ; SOURCE LINE # 115
0018 120000      R     LCALL   _SendInstrc
                                           ; SOURCE LINE # 116
001B 850000      E     MOV     ComBuf+03H,InBuf+03H
                                           ; SOURCE LINE # 117
001E 750002      R     MOV     OutBuf+01H,#02H
                                           ; SOURCE LINE # 118
0021 120000      R     LCALL   _SendInstrc
                                           ; SOURCE LINE # 119
0024 850000      E     MOV     ComBuf+04H,InBuf+03H
                                           ; SOURCE LINE # 121
0027 120000      R     LCALL   ProOver02
                                           ; SOURCE LINE # 122
002A 22                RET     
             ; FUNCTION ReadSign02 (END)

             ; FUNCTION Erase02 (BEGIN)
                                           ; SOURCE LINE # 124
                                           ; SOURCE LINE # 125
                                           ; SOURCE LINE # 126
C51 COMPILER V7.07   AT89S51PRO                                                            10/28/2003 18:27:18 PAGE 9   

0000 120000      R     LCALL   InitPro02
                                           ; SOURCE LINE # 129
0003 7500AC      R     MOV     OutBuf,#0ACH
                                           ; SOURCE LINE # 130
0006 750080      R     MOV     OutBuf+01H,#080H
                                           ; SOURCE LINE # 131
0009 7F04              MOV     R7,#04H
000B 120000      R     LCALL   _SendInstrc
                                           ; SOURCE LINE # 132
000E 7FF4              MOV     R7,#0F4H
0010 7E01              MOV     R6,#01H
0012 120000      E     LCALL   _Delay_ms
                                           ; SOURCE LINE # 134
0015 120000      R     LCALL   ProOver02
                                           ; SOURCE LINE # 135
0018 22                RET     
             ; FUNCTION Erase02 (END)

             ; FUNCTION _Write02 (BEGIN)
                                           ; SOURCE LINE # 137
;---- Variable 'Data' assigned to Register 'R5' ----
0000 AD07              MOV     R5,AR7
                                           ; SOURCE LINE # 138
                                           ; SOURCE LINE # 143
0002 750040      R     MOV     OutBuf,#040H
                                           ; SOURCE LINE # 144
0005 850000      R     MOV     OutBuf+01H,nAddress
                                           ; SOURCE LINE # 145
0008 850000      R     MOV     OutBuf+02H,nAddress+01H
                                           ; SOURCE LINE # 146
000B 8D00        R     MOV     OutBuf+03H,R5
                                           ; SOURCE LINE # 147
000D 7F04              MOV     R7,#04H
000F 120000      R     LCALL   _SendInstrc
                                           ; SOURCE LINE # 148
0012 E4                CLR     A
0013 F500        E     MOV     nTimeOut,A
0015 F500        E     MOV     nTimeOut+01H,A
0017         ?C0010:
                                           ; SOURCE LINE # 149
0017 120000      R     LCALL   Read02
001A EF                MOV     A,R7
001B 6D                XRL     A,R5
001C 6012              JZ      ?C0011
                                           ; SOURCE LINE # 150
                                           ; SOURCE LINE # 151
001E 0500        E     INC     nTimeOut+01H
0020 E500        E     MOV     A,nTimeOut+01H
0022 7002              JNZ     ?C0019
0024 0500        E     INC     nTimeOut
0026         ?C0019:
                                           ; SOURCE LINE # 152
0026 D3                SETB    C
0027 94E8              SUBB    A,#0E8H
0029 E500        E     MOV     A,nTimeOut
002B 9403              SUBB    A,#03H
002D 40E8              JC      ?C0010
                                           ; SOURCE LINE # 153
                                           ; SOURCE LINE # 154
002F 22                RET     
                                           ; SOURCE LINE # 155
                                           ; SOURCE LINE # 157
C51 COMPILER V7.07   AT89S51PRO                                                            10/28/2003 18:27:18 PAGE 10  

0030         ?C0011:
                                           ; SOURCE LINE # 159
0030 D3                SETB    C
                                           ; SOURCE LINE # 160
0031         ?C0013:
0031 22                RET     
             ; FUNCTION _Write02 (END)

             ; FUNCTION Lock02 (BEGIN)
                                           ; SOURCE LINE # 162
                                           ; SOURCE LINE # 163
                                           ; SOURCE LINE # 166
0000 E500        E     MOV     A,ComBuf+02H
0002 C3                CLR     C
0003 9401              SUBB    A,#01H
0005 4015              JC      ?C0014
                                           ; SOURCE LINE # 167
                                           ; SOURCE LINE # 168
0007 120000      R     LCALL   InitPro02
                                           ; SOURCE LINE # 169
000A 7500AC      R     MOV     OutBuf,#0ACH
                                           ; SOURCE LINE # 170
000D 7500E1      R     MOV     OutBuf+01H,#0E1H
                                           ; SOURCE LINE # 171
0010 7F04              MOV     R7,#04H
0012 120000      R     LCALL   _SendInstrc
                                           ; SOURCE LINE # 172
0015 7F01              MOV     R7,#01H
0017 7E00              MOV     R6,#00H
0019 120000      E     LCALL   _Delay_ms
                                           ; SOURCE LINE # 173
001C         ?C0014:
                                           ; SOURCE LINE # 174
001C E500        E     MOV     A,ComBuf+02H
001E C3                CLR     C
001F 9402              SUBB    A,#02H
0021 4015              JC      ?C0015
                                           ; SOURCE LINE # 175
                                           ; SOURCE LINE # 176
0023 120000      R     LCALL   InitPro02
                                           ; SOURCE LINE # 177
0026 7500AC      R     MOV     OutBuf,#0ACH
                                           ; SOURCE LINE # 178
0029 7500E2      R     MOV     OutBuf+01H,#0E2H
                                           ; SOURCE LINE # 179
002C 7F04              MOV     R7,#04H
002E 120000      R     LCALL   _SendInstrc
                                           ; SOURCE LINE # 180
0031 7F01              MOV     R7,#01H
0033 7E00              MOV     R6,#00H
0035 120000      E     LCALL   _Delay_ms
                                           ; SOURCE LINE # 181
0038         ?C0015:
                                           ; SOURCE LINE # 182
0038 E500        E     MOV     A,ComBuf+02H
003A B40315            CJNE    A,#03H,?C0016
                                           ; SOURCE LINE # 183
                                           ; SOURCE LINE # 184
003D 120000      R     LCALL   InitPro02
                                           ; SOURCE LINE # 185
0040 7500AC      R     MOV     OutBuf,#0ACH
                                           ; SOURCE LINE # 186
C51 COMPILER V7.07   AT89S51PRO                                                            10/28/2003 18:27:18 PAGE 11  

0043 7500E3      R     MOV     OutBuf+01H,#0E3H
                                           ; SOURCE LINE # 187
0046 7F04              MOV     R7,#04H
0048 120000      R     LCALL   _SendInstrc
                                           ; SOURCE LINE # 188
004B 7F01              MOV     R7,#01H
004D 7E00              MOV     R6,#00H
004F 120000      E     LCALL   _Delay_ms
                                           ; SOURCE LINE # 189
0052         ?C0016:
                                           ; SOURCE LINE # 191
0052 120000      R     LCALL   ProOver02
                                           ; SOURCE LINE # 192
0055 22                RET     
             ; FUNCTION Lock02 (END)

             ; FUNCTION PreparePro02 (BEGIN)
                                           ; SOURCE LINE # 194
                                           ; SOURCE LINE # 195
                                           ; SOURCE LINE # 196
0000 7500FF      E     MOV     pw,#0FFH
0003 750000      R     MOV     pw+01H,#HIGH InitPro02
0006 750000      R     MOV     pw+02H,#LOW InitPro02
                                           ; SOURCE LINE # 197
0009 7500FF      E     MOV     pw+03H,#0FFH
000C 750000      R     MOV     pw+04H,#HIGH ReadSign02
000F 750000      R     MOV     pw+05H,#LOW ReadSign02
                                           ; SOURCE LINE # 198
0012 7500FF      E     MOV     pw+06H,#0FFH
0015 750000      R     MOV     pw+07H,#HIGH Erase02
0018 750000      R     MOV     pw+08H,#LOW Erase02
                                           ; SOURCE LINE # 199
001B 7500FF      E     MOV     pw+09H,#0FFH
001E 750000      R     MOV     pw+0AH,#HIGH _Write02
0021 750000      R     MOV     pw+0BH,#LOW _Write02
                                           ; SOURCE LINE # 200
0024 7500FF      E     MOV     pw+0CH,#0FFH
0027 750000      R     MOV     pw+0DH,#HIGH Read02
002A 750000      R     MOV     pw+0EH,#LOW Read02
                                           ; SOURCE LINE # 201
002D 7500FF      E     MOV     pw+0FH,#0FFH
0030 750000      R     MOV     pw+010H,#HIGH Lock02
0033 750000      R     MOV     pw+011H,#LOW Lock02
                                           ; SOURCE LINE # 202
0036 7500FF      E     MOV     pw+012H,#0FFH
0039 750000      R     MOV     pw+013H,#HIGH ProOver02
003C 750000      R     MOV     pw+014H,#LOW ProOver02
                                           ; SOURCE LINE # 203
003F 22                RET     
             ; FUNCTION PreparePro02 (END)



MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =    481    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =      8    ----
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----    ----
END OF MODULE INFORMATION.

C51 COMPILER V7.07   AT89S51PRO                                                            10/28/2003 18:27:18 PAGE 12  


C51 COMPILATION COMPLETE.  0 WARNING(S),  0 ERROR(S)
