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

📄 lcd_main.lst

📁 外部接传感器完成数据采集
💻 LST
📖 第 1 页 / 共 4 页
字号:
C51 COMPILER V5.10,  SN-  LCD_MAIN                                                         01/07/08  08:57:40  PAGE 1   


DOS C51 COMPILER V5.10, COMPILATION OF MODULE LCD_MAIN
OBJECT MODULE PLACED IN LCD_MAIN.OBJ
COMPILER INVOKED BY: D:\KEIL510\BIN\C51.EXE LCD_MAIN.C CD LC SB DB OE NOAREGS LARGE OT(6,SIZE) 

stmt level    source

   1          #include <cxfunc1.h>
   1      =1  #include <cxdefine.h>
   1      =2  #undef byte
   2      =2  #undef word16
   3      =2  #undef word32
   4      =2  typedef unsigned char byte;
   5      =2  typedef unsigned short word16;
   6      =2  typedef unsigned int bit_word16;
   7      =2  typedef signed short sign_word16;
   8      =2  typedef unsigned long word32;
   9      =2  #define cmx_const code
  10      =2  #define cmx_xdata xdata
  11      =2  #define cmx_reentrant reentrant
  12      =2  #ifndef NULL
  13      =2  #define NULL 0x00
  14      =2  #endif
  15      =2  #ifndef TRUE
  16      =2  #define TRUE 1
  17      =2  #define FALSE 0
  18      =2  #endif
  19      =2  
  20      =2  
  21      =2  #define RESOURCE 0x01	/* waiting on resource */
  22      =2  #define WAIT 0x02	/* wait for wake */
  23      =2  #define SEND_MESG 0x08	/* waiting for task that recieve message to wake me */
  24      =2  #define WAIT_MESG 0x10	/* waiting on message */
  25      =2  #define FLAGS	0x20	/* waiting for task user flags */
  26      =2  #define TIME_EXPIRED 0x40	/* flag indicating time expired */
  27      =2  #define SEMAPHORE	0x80		/* waiting for semaphore */
  28      =2  
  29      =2  #define IDLE 0x0100	/* the task is idle state */
  30      =2  #define READY 0x0200 	/* the task is ready to run (from beginning) */
  31      =2  #define RESUME 0X0400	/* the task is ready to run (not from beginning) */
  32      =2  #define RUNNING 0x0800	/* the task is running */
  33      =2  #define TIME 0x1000	/* wait on time */
  34      =2  
  35      =2  #define ANY_WAIT (WAIT|SEND_MESG|WAIT_MESG|FLAGS|RESOURCE|SEMAPHORE)
  36      =2  
  37      =2  
  38      =2  /* status return values */
  39      =2  #define K_OK 0x00		/* successful call */
  40      =2  #define K_TIMEOUT 0x01	/* warning, time period expired or K_Task_Wake_Force was used */
  41      =2  #define K_NOT_WAITING 0x02	/* error: task not waiting */
  42      =2  #define K_RESOURCE_OWNED 0x05	/* error: task does not own resource */
  43      =2  #define K_RESOURCE_NOT_OWNED 0x06 	/* error: resource already owned */
  44      =2  #define K_QUE_FULL 0x0a	/* error: queue is full */
  45      =2  #define K_QUE_EMPTY 0x0b	/* error: queue is empty */
  46      =2  #define K_SEMAPHORE_NONE 0x0c		/* no semaphore posted, returned (only cxsemget call */	
  47      =2  #define K_ERROR 0xff			/* error: general error value */
  48      =2  
  49      =2  #define K_I_Disable_Sched()   (++locked_out) /* disable task switching */
  50      =2  #define K_I_Enable_Sched() {if ((cmx_flag1 & 0x37) && (locked_out == 1)) K_I_Sched(); else --locked_out; }
             - 
   2      =1  #include <cxvendor.h>
   1      =2  /* for KEIL 8051 "C" tools */
