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

📄 main.lst

📁 C51源码.其内文件包含spi
💻 LST
📖 第 1 页 / 共 5 页
字号:
   6      =1  All rights reserved.
   7      =1  --------------------------------------------------------------------------*/
   8      =1  
   9      =1  #ifndef __INTRINS_H__
  10      =1  #define __INTRINS_H__
  11      =1  
  12      =1  extern void          _nop_     (void);
  13      =1  extern bit           _testbit_ (bit);
  14      =1  extern unsigned char _cror_    (unsigned char, unsigned char);
  15      =1  extern unsigned int  _iror_    (unsigned int,  unsigned char);
  16      =1  extern unsigned long _lror_    (unsigned long, unsigned char);
  17      =1  extern unsigned char _crol_    (unsigned char, unsigned char);
  18      =1  extern unsigned int  _irol_    (unsigned int,  unsigned char);
  19      =1  extern unsigned long _lrol_    (unsigned long, unsigned char);
  20      =1  extern unsigned char _chkfloat_(float);
  21      =1  extern void          _push_    (unsigned char _sfr);
  22      =1  extern void          _pop_     (unsigned char _sfr);
  23      =1  
  24      =1  #endif
  25      =1  
   8          #include        "define.h"
   1      =1  
   2      =1  #define byte    unsigned char
   3      =1  #define BYTE    unsigned char
   4      =1  
   5      =1  #define uint    unsigned int
   6      =1  #define UINT    unsigned int
   7      =1  
   8      =1  #define uchar   unsigned char
   9      =1  #define ulong   unsigned long
C51 COMPILER V8.12   MAIN                                                                  04/03/2009 01:00:38 PAGE 9   

  10      =1  #define Byte    unsigned char
  11      =1  #define Word    unsigned int
  12      =1  #define WORD    unsigned int
  13      =1  #define UINT    unsigned int
  14      =1  #define byte    unsigned char
  15      =1  #define word    unsigned int
  16      =1  #define bool    char
  17      =1  #define BOOL    unsigned char
  18      =1  
  19      =1  #define TRUE  1
  20      =1  #define true  1
  21      =1  #define FALSE 0
  22      =1  #define false 0
  23      =1  #ifndef NULL
           =1 #define NULL  0
           =1 #endif
  26      =1  #define null  0
  27      =1  #define SomeNOP(); _nop_();_nop_();_nop_();_nop_();
  28      =1  
  29      =1  /*颜色定义*/
  30      =1  #define a_lyellow    3
  31      =1  #define a_lgreen0    6
  32      =1  #define a_lpink      5
  33      =1  #define a_lwhite     7
  34      =1  #define a_hyellow    11
  35      =1  #define a_hgreen0    14
  36      =1  #define a_hpink      13
  37      =1  #define a_hwhite     15
  38      =1  #define a_lred       1
  39      =1  #define a_lgreen     2
  40      =1  #define a_lblue      4
  41      =1  #define a_hred       9
  42      =1  #define a_hgreen     10
  43      =1  #define a_hblue      12
  44      =1  #define a_lblack     0
  45      =1  
  46      =1  #define BLACK     0x0
  47      =1  #define RED       0x1
  48      =1  #define GREEN     0x2
  49      =1  #define YELLOW    0x3
  50      =1  #define BLUE      0x4
  51      =1  #define PINK      0x5
  52      =1  #define GREEN2    0x6
  53      =1  #define WHITE     0x7
  54      =1  /************************************************/
  55      =1  /*键盘键值表*/
  56      =1  #define ZERO    0
  57      =1  #define ONE     1
  58      =1  #define TWO     2
  59      =1  #define THREE   3
  60      =1  #define FOUR    4
  61      =1  #define FIVE    5
  62      =1  #define SIX     6
  63      =1  #define SEVEN   7
  64      =1  #define EIGHT   8
  65      =1  #define NINE    9
  66      =1  #define DOT     10
  67      =1  #define UP      11
  68      =1  #define DOWN    12
  69      =1  #define BACK    13
  70      =1  #define OK      14
  71      =1  #define CANCEL  15
C51 COMPILER V8.12   MAIN                                                                  04/03/2009 01:00:38 PAGE 10  

  72      =1  /************************************************/
  73      =1  
  74      =1  
  75      =1  #define MBS_OK_ONLY        0x1
  76      =1  #define MBS_CANCEL_ONLY    0x2
  77      =1  #define MBS_OK_CANCEL      0x4
  78      =1  #define MBS_MODELESS       0x8
  79      =1  
  80      =1  #define PS_SOLID           0x1
  81      =1  #define PS_DOT             0x2  
  82      =1  
  83      =1  #define CHAR_WIDTH  4
  84      =1  
  85      =1  #define WR_OPT          0
  86      =1  #define RD_OPT          1
  87      =1  #define TIME_INIT       2
  88      =1  //定义138译码地址
  89      =1  #define   K0   XBYTE[0X8000]
  90      =1  #define   K1   XBYTE[0X9000]
  91      =1  #define   K2   XBYTE[0XA000]
  92      =1  #define   K3   XBYTE[0XB000]
  93      =1  #define   K4   XBYTE[0XC000]
  94      =1  #define   K5   XBYTE[0XD000]
  95      =1  #define   K6   XBYTE[0XE000]
  96      =1  #define   K7   XBYTE[0XF000]
  97      =1  
  98      =1  //设置P4口相关引脚功能。
  99      =1  //P4口及其他高端口,不能位寻址,故定义可以位寻址的寄存器变量
 100      =1  byte bdata  PP4;
 101      =1  sbit P40        = PP4^0;
 102      =1  sbit WDI        = PP4^1;
 103      =1  sbit CLOSE      = PP4^2;
 104      =1  sbit D_I        = PP4^3;
 105      =1  
 106      =1  #define SET_I                           {D_I=0;         PP4|=0xf0;      P4=PP4;}
 107      =1  #define SET_D                           {D_I=1;         PP4|=0xf0;      P4=PP4;}
 108      =1  
 109      =1  #define OPEN_LCD_DISPLAY        {CLOSE=0;       PP4|=0xf0;      P4=PP4;}
 110      =1  #define CLOSE_LCD_DISPLAY       {CLOSE=0;       PP4|=0xf0;      P4=PP4;}
 111      =1  
 112      =1  #define SET_W_DOG                       {WDI=~WDI;      PP4|=0xf0;      P4=PP4;}
 113      =1  
 114      =1  #define SELECT_P62256           {P40=0;         PP4|=0xf0;      P4=PP4;}                                                         
 115      =1  #define SELECT_YD501            {P40=1;         PP4|=0xf0;      P4=PP4;}
 116      =1  
 117      =1  //设置灯显示等
 118      =1  byte    bdata  OutBuf;
 119      =1  
 120      =1  sbit   Work = OutBuf^0;
 121      =1  sbit   UUUU = OutBuf^1;
 122      =1  sbit   GJGJ = OutBuf^2;
 123      =1  sbit   WXWX = OutBuf^3;
 124      =1  sbit   CDCC = OutBuf^4;
 125      =1  sbit   FDCC = OutBuf^5;
 126      =1  sbit   HHHH = OutBuf^6;
 127      =1  sbit   BJQQ = OutBuf^7;
 128      =1  
 129      =1  void OpenBJQ();
 130      =1  void CloseBJQ();
 131      =1  
 132      =1  
 133      =1  
C51 COMPILER V8.12   MAIN                                                                  04/03/2009 01:00:38 PAGE 11  

 134      =1  #define SET_EDIT_BUF(items, bufs)  {edit_buf.edit_num = items; \
 135      =1                                     edit_buf.edit = bufs;       \
 136      =1                                     edit_buf.pre_edit = 0;      \
 137      =1                                     edit_buf.cur_edit = 0;}     
 138      =1                                                                     
 139      =1  typedef struct tagEDIT
 140      =1  {
 141      =1          unsigned char x;
 142      =1          unsigned char y;
 143      =1  
 144      =1      unsigned char buf[11];
 145      =1  
 146      =1          unsigned char fdot;
 147      =1      unsigned char bdot;
 148      =1  }EDIT;
 149      =1  
 150      =1  typedef struct tagPOINT
 151      =1  {
 152      =1          unsigned int x;
 153      =1          unsigned int y;
 154      =1  }POINT;
 155      =1  typedef struct tagEDITBUF
 156      =1  {
 157      =1          unsigned char edit_num;
 158      =1          unsigned char cur_edit;
 159      =1          unsigned char pre_edit;
 160      =1  
 161      =1          EDIT *edit;
 162      =1  
 163      =1  }EDITBUF;
 164      =1  
 165      =1  
 166      =1  #define EDIT_HEAD   0x1
 167      =1  #define EDIT_END    0x2
 168      =1  
 169      =1  typedef union tagUINT
 170      =1  {
 171      =1          uchar byt[2];
 172      =1          uint  integer;
 173      =1  }u_int;
 174      =1  typedef struct tagPEN
 175      =1  {
 176      =1          unsigned char fcolor;
 177      =1          unsigned char bcolor;
 178      =1  }PEN;
 179      =1  typedef struct tagRECT
 180      =1  {
 181      =1          unsigned int left;
 182      =1          unsigned int top;
 183      =1          unsigned int right;
 184      =1          unsigned int bottom;
 185      =1  }RECT;                          
 186      =1  typedef struct STRUCT_SYSSCREEN
 187      =1  {
 188      =1          RECT title_rect;
 189      =1          PEN  title_pen;
 190      =1          
 191      =1          RECT client_rect;
 192      =1          PEN  client_pen;
 193      =1  
 194      =1          RECT status_rect;
 195      =1          PEN  status_pen;
C51 COMPILER V8.12   MAIN                                                                  04/03/2009 01:00:38 PAGE 12  

 196      =1  }SCREEN;
 197      =1  
 198      =1  typedef struct STRUCT_MESSAGEBOX
 199      =1  {
 200      =1          RECT  mt_rect;
 201      =1          RECT  t_rect;
 202      =1          uchar tfcolor;
 203      =1          uchar tbcolor;
 204      =1  
 205      =1          RECT  m_rect;
 206      =1          uchar mfcolor;
 207      =1          uchar mbcolor;
 208      =1  
 209      =1          uchar style;
 210      =1  }MESSAGEBOX;
 211      =1  
 212      =1  uchar idata   a_fcolor;

⌨️ 快捷键说明

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