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

📄 flash.lst

📁 输出视频的字符的软件
💻 LST
📖 第 1 页 / 共 3 页
字号:
 200   4                                      mm=0x0aaa;
 201   4                          *mm=0xaa;  //step 1
 202   4                                      mm=0x0555;
 203   4                          *mm=0x55;  //step 2
 204   4                                      mm=0x0aaa;
 205   4                          *mm=0xa0;  //step 3
 206   4                          mm=0x10000+count_copy*0x1000+k*0x100+j;
 207   4                                          *mm=i;
 208   4                                  }
 209   3                                 }
 210   2                        }
 211   1      
 212   1                      else if(offset_smallest==0)
 213   1                        {
 214   2                        for(k=(offset_smallest+1);k<16;k++)
 215   2                            {
 216   3                                mm=read_block+k*0x100+1;
 217   3                                m=*mm;
 218   3                        for(j=0;j<(m+1);j++)
 219   3                                 {
 220   4                                              mm=read_block+k*0x100+j;
 221   4                                              i=*mm;
 222   4                              //writing to the new zone a byte
 223   4                                      mm=0x0aaa;
 224   4                          *mm=0xaa;  //step 1
 225   4                                      mm=0x0555;
 226   4                          *mm=0x55;  //step 2
 227   4                                      mm=0x0aaa;
 228   4                          *mm=0xa0;  //step 3
 229   4                          mm=0x10000+count_copy*0x1000+k*0x100+j;
 230   4                                          *mm=i;
 231   4                                  }
 232   3                                 }
 233   2                         }
 234   1      
 235   1                      else               //offset_smallest=15
 236   1                         {
 237   2                        for(k=0;k<offset_smallest;k++)
 238   2                            {
 239   3                                mm=read_block+k*0x100+1;
 240   3                                m=*mm;
 241   3                        for(j=0;j<(m+1);j++)
C51 COMPILER V7.02b   FLASH                                                                06/20/2006 18:46:35 PAGE 5   

 242   3                                 {
 243   4                                              mm=read_block+k*0x100+j;
 244   4                                              i=*mm;
 245   4                              //writing to the new zone a byte
 246   4                                      mm=0x0aaa;
 247   4                          *mm=0xaa;  //step 1
 248   4                                      mm=0x0555;
 249   4                          *mm=0x55;  //step 2
 250   4                                      mm=0x0aaa;
 251   4                          *mm=0xa0;  //step 3
 252   4                          mm=0x10000+count_copy*0x1000+k*0x100+j;
 253   4                                          *mm=i;
 254   4                                  }
 255   3                                 }
 256   2                        }
 257   1      
 258   1                      EA=1;
 259   1                      AUXR=0X00;
 260   1      }
 261          /*----------------------------------------*/
 262          /*                把整体从暂时区域复制 过来到使用区
 263             使用寄存器read_block  ,count_copy
 264          */
 265          /*-----------------------------------*/
 266          transfer_infomation()
 267          {
 268   1                         uchar data i,j,m,k;
 269   1                         uchar xdata *mm;
 270   1      
 271   1      
 272   1                EA=0;
 273   1                        AUXR=0X03;
 274   1                        for(k=0;k<16;k++)
 275   1                            {
 276   2                                mm=0x10000+count_copy*0x1000+k*0x100+1;
 277   2                                m=*mm;
 278   2      //count_copy计算暂时区域的位置,k计算0---15的256字节,j直接的偏移
 279   2                        for(j=0;j<(m+1);j++)
 280   2                                 {
 281   3                                              mm=0x10000+count_copy*0x1000+k*0x100+j;
 282   3                                              i=*mm;
 283   3                              //writing to the new zone a byte
 284   3                                      mm=0x0aaa;
 285   3                          *mm=0xaa;  //step 1
 286   3                                      mm=0x0555;
 287   3                          *mm=0x55;  //step 2
 288   3                                      mm=0x0aaa;
 289   3                          *mm=0xa0;  //step 3
 290   3                          mm=read_block+k*0x100+j;
 291   3                                          *mm=i;
 292   3                                  }
 293   2                                 }
 294   1                      EA=1;
 295   1                      AUXR=0X00;
 296   1      }
 297          /*--------------------------------------*/
 298          /*    
 299                统计最大、最小值
 300          
 301          */
 302          void  Count_BigandSmall()
 303          {
C51 COMPILER V7.02b   FLASH                                                                06/20/2006 18:46:35 PAGE 6   

 304   1              uchar data i;
 305   1      
 306   1           // count out the offset address
 307   1              offset_biggest=0;
 308   1              offset_smallest=0x99;
 309   1           for(i=0;i<16;i++)
 310   1             {
 311   2                              if(message_group[i]>0x99)     //if not been writed,data will >99!!
 312   2                                {
 313   3                                 message_group[i]=0;
 314   3                                 }
 315   2      
 316   2                      if( message_group[i]>offset_biggest )
 317   2                                 {
 318   3                          offset_biggest = message_group[i];   //count bigest num
 319   3                                 }
 320   2                      
 321   2                           if( message_group[i]<offset_smallest)
 322   2                                 {
 323   3                                 offset_smallest=message_group[i];   //count smallest  num
 324   3                                 }
 325   2                      }
 326   1      }
 327          /*----------------------------------------------------*/
 328          /*              Set the Offset place
 329          
 330          描述:找出最小编号的位置,还有最大编号,这样就知道所有信息了。
 331                最小编号位置可以写进当前偏移信息,最大编号可以知道是不是满了
 332          */
 333          /*----------------------------------------------------*/
 334          void  Set_Offset()
 335          {
 336   1               uchar data i;
 337   1      
 338   1                      if(offset_biggest!=0)    //已经有信息了,不是全部为空
 339   1                              {
 340   2                           for(i=0;i<16;i++)
 341   2                                  {
 342   3                                      if(offset_biggest<16)     //有空位置
 343   3                                           {
 344   4                                        if(message_group[i]==offset_biggest)
 345   4                                            {
 346   5                                                         offset_smallest=i+1;   //record the place ,not number
 347   5                                                         offset_biggestplace=i;
 348   5                                 }
 349   4                                                }
 350   3                                         else
 351   3                                            {
 352   4                                                if(message_group[i]==offset_biggest)
 353   4                                                     {
 354   5                                                              if(i==15)
 355   5                                                                {
 356   6                                                 offset_biggest=16;
 357   6                                                 offset_smallest=0;
 358   6                                                 offset_biggestplace=i;
 359   6                                                                }
 360   5                                                              else
 361   5                                                                {
 362   6                                                 offset_biggest=16;
 363   6                                                 offset_smallest=i+1;
 364   6                                                 offset_biggestplace=i;
 365   6                                                                 }
C51 COMPILER V7.02b   FLASH                                                                06/20/2006 18:46:35 PAGE 7   

 366   5                                                         }
 367   4      
 368   4                                                 }
 369   3                                       }
 370   2                               }
 371   1                      else     //全部为空
 372   1                           {
 373   2                                offset_biggest=0;
 374   2                                offset_smallest=0;
 375   2                                offset_biggestplace=0;
 376   2                                for(i=0;i<16;i++)
 377   2                                    {
 378   3                                        message_group[i]=0;
 379   3                                        }
 380   2                               }
 381   1      }
 382          /*--------------------------------------------*/
 383          /*               Count Flash Offset
 384          Desription: 
 385                          判断那个位置的信息是最老的,每一次都把编号读出来,
 386                                          然后重新排列,放置在message_group[16]里面,在移动过来以后
 387                                          就把他们修改过来。
 388                                          使用变量:
 389          
 390          */
 391          /*---------------------------------------------*/
 392          void  Count_Flash_Offset()
 393          {        
 394   1              uint data m;
 395   1              uchar data i;
 396   1                      uchar xdata *mm;
 397   1      
 398   1           AUXR=0x03;
 399   1               i=(uchar)(read_block>>16);
 400   1               P1=i;//16~23
 401   1      
 402   1               m=(uint)(read_block);
 403   1              for(i=0;i<16;i++)
 404   1              {
 405   2               mm=m+i*0x100;
 406   2                       message_group[i]=*mm;
 407   2                   _nop_();

⌨️ 快捷键说明

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