C51 COMPILER V5.10,  SN-  LCD_MAIN                                                         01/07/08  08:57:40  PAGE 2   

   2      =2  
   3      =2  #ifdef CMXMODULE
           =2 /* #include <reg51.h> */
           =2 #endif
   6      =2  #define PROCESSOR 8051
   7      =2  
   8      =2  #define PROC_DISABLE_INT K_OS_Disable_Interrupts()
   9      =2  #define PROC_ENABLE_INT K_OS_Enable_Interrupts()
  10      =2  
  11      =2  #define PROC_SAVE_INT K_OS_Save_Interrupts()
  12      =2  #define PROC_RESTORE_INT K_OS_Restore_Interrupts()
  13      =2  typedef void (code *CMX_FP)(); 
  14      =2  
  15      =2  /* load in tasks STACK address. */
  16      =2  /* adjust stack memory block. */
  17      =2  
  18      =2  #define CXTCRE_SPECIFIC() {tcbptr->stk_save = stack_blk; stack_blk += stack_size / 2; tcbptr->stk_start = 
             -stack_blk - 1;} 
  19      =2  
  20      =2  #ifdef CMX_INIT_MODULE 
           =2 
           =2 byte data locked_out;		/* disable task switching */
           =2 byte data pipe_bytes_left;	/* bytes free in CMX interrupt pipe */ 
           =2 byte data in_ctr;				/* position within interrupt pipe to place bytes */
           =2 byte data out_ctr;			/* position within interrupt pipe to remove bytes */
           =2 byte data cmx_flag1;			/* contains flags, for CMX internal use */
           =2 byte data pipe_slots_avail;	/* pipe slots free. */
           =2 byte data ie_holder;
           =2 
           =2 #else
  31      =2  
  32      =2  extern byte data locked_out;	
  33      =2  extern byte data in_ctr;
  34      =2  extern byte data out_ctr;
  35      =2  extern byte data cmx_flag1;
  36      =2  extern byte data ie_holder;
  37      =2  
  38      =2  #endif
  39      =2  
  40      =2  #ifdef CMXTRACKER
           =2 extern byte xdata CMXTRACKER_ON;
           =2 #endif
  43      =2  
  44      =2  
  45      =2  #define preempted 0x01		/* preempted flag */
  46      =2  #define do_timer_tsk 0x02	/* do timer task flag */
  47      =2  #define do_time_slice 0x04	/* do time slice, next task to slice */
  48      =2  #define slice_enable	0x08	/* time slicing enabled */
  49      =2  #define do_coop_sched 0x10	/* do a cooperative schedule, to NEXT task that can run */
  50      =2  #define do_int_pipe 0x20	/* process interrupt pipe */
  51      =2  #define idle_flag 0x40		/* helps determines power down mode */
  52      =2  #define cmx_active 0x80		/* identifies that CMX RTOS entered */
  53      =2  
  54      =2  
  55      =2  #define PREEMPTED cmx_flag1 |= preempted
  56      =2  #define TEST_NOT_PREEMPTED !(cmx_flag1 & preempted)
  57      =2  #define DO_TIMER_TSK cmx_flag1 |= do_timer_tsk
  58      =2  #define DO_TIME_SLICE cmx_flag1 |= do_time_slice
  59      =2  #define TEST_SLICE_ENABLE	cmx_flag1 & slice_enable
  60      =2  #define SLICE_DISABLE	cmx_flag1 &= ~slice_enable
  61      =2  #define SLICE_ENABLE	cmx_flag1 |= slice_enable
  62      =2  #define DO_COOP_SCHED cmx_flag1 |= do_coop_sched
C51 COMPILER V5.10,  SN-  LCD_MAIN                                                         01/07/08  08:57:40  PAGE 3   

  63      =2  #define DO_INT_PIPE cmx_flag1 |= do_int_pipe
  64      =2  #define CLR_DO_INT_PIPE cmx_flag1 &= ~do_int_pipe
  65      =2  #define TEST_CMX_ACTIVE cmx_flag1 & cmx_active
  66      =2  #define CMX_ACTIVE cmx_flag1 |= cmx_active
   3      =1  #include <cxstruct.h>
   1      =2  /*******************************************
   2      =2   The following are CMX structures
   3      =2  ********************************************/
   4      =2  struct _tcb {
   5      =2  	struct _tcb xdata *fwlink;	/* forward wait link */
   6      =2  	struct _tcb xdata *bwlink;	/* backward wait link */
   7      =2  	struct _tcb xdata *ftlink;	/* forward time wait link */
   8      =2  	struct _tcb xdata *btlink;	/* backward time wait link */
   9      =2  	word16 tcbstate;
  10      =2  	byte trig;			/* the number of triggers (start requests) */
  11      =2  	byte priority;		/* the priority of this task */
  12      =2  	word16 tcbtimer;	/* the timer counter */
  13      =2  	struct _tcb xdata *nxttcb;	/* points to next task, according to priority */
  14      =2  	void (code *task_addr)();		/* the task's CODE address */
  15      =2  	word16 xdata *stk_start;			/* location in external ram, of where to save  
  16      =2  										task's context	*/
  17      =2  	word16 xdata *stk_save;			/* location in external ram, of where to save  
  18      =2  										task's context	*/
  19      =2  	struct _tcb xdata *mesg_sender;
  20      =2  	word16 e_flags;				/* flags for this task */
  21      =2  	word16 e_match;				/* the flags states for match */
  22      =2  };
  23      =2  
  24      =2  typedef struct _tcb xdata *tcbpointer;
  25      =2  
  26      =2  typedef struct tsk_time_lnk {
  27      =2  	struct _tcb xdata *dum1;	/* forward wait link */
  28      =2  	struct _tcb xdata *dum2;	/* backward wait link */
  29      =2  	struct _tcb xdata *ftlink;	/* forward time link */
  30      =2  	struct _tcb xdata *btlink;	/* backward time link */
  31      =2  	} TSK_TIMER_LNK;
  32      =2  
  33      =2  typedef struct cmxmesg {
  34      =2  	struct cmxmesg xdata *env_link;	/* link to next message block. */
  35      =2  	struct cmxmesg xdata *link;		/* link to mailbox. */
  36      =2  	tcbpointer sender;			/* task who sent message. */
  37      =2  	byte *message;					/* address of message. */
  38      =2  	} MSG;
  39      =2  
  40      =2  
  41      =2  typedef struct cmxmbox {
  42      =2  	MSG xdata *first_lnk;		/* link to message block. */
  43      =2  	MSG xdata *next_lnk;			/* link to message block. */
  44      =2  	tcbpointer waiter;	/* what task is waiting for message. */
  45      =2  	byte task_num;			/* task number for setting event bit */
  46      =2  	word16 event_num;		/* event number */
  47      =2  	} MAILBOX;
  48      =2  
  49      =2  
  50      =2  typedef struct cmxqueue {
  51      =2  	byte xdata *base_ptr;	/* address of user supplied memory for queue. */
  52      =2  	sign_word16 num_slots;	/* the number of slots within this queue */
  53      =2  	sign_word16 queue_cnt;	/* the number of slots used */
  54      =2  	byte size_slot;	/* size of slots */
  55      =2  	sign_word16 head;	/* must be signed to test for < 0 */
  56      =2  	sign_word16 tail;	/* must be signed to test for < 0 */
  57      =2  	} QUEHDR;
