📄 msg.lst
字号:
C51 COMPILER V7.06 MSG 10/13/2006 09:21:10 PAGE 1
C51 COMPILER V7.06, COMPILATION OF MODULE MSG
OBJECT MODULE PLACED IN msg.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE msg.c LARGE BROWSE DEBUG OBJECTEXTEND
stmt level source
1 #include <stdio.h>
2 #include <absacc.h>
3 #include <stdarg.h>
4 #include <./Atmel/at89x52.h>
5 #include "source.h"
6 /****HBS=half bottom screen ****/
7 #define HBS_MSG_DEEP 10 //设置为screen_hbs函数定义消息的深度
8 unsigned char hbs_msg[HBS_MSG_DEEP];
9 unsigned char hbs_tail=0;
10 unsigned char hbs_head=0;
11 void send_hbs_msg(unsigned char msg){//向screen_hbs函数的消息队列发送消息
12 1 hbs_msg[hbs_head]=msg;
13 1 hbs_head++;
14 1 hbs_head %=HBS_MSG_DEEP;
15 1 }
16 unsigned char read_hbs_msg(void){//从screen_hbs函数的消息队列中读取消息
17 1 unsigned char ret_msg;
18 1 if(hbs_tail!=hbs_head){//消息队列不为空,返回消息
19 2 ret_msg=hbs_msg[hbs_tail];
20 2 hbs_tail++;
21 2 hbs_tail %=HBS_MSG_DEEP;
22 2 return ret_msg;
23 2 }
24 1 else{
25 2 return 0;//消息队列为空,返回0
26 2 }
27 1 }
28 void change_hbs_fsm(unsigned char fsm){//改变screen_hbs函数里的状态机
29 1 screen.hbs_fsm=fsm;
30 1 }
31 /******以下消息函数的功能同以上的说明****/
32 #define STATUS_MSG_DEEP 10
33 unsigned char status_msg[STATUS_MSG_DEEP];
34 unsigned char status_tail=0;
35 unsigned char status_head=0;
36 void send_status_msg(unsigned char msg){
37 1 status_msg[status_head]=msg;
38 1 status_head++;
39 1 status_head %=STATUS_MSG_DEEP;
40 1 }
41 unsigned char read_status_msg(void){
42 1 unsigned char ret_msg;
43 1 if(status_tail!=status_head){//消息队列不为空,返回消息
44 2 ret_msg=status_msg[status_tail];
45 2 status_tail++;
46 2 status_tail %=STATUS_MSG_DEEP;
47 2 return ret_msg;
48 2 }
49 1 else{
50 2 return 0;//消息队列为空,返回0
51 2 }
52 1 }
53 void change_status_fsm(unsigned char fsm){//改变状态机
54 1 screen.status_fsm=fsm;
55 1 }
C51 COMPILER V7.06 MSG 10/13/2006 09:21:10 PAGE 2
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 158 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = 24 ----
PDATA SIZE = ---- ----
DATA SIZE = ---- ----
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -