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

📄 function.lst

📁 移植于51单片机上的ucos。SCH51-OS是整个工程项目
💻 LST
📖 第 1 页 / 共 3 页
字号:
C51 COMPILER V7.10   FUNCTION                                                              08/18/2008 10:07:15 PAGE 1   


C51 COMPILER V7.10, COMPILATION OF MODULE FUNCTION
OBJECT MODULE PLACED IN function.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE function.c BROWSE DEBUG OBJECTEXTEND

line level    source

   1          /*获取当前行,列*/
   2          /*设置当前行,列*/
   3          
   4          #include "ExtDef.h"
   5          #include "data.h"
   6          #include "LCD.h"
   7          
   8          
   9          uchar g=0;
  10          
  11          uchar curx,cury;        /*纪录当前人物所在位置*/
  12          
  13          uchar level_temp[8][8]={
  14                  0,0,0,0,0,0,0,0,
  15                  0,0,0,0,0,0,0,0,
  16                  0,0,0,0,0,0,0,0,
  17                  0,0,0,0,0,0,0,0,
  18                  0,0,0,0,0,0,0,0,
  19                  0,0,0,0,0,0,0,0,
  20                  0,0,0,0,0,0,0,0,
  21                  0,0,0,0,0,0,0,0,
  22          };
  23          
  24          
  25          void wirte_bg(void){
  26   1              int i;
  27   1              set_adr(0x50,0x01);
  28   1              for(i = 0; i < 2560; i++)
  29   1                      write_one(bg[i],INC_WR);
  30   1      }
  31          
  32          void start(void){
  33   1              uchar i;
  34   1              set_xy(0,0);
  35   1              for(i=0;i<20;i++)
  36   1                      write_one(0x95,INC_WR);
  37   1              set_xy(0,15);
  38   1              for(i=0;i<20;i++)
  39   1                      write_one(0x95,INC_WR);
  40   1              for(i=0;i<15;i++){
  41   2                      set_xy(0,i);
  42   2                      write_one(0x95,INC_WR);
  43   2                      set_xy(19,i);
  44   2                      write_one(0x95,INC_WR);
  45   2              }
  46   1              set_xy(18,1);
  47   1              write_one(0x96,INC_WR);
  48   1              set_xy(18,14);
  49   1              write_one(0x97,INC_WR);
  50   1              set_xy(1,1);
  51   1              write_one(0x98,INC_WR);
  52   1              set_xy(1,14);
  53   1              write_one(0x99,INC_WR);
  54   1      
  55   1              set_xy(7,6);
C51 COMPILER V7.10   FUNCTION                                                              08/18/2008 10:07:15 PAGE 2   

  56   1              write_one(0xaa,INC_WR);
  57   1              write_one(0xab,INC_WR);
  58   1              write_one(0xae,INC_WR);
  59   1              write_one(0xaf,INC_WR);
  60   1              write_one(0xb2,INC_WR);
  61   1              write_one(0xb3,INC_WR);
  62   1              set_xy(7,7);
  63   1              write_one(0xac,INC_WR);
  64   1              write_one(0xad,INC_WR);
  65   1              write_one(0xb0,INC_WR);
  66   1              write_one(0xb1,INC_WR);
  67   1              write_one(0xb4,INC_WR);
  68   1              write_one(0xb5,INC_WR);
  69   1      
  70   1              set_xy(6,8);
  71   1              write_one(0x9a,INC_WR);
  72   1              write_one(0x9b,INC_WR);
  73   1              write_one(0x9e,INC_WR);
  74   1              write_one(0x9f,INC_WR);
  75   1              write_one(0xa2,INC_WR);
  76   1              write_one(0xa3,INC_WR);
  77   1              write_one(0xa6,INC_WR);
  78   1              write_one(0xa7,INC_WR);
  79   1              set_xy(6,9);
  80   1              write_one(0x9c,INC_WR);
  81   1              write_one(0x9d,INC_WR);
  82   1              write_one(0xa0,INC_WR);
  83   1              write_one(0xa1,INC_WR);
  84   1              write_one(0xa4,INC_WR);
  85   1              write_one(0xa5,INC_WR);
  86   1              write_one(0xa8,INC_WR);
  87   1              write_one(0xa9,INC_WR);
  88   1      /*      while(i){                       /*此while语句判断确定键超级技巧*/
  89   1      /*              switch(P1&0x1f){
  90   1                              case 0x0f:
  91   1                                      i=0;
  92   1                                      break;                          
  93   1                      }
  94   1              }
  95   1      */
  96   1      }
  97          
  98          
  99          void guan(void){
 100   1              /*推*/  
 101   1              set_xy(16,0);
 102   1              write_one(0xaa,INC_WR);
 103   1              write_one(0xab,INC_WR);
 104   1              set_xy(16,1);
 105   1              write_one(0xac,INC_WR);
 106   1              write_one(0xad,INC_WR);
 107   1              /*箱*/
 108   1              set_xy(16,2);
 109   1              write_one(0xae,INC_WR);
 110   1              write_one(0xaf,INC_WR);
 111   1              set_xy(16,3);
 112   1              write_one(0xb0,INC_WR);
 113   1              write_one(0xb1,INC_WR);
 114   1              /*子*/
 115   1              set_xy(16,4);
 116   1              write_one(0xb2,INC_WR);
 117   1              write_one(0xb3,INC_WR);
C51 COMPILER V7.10   FUNCTION                                                              08/18/2008 10:07:15 PAGE 3   

 118   1              set_xy(16,5);
 119   1              write_one(0xb4,INC_WR);
 120   1              write_one(0xb5,INC_WR); 
 121   1              /*第*/
 122   1              set_xy(16,8);
 123   1              write_one(0xd2,INC_WR);
 124   1              write_one(0xd3,INC_WR); 
 125   1              set_xy(16,9);
 126   1              write_one(0xd4,INC_WR);
 127   1              write_one(0xd5,INC_WR);
 128   1              /*几*/  
 129   1              set_xy(16,10);
 130   1              write_one(0xd6,INC_WR);
 131   1              write_one(0xd6+2*(g+1),INC_WR); 
 132   1              set_xy(16,11);
 133   1              write_one(0xd7,INC_WR);
 134   1              write_one(0xd7+2*(g+1),INC_WR);
 135   1              /*关*/  
 136   1              set_xy(16,12);
 137   1              write_one(0xce,INC_WR);
 138   1              write_one(0xcf,INC_WR); 
 139   1              set_xy(16,13);
 140   1              write_one(0xd0,INC_WR);
 141   1              write_one(0xd1,INC_WR);
 142   1              /*阿*/
 143   1              set_xy(18,0);
 144   1              write_one(0x9a,INC_WR);
 145   1              write_one(0x9b,INC_WR); 
 146   1              set_xy(18,1);
 147   1              write_one(0x9c,INC_WR);
 148   1              write_one(0x9d,INC_WR);
 149   1              /*С*/  
 150   1              set_xy(18,2);
 151   1              write_one(0x9e,INC_WR);
 152   1              write_one(0x9f,INC_WR); 
 153   1              set_xy(18,3);
 154   1              write_one(0xa0,INC_WR);
 155   1              write_one(0xa1,INC_WR);
 156   1              /*制*/  
 157   1              set_xy(18,4);
 158   1              write_one(0xa2,INC_WR);
 159   1              write_one(0xa3,INC_WR); 
 160   1              set_xy(18,5);
 161   1              write_one(0xa4,INC_WR);
 162   1              write_one(0xa5,INC_WR);
 163   1              /*作*/  
 164   1              set_xy(18,6);
 165   1              write_one(0xa6,INC_WR);
 166   1              write_one(0xa7,INC_WR); 
 167   1              set_xy(18,7);
 168   1              write_one(0xa8,INC_WR);
 169   1              write_one(0xa9,INC_WR);
 170   1      }
 171          
 172          
 173          
 174          
 175          void printc(uchar i, uchar j, uchar c){
 176   1              set_xy(i*2,j*2);
 177   1              switch(c){      
 178   2                      case 0:
 179   2                                 write_one(0x94,INC_WR);
C51 COMPILER V7.10   FUNCTION                                                              08/18/2008 10:07:15 PAGE 4   

 180   2                                 write_one(0x94,INC_WR);
 181   2                                 set_xy(i*2,j*2+1);
 182   2                                 write_one(0x94,INC_WR);
 183   2                                 write_one(0x94,INC_WR);
 184   2                                 break;                                          
 185   2                      case 1:         /*人物1*/
 186   2                                 write_one(0x80,INC_WR);
 187   2                                 write_one(0x81,INC_WR);
 188   2                                 set_xy(i*2,j*2+1);
 189   2                                 write_one(0x82,INC_WR);
 190   2                                 write_one(0x83,INC_WR);
 191   2                                 break;
 192   2                      case 2:         /*砖头2*/
 193   2                                 write_one(0x84,INC_WR);
 194   2                                 write_one(0x85,INC_WR);
 195   2                                 set_xy(i*2,j*2+1);
 196   2                                 write_one(0x86,INC_WR);
 197   2                                 write_one(0x87,INC_WR);
 198   2                                 break;
 199   2                      case 3:         /*箱子3*/
 200   2                                 write_one(0x88,INC_WR);
 201   2                                 write_one(0x89,INC_WR);
 202   2                                 set_xy(i*2,j*2+1);
 203   2                                 write_one(0x8a,INC_WR);
 204   2                                 write_one(0x8b,INC_WR);
 205   2                                 break;
 206   2                      case 4:         /*目的4*/
 207   2                                 write_one(0x8c,INC_WR);
 208   2                                 write_one(0x8d,INC_WR);
 209   2                                 set_xy(i*2,j*2+1);
 210   2                                 write_one(0x8e,INC_WR);
 211   2                                 write_one(0x8f,INC_WR);
 212   2                                 break;
 213   2                      case 5:         /*成功5*/
 214   2                                 write_one(0x90,INC_WR);
 215   2                                 write_one(0x91,INC_WR);
 216   2                                 set_xy(i*2,j*2+1);
 217   2                                 write_one(0x92,INC_WR);
 218   2                                 write_one(0x93,INC_WR);
 219   2                                 break;
 220   2              }
 221   1              
 222   1      }
 223          
 224          
 225          
 226          void pushbox() {
 227   1              uchar i,j;

⌨️ 快捷键说明

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