C51 COMPILER V5.10,  SN-  LCD_MAIN                                                         01/07/08  08:57:40  PAGE 4   

  58      =2  
  59      =2  
  60      =2  
  61      =2  /* the cyclic timers structure */
  62      =2  typedef struct _tcproc {
  63      =2  	struct _tcproc xdata *ftlink;	/* forward time link */
  64      =2  	struct _tcproc xdata *btlink;	/* backward time link */
  65      =2  	byte tproc_start;		/* byte indicating timed procedure stopped / started */
  66      =2  	word16 tproc_timer;		/* the timer counter */
  67      =2  	word16 reload_time;		/* the cyclic time that will be reloaded */
  68      =2  	word16 event_num;			/* the event to set. */
  69      =2  	byte mode;					/* what mode to sent to K_Event_Signal function. */
  70      =2  	byte tskid_pri;			/* task slot number or priority (may not be used). */
  71      =2  	} CYCLIC_TIMERS;
  72      =2  
  73      =2  typedef struct cyclic_tmrs_link {
  74      =2  	struct _tcproc xdata *ftlink;	/* forward time link */
  75      =2  	struct _tcproc xdata *btlink;	/* backward time link */
  76      =2  	} CYCLIC_LNK;
  77      =2  
  78      =2  /* the resource structure */
  79      =2  typedef struct cmxresource {
  80      =2  	tcbpointer fwlink;		/* forward wait link. */
  81      =2  	tcbpointer bwlink;		/* backward wait link. */
  82      =2  	tcbpointer owner;			/* The task that owns resource. */
  83      =2  	byte owner_priority;
  84      =2  	} RESHDR;
  85      =2  
  86      =2  typedef struct semaphore {
  87      =2  		tcbpointer fwlink;	/* forward wait link. */
  88      =2  		tcbpointer bwlink;	/* backward wait link. */
  89      =2  		word16 sem_count;
  90      =2  		word16 sem_n;
  91      =2  		} SEM;
  92      =2  
  93      =2  typedef struct pipe_element {
  94      =2  		byte identifier;
  95      =2  		byte p1;		/* parameter 1 */
  96      =2  		byte p2;		/* parameter 2 */
  97      =2  		union {
  98      =2  		word16 p3;	/* parameter 3 */
  99      =2  		void *p4;	/* address of message. */
 100      =2  			} pipe_u;
 101      =2  		} PIPE_STRUC;
   4      =1  
   5      =1  byte K_Task_Create(byte,byte xdata *,CMX_FP,word16) reentrant;	/* create task. */
   6      =1  byte K_Task_Create_Stack(byte,byte xdata *,CMX_FP,word16 xdata *) reentrant;	/* create task. */
   7      =1  byte K_Task_Start(byte) reentrant;		/* start task */
   8      =1  byte K_Task_Wait(word16) reentrant;	/*	have task wait, with or without time period */
   9      =1  byte K_I_Wake_Common(byte,byte) reentrant;	/* common wake routine */	
  10      =1  #define K_Task_Wake(A) K_I_Wake_Common(A,0)	 /* wake a task that was waiting. */
  11      =1  #define K_Task_Wake_Force(A) K_I_Wake_Common(A,1) /* wake a task, regardless of what task waiting on */
  12      =1  byte K_Task_Priority(byte,byte) reentrant;	/* change a task priority. */
  13      =1  void K_Task_Lock(void) reentrant;		/* disable task switching */
  14      =1  void K_Task_Unlock(void) reentrant;		/* re-enable task switching. */
  15      =1  void K_Task_Coop_Sched(void) reentrant;		/* do a cooperative task switch. */
  16      =1  void K_Task_End(void) reentrant;		/* must be called by all task prior to end brace. */
  17      =1  byte K_Task_Delete(byte) reentrant;		/* remove a task. */
  18      =1  byte K_Task_Name(byte,char *) reentrant;	/* declare a name for task. */
  19      =1  
  20      =1  word16 K_Event_Wait(word16,word16,byte) reentrant;	/* wait on events, with/without time period */
  21      =1  byte K_Event_Signal(byte,byte,word16) reentrant;	/* signal an event */
C51 COMPILER V5.10,  SN-  LCD_MAIN                                                         01/07/08  08:57:40  PAGE 5   

  22      =1  byte K_Event_Reset(byte tskid,word16 event) reentrant;	/* reset events bits */
  23      =1  
  24      =1  byte K_I_Resource_Common(byte,word16,byte) reentrant;			/* common resource reserve/get function */
  25      =1  #define K_Resource_Wait(A,B) K_I_Resource_Common(A,B,0)	/* reserve a resource, with or without time period
             - */
  26      =1  #define K_Resource_Get(A) K_I_Resource_Common(A,0,1)		/* get a resource if free */
  27      =1  byte K_Resource_Release(byte) reentrant;		/* release a resource */
  28      =1  
  29      =1  byte K_Que_Create(sign_word16,byte,byte xdata *,byte) reentrant;	/* create a circular queue */
  30      =1  byte K_Que_Reset(byte) reentrant;	/* reset a queue */
  31      =1  byte K_I_Que_Add_Common(byte,void *,sign_word16) reentrant;	/* common add to queue routine */
  32      =1  #define K_Que_Add_Top(A,B) K_I_Que_Add_Common(A,B,1)	/* add to queues top */
  33      =1  #define K_Que_Add_Bottom(A,B) K_I_Que_Add_Common(A,B,0)	/* add to queue's bottom */
  34      =1  byte K_I_Que_Get_Common(byte,void *,sign_word16) reentrant;	/* common remove from queue routine */
  35      =1  #define K_Que_Get_Top(A,B) K_I_Que_Get_Common(A,B,1)	/* remove from queue's top */
  36      =1  #define K_Que_Get_Bottom(A,B) K_I_Que_Get_Common(A,B,0)	/* remove from queue's bottom */
  37      =1  
  38      =1  void * K_I_Mesg_Wait_Common(byte,word16,byte) reentrant;		/* common message get/wait function */
  39      =1  #define K_Mesg_Wait(A,B) K_I_Mesg_Wait_Common(A,B,0)	/* wait for message, with or without time period */
  40      =1  #define K_Mesg_Get(A) K_I_Mesg_Wait_Common(A,0,1)		/* get a message if one is available */
  41      =1  byte K_I_Mesg_Send_Common(byte,word16,void *,byte) reentrant;	/* common message send/wait function */
  42      =1  #define K_Mesg_Send(A,B) K_I_Mesg_Send_Common(A,0,B,0)	/* send message to a mailbox */
  43      =1  #define K_Mesg_Send_Wait(A,B,C) K_I_Mesg_Send_Common(A,B,C,1)	/* send message, wait for reciever to ACK */
  44      =1  byte K_Mbox_Event_Set(byte,byte,word16) reentrant;		/* mailbox event setting parameters */
  45      =1  byte K_Mesg_Ack_Sender(void) reentrant;		/* wake task that sent message */
  46      =1  
  47      =1  byte K_Timer_Create(byte,byte,byte,word16) reentrant;	/* create cyclic timer */
  48      =1  byte K_I_Cyclic_Common(byte,word16,word16,byte) reentrant;	/* common function for next 4 functions */
  49      =1  #define K_Timer_Start(A,B,C) K_I_Cyclic_Common(A,B,C,3)	/* start cyclic timer */
  50      =1  #define K_Timer_Restart(A) K_I_Cyclic_Common(A,0,0,0)		/* re-start cyclic timer */
  51      =1  #define K_Timer_Initial(A,B) K_I_Cyclic_Common(A,B,0,1)		/* re-start timer, with new initial time */
  52      =1  #define K_Timer_Cyclic(A,B) K_I_Cyclic_Common(A,0,B,2)		/* re-start timer, with new cyclic time */
  53      =1  byte K_Timer_Stop(byte) reentrant;				/* stop cyclic timer */
  54      =1  
  55      =1  void K_Mem_FB_Create(void xdata *,word16,word16) reentrant;	/* create fixed memory block */
  56      =1  byte K_Mem_FB_Get(void xdata *,byte xdata **) reentrant;			/* get a block of memory */
  57      =1  void K_Mem_FB_Release(void xdata *,byte xdata *) reentrant; 			/* release a block of memory */
  58      =1  
  59      =1  byte K_I_Semaphore_Get_Common(byte,word16,byte) reentrant;
  60      =1  #define K_Semaphore_Get(A) K_I_Semaphore_Get_Common(A,0,1)
  61      =1  #define K_Semaphore_Wait(A,B) K_I_Semaphore_Get_Common(A,B,0)
  62      =1  byte K_Semaphore_Post(byte) reentrant;
  63      =1  byte K_Semaphore_Create(byte,word16) reentrant;
  64      =1  byte K_Semaphore_Reset(byte,byte) reentrant;	
  65      =1  byte K_OS_Task_Slot_Get(void) reentrant;
  66      =1  word32 K_OS_Tick_Get_Ctr(void) reentrant;
  67      =1  
  68      =1  void K_OS_Slice_On(void) reentrant;		/* Enable time slicing */
  69      =1  void K_OS_Slice_Off(void) reentrant;		/* Disable time slicing */
  70      =1  
  71      =1  void K_OS_Init(void) reentrant;		/* initialize CMX */

⌨️ 快捷键说明

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