leaf
2 years ago
13 changed files with 3759 additions and 0 deletions
@ -0,0 +1,76 @@ |
|||
#ifndef _com_send_H |
|||
#define _com_send_H |
|||
|
|||
#include "public.h" |
|||
|
|||
typedef unsigned char BYTE; |
|||
typedef unsigned int WORD; |
|||
|
|||
#define FOSC 11059200L //System frequency
|
|||
#define BAUD 9600 //UART baudrate
|
|||
|
|||
bit busy; |
|||
|
|||
sfr T2CON = 0xC8; |
|||
sfr RCAP2L = 0xCA; |
|||
sfr RCAP2H = 0xCB; |
|||
sfr TL2 = 0xCC; |
|||
sfr TH2 = 0xCD; |
|||
|
|||
void send_init(); |
|||
void send_data(BYTE dat); |
|||
void send_string(char *s); |
|||
|
|||
void send_init() |
|||
{ |
|||
SCON = 0x50; |
|||
TL2 = RCAP2L = (65536-(FOSC/32/BAUD)); //Set auto-reload vaule
|
|||
TH2 = RCAP2H = (65536-(FOSC/32/BAUD)) >> 8; |
|||
T2CON = 0x34; //Timer2 start run
|
|||
ES = 1; //Enable UART interrupt
|
|||
EA = 1; //Open master interrupt switch
|
|||
} |
|||
|
|||
/*----------------------------
|
|||
UART interrupt service routine |
|||
----------------------------*/ |
|||
void uart_isr() interrupt 4 |
|||
{ |
|||
if (RI) |
|||
{ |
|||
RI = 0; //Clear receive interrupt flag
|
|||
} |
|||
if (TI) |
|||
{ |
|||
TI = 0; //Clear transmit interrupt flag
|
|||
busy = 0; //Clear transmit busy flag
|
|||
} |
|||
} |
|||
|
|||
/*----------------------------
|
|||
Send a byte data to UART |
|||
Input: dat (data to be sent) |
|||
Output:None |
|||
----------------------------*/ |
|||
void send_data(BYTE dat) |
|||
{ |
|||
while (busy); //Wait for the completion of the previous data is sent
|
|||
ACC = dat; //Calculate the even parity bit P (PSW.0)
|
|||
busy = 1; |
|||
SBUF = ACC; //Send data to UART buffer
|
|||
} |
|||
|
|||
/*----------------------------
|
|||
Send a string to UART |
|||
Input: s (address of string) |
|||
Output:None |
|||
----------------------------*/ |
|||
void send_string(char *s) |
|||
{ |
|||
while (*s) //Check the end of the string
|
|||
{ |
|||
send_data(*s++); //Send current char and increment string ptr
|
|||
} |
|||
} |
|||
|
|||
#endif |
@ -0,0 +1,59 @@ |
|||
#ifndef _key_H |
|||
#define _key_H |
|||
|
|||
#include "public.h" |
|||
|
|||
//定义独立按键控制脚
|
|||
sbit KEY1=P3^1; |
|||
sbit KEY2=P3^0; |
|||
sbit KEY3=P3^2; |
|||
sbit KEY4=P3^3; |
|||
|
|||
|
|||
//使用宏定义独立按键按下的键值
|
|||
#define KEY1_PRESS 1 |
|||
#define KEY2_PRESS 2 |
|||
#define KEY3_PRESS 3 |
|||
#define KEY4_PRESS 4 |
|||
#define KEY_UNPRESS 0 |
|||
|
|||
|
|||
u8 key_scan(u8 mode); |
|||
|
|||
/*******************************************************************************
|
|||
* 函 数 名 : key_scan |
|||
* 函数功能 : 检测独立按键是否按下,按下则返回对应键值 |
|||
* 输 入 : mode=0:单次扫描按键 |
|||
mode=1:连续扫描按键 |
|||
* 输 出 : KEY1_PRESS:K1按下 |
|||
KEY2_PRESS:K2按下 |
|||
KEY3_PRESS:K3按下 |
|||
KEY4_PRESS:K4按下 |
|||
KEY_UNPRESS:未有按键按下 |
|||
*******************************************************************************/ |
|||
u8 key_scan(u8 mode) |
|||
{ |
|||
static u8 key=1; |
|||
|
|||
if(mode)key=1;//连续扫描按键
|
|||
if(key==1&&(KEY1==0||KEY2==0||KEY3==0||KEY4==0))//任意按键按下
|
|||
{ |
|||
delay_10us(1000);//消抖
|
|||
key=0; |
|||
if(KEY1==0) |
|||
return KEY1_PRESS; |
|||
else if(KEY2==0) |
|||
return KEY2_PRESS; |
|||
else if(KEY3==0) |
|||
return KEY3_PRESS; |
|||
else if(KEY4==0) |
|||
return KEY4_PRESS; |
|||
} |
|||
else if(KEY1==1&&KEY2==1&&KEY3==1&&KEY4==1) //无按键按下
|
|||
{ |
|||
key=1; |
|||
} |
|||
return KEY_UNPRESS; |
|||
} |
|||
|
|||
#endif |
@ -0,0 +1,39 @@ |
|||
#ifndef _public_H |
|||
#define _public_H |
|||
|
|||
#include "reg51.h" |
|||
|
|||
typedef unsigned int u16; //对系统默认数据类型进行重定义
|
|||
typedef unsigned char u8; |
|||
typedef unsigned long u32; |
|||
|
|||
//函数声明
|
|||
void delay_10us(u16 ten_us); |
|||
void delay_ms(u16 ms); |
|||
|
|||
/*******************************************************************************
|
|||
* 函 数 名 : delay_10us |
|||
* 函数功能 : 延时函数,ten_us=1时,大约延时10us |
|||
* 输 入 : ten_us |
|||
* 输 出 : 无 |
|||
*******************************************************************************/ |
|||
void delay_10us(u16 ten_us) |
|||
{ |
|||
while(ten_us--); |
|||
} |
|||
|
|||
/*******************************************************************************
|
|||
* 函 数 名 : delay_ms |
|||
* 函数功能 : ms延时函数,ms=1时,大约延时1ms |
|||
* 输 入 : ms:ms延时时间 |
|||
* 输 出 : 无 |
|||
*******************************************************************************/ |
|||
void delay_ms(u16 ms) |
|||
{ |
|||
u16 i,j; |
|||
for(i=ms;i>0;i--) |
|||
for(j=110;j>0;j--); |
|||
} |
|||
|
|||
|
|||
#endif |
@ -0,0 +1,43 @@ |
|||
#ifndef _timer_H |
|||
#define _timer_H |
|||
|
|||
#include "public.h" |
|||
|
|||
void timer0_init(u8 tmod, u8 th0, u8 tl0); |
|||
void timer0_reset(u8 th0, u8 tl0); |
|||
void timer1_init(u8 tmod, u8 th0, u8 tl0); |
|||
void timer1_reset(u8 th0, u8 tl0); |
|||
|
|||
void timer0_init(u8 tmod, u8 th0, u8 tl0) |
|||
{ |
|||
TMOD=(TMOD&0xF0)|(tmod&0x0F);//选择为定时器0模式
|
|||
TH0=th0; |
|||
TL0=tl0; |
|||
ET0=1;//打开定时器0中断允许
|
|||
EA=1;//打开总中断
|
|||
TR0=1; |
|||
} |
|||
|
|||
void timer0_reset(u8 th0, u8 tl0) |
|||
{ |
|||
TH0=th0; |
|||
TL0=tl0; |
|||
} |
|||
|
|||
void timer1_init(u8 tmod, u8 th1, u8 tl1) |
|||
{ |
|||
TMOD=(TMOD&0x0F)|(tmod&0xF0);//选择为定时器1模式
|
|||
TH1=th1; |
|||
TL1=tl1; |
|||
ET1=1;//打开定时器0中断允许
|
|||
EA=1;//打开总中断
|
|||
TR1=1;//打开定时器
|
|||
} |
|||
|
|||
void timer1_reset(u8 th1, u8 tl1) |
|||
{ |
|||
TH1=th1; |
|||
TL1=tl1; |
|||
} |
|||
|
|||
#endif |
@ -0,0 +1,263 @@ |
|||
C51 COMPILER V9.57.0.0 MAIN 06/14/2022 09:14:54 PAGE 1 |
|||
|
|||
|
|||
C51 COMPILER V9.57.0.0, COMPILATION OF MODULE MAIN |
|||
OBJECT MODULE PLACED IN .\Objects\main.obj |
|||
COMPILER INVOKED BY: C:\Keil_v5\C51\BIN\C51.EXE Main\main.c LARGE OPTIMIZE(8,SPEED) BROWSE INCDIR(.\Includes) DEBUG OBJE |
|||
-CTEXTEND PRINT(.\Listings\main.lst) TABS(2) OBJECT(.\Objects\main.obj) |
|||
|
|||
line level source |
|||
|
|||
1 #include "public.h" |
|||
2 #include "key.h" |
|||
3 #include "stdio.h" |
|||
4 #include "timer.h" |
|||
5 |
|||
6 //定义74HC595控制管脚 |
|||
7 sbit SRCLK=P3^6; //移位寄存器时钟输入 |
|||
8 sbit RCLK=P3^5; //存储寄存器时钟输入 |
|||
9 sbit SER=P3^4; //串行数据输入 |
|||
10 |
|||
11 #define LEDDZ_COL_PORT P0 //点阵列控制端口 |
|||
12 |
|||
13 u8 death[8]={0x00,0x38,0x6e,0x7c,0x7c,0x6e,0x38,0x00}; |
|||
14 |
|||
15 u8 gled_col[8]={0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe};//LED点阵显示图像的列数据 |
|||
16 u8 map[8] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; |
|||
17 u8 step[4][2] = {{1,0},{0,1},{-1,0},{0,-1}}; |
|||
18 |
|||
19 |
|||
20 u8 queue_x[65]; |
|||
21 u8 queue_y[65]; |
|||
22 u8 leader=0; |
|||
23 u8 tail=0; |
|||
24 u8 length=0; |
|||
25 |
|||
26 u8 act=0; |
|||
27 u8 game_over=0; |
|||
28 u8 turn=0; |
|||
29 |
|||
30 u8 direction=0; |
|||
31 u8 head_x = 3; |
|||
32 u8 head_y = 3; |
|||
33 |
|||
34 u8 apple_x=4; |
|||
35 u8 apple_y=4; |
|||
36 |
|||
37 u8 timer = 0; |
|||
38 |
|||
39 u8 i; |
|||
40 u8 j; |
|||
41 /******************************************************************************* |
|||
42 * 函 数 名 : hc595_write_data(u8 dat) |
|||
43 * 函数功能 : 向74HC595写入一个字节的数据 |
|||
44 * 输 入 : dat:数据 |
|||
45 * 输 出 : 无 |
|||
46 *******************************************************************************/ |
|||
47 |
|||
48 void display(u8 x, u8 y) |
|||
49 { |
|||
50 1 u8 one = 0x01; |
|||
51 1 map[x] = map[x] + (one<<y); |
|||
52 1 } |
|||
53 |
|||
54 void del(u8 x, u8 y) |
|||
C51 COMPILER V9.57.0.0 MAIN 06/14/2022 09:14:54 PAGE 2 |
|||
|
|||
55 { |
|||
56 1 u8 one = 0x01; |
|||
57 1 map[x] = map[x] - (one<<y); |
|||
58 1 } |
|||
59 |
|||
60 void push(u8 x, u8 y) |
|||
61 { |
|||
62 1 leader++; |
|||
63 1 length++; |
|||
64 1 leader %= 65; |
|||
65 1 queue_x[leader] = x; |
|||
66 1 queue_y[leader] = y; |
|||
67 1 display(x,y); |
|||
68 1 } |
|||
69 |
|||
70 void pop() |
|||
71 { |
|||
72 1 u8 one = 0x01; |
|||
73 1 tail++; |
|||
74 1 length--; |
|||
75 1 tail %= 65; |
|||
76 1 del(queue_x[tail], queue_y[tail]); |
|||
77 1 } |
|||
78 |
|||
79 |
|||
80 |
|||
81 void hc595_write_data(u8 dat) |
|||
82 { |
|||
83 1 u8 i=0; |
|||
84 1 for(i=0;i<8;i++)//循环8次即可将一个字节写入寄存器中 |
|||
85 1 { |
|||
86 2 SER=dat>>7;//优先传输一个字节中的高位 |
|||
87 2 dat<<=1;//将低位移动到高位 |
|||
88 2 SRCLK=0; |
|||
89 2 delay_10us(1); |
|||
90 2 SRCLK=1; |
|||
91 2 delay_10us(1);//移位寄存器时钟上升沿将端口数据送入寄存器中 |
|||
92 2 } |
|||
93 1 RCLK=0; |
|||
94 1 delay_10us(1); |
|||
95 1 RCLK=1;//存储寄存器时钟上升沿将前面写入到寄存器的数据输出 |
|||
96 1 } |
|||
97 |
|||
98 void show(u8 gled_row[8]) |
|||
99 { |
|||
100 1 u8 i=0; |
|||
101 1 for(i=0;i<8;i++)//循环8次扫描8行、列 |
|||
102 1 { |
|||
103 2 LEDDZ_COL_PORT=gled_col[i];//传送列选数据 |
|||
104 2 hc595_write_data(gled_row[i]);//传送行选数据 |
|||
105 2 delay_10us(100);//延时一段时间,等待显示稳定 |
|||
106 2 hc595_write_data(0x00);//消影 |
|||
107 2 } |
|||
108 1 } |
|||
109 |
|||
110 void monitor_key() |
|||
111 { |
|||
112 1 u8 key=key_scan(0); |
|||
113 1 if(key==KEY1_PRESS) |
|||
114 1 { |
|||
115 2 turn = 1; |
|||
116 2 } |
|||
C51 COMPILER V9.57.0.0 MAIN 06/14/2022 09:14:54 PAGE 3 |
|||
|
|||
117 1 else if(key==KEY2_PRESS) |
|||
118 1 { |
|||
119 2 turn = 3; |
|||
120 2 } |
|||
121 1 else if(key==KEY3_PRESS) |
|||
122 1 { |
|||
123 2 |
|||
124 2 } |
|||
125 1 else if(key==KEY4_PRESS) |
|||
126 1 { |
|||
127 2 |
|||
128 2 } |
|||
129 1 } |
|||
130 |
|||
131 void timer0() interrupt 1 |
|||
132 { |
|||
133 1 timer0_reset(0x4c,0x00); |
|||
134 1 timer++; |
|||
135 1 if(timer==15) |
|||
136 1 { |
|||
137 2 timer = 0; |
|||
138 2 act=1; |
|||
139 2 } |
|||
140 1 } |
|||
141 |
|||
142 void rand_apple() |
|||
143 { |
|||
144 1 u8 k; |
|||
145 1 u8 rand=TL0%(64-length); |
|||
146 1 u8 count = 0; |
|||
147 1 u8 over = 0; |
|||
148 1 for(i=0;i<8;i++) |
|||
149 1 { |
|||
150 2 for(j=0;j<8;j++) |
|||
151 2 { |
|||
152 3 k = tail; |
|||
153 3 over = 0; |
|||
154 3 while(k != leader){ |
|||
155 4 k = (k+1)%65; |
|||
156 4 if(i == queue_x[k] && j == queue_y[k]) |
|||
157 4 { |
|||
158 5 over = 1; |
|||
159 5 } |
|||
160 4 } |
|||
161 3 if(over == 0)// over == 0 but not run rightly |
|||
162 3 { |
|||
163 4 if(count == rand) |
|||
164 4 { |
|||
165 5 apple_x = i; |
|||
166 5 apple_y = j; |
|||
167 5 return; |
|||
168 5 } |
|||
169 4 count++; |
|||
170 4 } |
|||
171 3 } |
|||
172 2 } |
|||
173 1 } |
|||
174 |
|||
175 void main() |
|||
176 { |
|||
177 1 u8 i=0; |
|||
178 1 timer0_init(0x01,0x4c,0x00); |
|||
C51 COMPILER V9.57.0.0 MAIN 06/14/2022 09:14:54 PAGE 4 |
|||
|
|||
179 1 push(head_x,head_y); |
|||
180 1 rand_apple(); |
|||
181 1 display(apple_x, apple_y); |
|||
182 1 while(1) |
|||
183 1 { |
|||
184 2 monitor_key(); |
|||
185 2 if(act && game_over == 0){ |
|||
186 3 direction += turn; |
|||
187 3 direction %= 4; |
|||
188 3 head_x += step[direction][0]; |
|||
189 3 head_y += step[direction][1]; |
|||
190 3 if(head_x >=8 || head_x < 0 || head_y >= 8 || head_y < 0) |
|||
191 3 { |
|||
192 4 game_over = 1; |
|||
193 4 } |
|||
194 3 |
|||
195 3 i = tail; |
|||
196 3 while(i != leader){ |
|||
197 4 i = (i+1)%65; |
|||
198 4 if(head_x == queue_x[i] && head_y == queue_y[i]) |
|||
199 4 { |
|||
200 5 game_over = 1; |
|||
201 5 } |
|||
202 4 } |
|||
203 3 |
|||
204 3 if(game_over == 0) |
|||
205 3 { |
|||
206 4 if(head_x == apple_x && head_y == apple_y) |
|||
207 4 { |
|||
208 5 del(apple_x,apple_y); |
|||
209 5 rand_apple(); |
|||
210 5 display(apple_x,apple_y); |
|||
211 5 push(head_x,head_y); |
|||
212 5 } |
|||
213 4 else |
|||
214 4 { |
|||
215 5 push(head_x,head_y); |
|||
216 5 pop(); |
|||
217 5 } |
|||
218 4 } |
|||
219 3 turn = 0; |
|||
220 3 act = 0; |
|||
221 3 } |
|||
222 2 if(game_over) |
|||
223 2 { |
|||
224 3 show(death); |
|||
225 3 } |
|||
226 2 else |
|||
227 2 { |
|||
228 3 show(map); |
|||
229 3 } |
|||
230 2 } |
|||
231 1 } |
|||
|
|||
|
|||
MODULE INFORMATION: STATIC OVERLAYABLE |
|||
CODE SIZE = 1063 ---- |
|||
CONSTANT SIZE = ---- ---- |
|||
XDATA SIZE = 177 7 |
|||
PDATA SIZE = ---- ---- |
|||
DATA SIZE = ---- ---- |
|||
IDATA SIZE = ---- ---- |
|||
C51 COMPILER V9.57.0.0 MAIN 06/14/2022 09:14:54 PAGE 5 |
|||
|
|||
BIT SIZE = ---- ---- |
|||
END OF MODULE INFORMATION. |
|||
|
|||
|
|||
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S) |
@ -0,0 +1,534 @@ |
|||
BL51 BANKED LINKER/LOCATER V6.22.2.0 06/14/2022 09:14:54 PAGE 1 |
|||
|
|||
|
|||
BL51 BANKED LINKER/LOCATER V6.22.2.0, INVOKED BY: |
|||
C:\KEIL_V5\C51\BIN\BL51.EXE .\Objects\main.obj TO .\Objects\snake PRINT (.\Listings\snake.m51) RAMSIZE (256) |
|||
|
|||
|
|||
MEMORY MODEL: LARGE |
|||
|
|||
|
|||
INPUT MODULES INCLUDED: |
|||
.\Objects\main.obj (MAIN) |
|||
C:\KEIL_V5\C51\LIB\C51L.LIB (?C_STARTUP) |
|||
C:\KEIL_V5\C51\LIB\C51L.LIB (?C?CLDOPTR) |
|||
C:\KEIL_V5\C51\LIB\C51L.LIB (?C?UIDIV) |
|||
C:\KEIL_V5\C51\LIB\C51L.LIB (?C_INIT) |
|||
|
|||
|
|||
LINK MAP OF MODULE: .\Objects\snake (MAIN) |
|||
|
|||
|
|||
TYPE BASE LENGTH RELOCATION SEGMENT NAME |
|||
----------------------------------------------------- |
|||
|
|||
* * * * * * * D A T A M E M O R Y * * * * * * * |
|||
REG 0000H 0008H ABSOLUTE "REG BANK 0" |
|||
IDATA 0008H 0001H UNIT ?STACK |
|||
|
|||
* * * * * * * X D A T A M E M O R Y * * * * * * * |
|||
XDATA 0000H 00B1H UNIT ?XD?MAIN |
|||
XDATA 00B1H 0005H UNIT _XDATA_GROUP_ |
|||
|
|||
* * * * * * * C O D E M E M O R Y * * * * * * * |
|||
CODE 0000H 0003H ABSOLUTE |
|||
CODE 0003H 0007H UNIT ?PR?_TIMER0_RESET?MAIN |
|||
000AH 0001H *** GAP *** |
|||
CODE 000BH 0003H ABSOLUTE |
|||
CODE 000EH 0136H UNIT ?PR?MAIN?MAIN |
|||
CODE 0144H 00A2H UNIT ?PR?RAND_APPLE?MAIN |
|||
CODE 01E6H 008CH UNIT ?C_C51STARTUP |
|||
CODE 0272H 0082H UNIT ?C?LIB_CODE |
|||
CODE 02F4H 0061H UNIT ?C_INITSEG |
|||
CODE 0355H 0056H UNIT ?PR?_KEY_SCAN?MAIN |
|||
CODE 03ABH 0050H UNIT ?PR?_SHOW?MAIN |
|||
CODE 03FBH 003DH UNIT ?PR?_PUSH?MAIN |
|||
CODE 0438H 0039H UNIT ?PR?POP?MAIN |
|||
CODE 0471H 0034H UNIT ?PR?TIMER0?MAIN |
|||
CODE 04A5H 002AH UNIT ?PR?_HC595_WRITE_DATA?MAIN |
|||
CODE 04CFH 0026H UNIT ?PR?_DEL?MAIN |
|||
CODE 04F5H 0025H UNIT ?PR?_DISPLAY?MAIN |
|||
CODE 051AH 001EH UNIT ?PR?_DELAY_MS?MAIN |
|||
CODE 0538H 001BH UNIT ?PR?MONITOR_KEY?MAIN |
|||
CODE 0553H 001AH UNIT ?PR?_TIMER0_INIT?MAIN |
|||
CODE 056DH 001AH UNIT ?PR?_TIMER1_INIT?MAIN |
|||
CODE 0587H 000FH UNIT ?PR?_DELAY_10US?MAIN |
|||
CODE 0596H 0007H UNIT ?PR?_TIMER1_RESET?MAIN |
|||
|
|||
|
|||
|
|||
OVERLAY MAP OF MODULE: .\Objects\snake (MAIN) |
|||
|
|||
BL51 BANKED LINKER/LOCATER V6.22.2.0 06/14/2022 09:14:54 PAGE 2 |
|||
|
|||
|
|||
|
|||
SEGMENT XDATA_GROUP |
|||
+--> CALLED SEGMENT START LENGTH |
|||
-------------------------------------------------- |
|||
?PR?TIMER0?MAIN ----- ----- |
|||
+--> ?PR?_TIMER0_RESET?MAIN |
|||
|
|||
*** NEW ROOT *************************************************** |
|||
|
|||
?C_C51STARTUP ----- ----- |
|||
+--> ?PR?MAIN?MAIN |
|||
+--> ?C_INITSEG |
|||
|
|||
?PR?MAIN?MAIN 00B1H 0001H |
|||
+--> ?PR?_TIMER0_INIT?MAIN |
|||
+--> ?PR?_PUSH?MAIN |
|||
+--> ?PR?RAND_APPLE?MAIN |
|||
+--> ?PR?_DISPLAY?MAIN |
|||
+--> ?PR?MONITOR_KEY?MAIN |
|||
+--> ?PR?_DEL?MAIN |
|||
+--> ?PR?POP?MAIN |
|||
+--> ?PR?_SHOW?MAIN |
|||
|
|||
?PR?_PUSH?MAIN ----- ----- |
|||
+--> ?PR?_DISPLAY?MAIN |
|||
|
|||
?PR?RAND_APPLE?MAIN 00B2H 0001H |
|||
|
|||
?PR?MONITOR_KEY?MAIN ----- ----- |
|||
+--> ?PR?_KEY_SCAN?MAIN |
|||
|
|||
?PR?_KEY_SCAN?MAIN ----- ----- |
|||
+--> ?PR?_DELAY_10US?MAIN |
|||
|
|||
?PR?POP?MAIN 00B2H 0001H |
|||
+--> ?PR?_DEL?MAIN |
|||
|
|||
?PR?_SHOW?MAIN 00B2H 0004H |
|||
+--> ?PR?_HC595_WRITE_DATA?MAIN |
|||
+--> ?PR?_DELAY_10US?MAIN |
|||
|
|||
?PR?_HC595_WRITE_DATA?MAIN ----- ----- |
|||
+--> ?PR?_DELAY_10US?MAIN |
|||
|
|||
|
|||
|
|||
SYMBOL TABLE OF MODULE: .\Objects\snake (MAIN) |
|||
|
|||
VALUE TYPE NAME |
|||
---------------------------------- |
|||
|
|||
------- MODULE MAIN |
|||
C:0000H SYMBOL _ICE_DUMMY_ |
|||
D:0080H PUBLIC P0 |
|||
X:0001H PUBLIC queue_x |
|||
B:00B0H.6 PUBLIC SRCLK |
|||
X:0042H PUBLIC queue_y |
|||
BL51 BANKED LINKER/LOCATER V6.22.2.0 06/14/2022 09:14:54 PAGE 3 |
|||
|
|||
|
|||
D:00B0H PUBLIC P3 |
|||
X:0083H PUBLIC length |
|||
B:00A8H.7 PUBLIC EA |
|||
X:0084H PUBLIC death |
|||
B:00B0H.1 PUBLIC KEY1 |
|||
B:00B0H.0 PUBLIC KEY2 |
|||
C:0144H PUBLIC rand_apple |
|||
B:00B0H.2 PUBLIC KEY3 |
|||
B:00B0H.3 PUBLIC KEY4 |
|||
X:008CH PUBLIC timer |
|||
C:000EH PUBLIC main |
|||
X:008DH PUBLIC tail |
|||
B:00B0H.5 PUBLIC RCLK |
|||
D:0089H PUBLIC TMOD |
|||
C:04CFH PUBLIC _del |
|||
C:0538H PUBLIC monitor_key |
|||
X:008EH PUBLIC act |
|||
X:008FH PUBLIC game_over |
|||
C:058BH PUBLIC _delay_10us |
|||
X:0090H PUBLIC step |
|||
X:0098H PUBLIC gled_col |
|||
X:00A0H PUBLIC map |
|||
C:0405H PUBLIC _push |
|||
C:03ABH PUBLIC _show |
|||
X:00A8H PUBLIC direction |
|||
B:00A8H.1 PUBLIC ET0 |
|||
B:00A8H.3 PUBLIC ET1 |
|||
X:00A9H PUBLIC turn |
|||
D:008CH PUBLIC TH0 |
|||
D:008DH PUBLIC TH1 |
|||
C:0438H PUBLIC pop |
|||
D:008AH PUBLIC TL0 |
|||
D:008BH PUBLIC TL1 |
|||
C:0355H PUBLIC _key_scan |
|||
C:051AH PUBLIC _delay_ms |
|||
C:0471H PUBLIC timer0 |
|||
B:0088H.4 PUBLIC TR0 |
|||
B:0088H.6 PUBLIC TR1 |
|||
C:0003H PUBLIC _timer0_reset |
|||
C:0596H PUBLIC _timer1_reset |
|||
X:00AAH PUBLIC i |
|||
X:00ABH PUBLIC j |
|||
B:00B0H.4 PUBLIC SER |
|||
C:0553H PUBLIC _timer0_init |
|||
X:00ACH PUBLIC head_x |
|||
C:056DH PUBLIC _timer1_init |
|||
X:00ADH PUBLIC apple_x |
|||
X:00AEH PUBLIC head_y |
|||
X:00AFH PUBLIC apple_y |
|||
X:00B0H PUBLIC leader |
|||
C:04FFH PUBLIC _display |
|||
C:04A5H PUBLIC _hc595_write_data |
|||
C:0587H SYMBOL L?0087 |
|||
------- PROC L?0086 |
|||
------- ENDPROC L?0086 |
|||
C:0587H SYMBOL L?0087 |
|||
------- PROC _DELAY_10US |
|||
BL51 BANKED LINKER/LOCATER V6.22.2.0 06/14/2022 09:14:54 PAGE 4 |
|||
|
|||
|
|||
D:0006H SYMBOL ten_us |
|||
C:058BH LINE# 20 |
|||
C:058BH LINE# 21 |
|||
C:058BH LINE# 22 |
|||
C:0595H LINE# 23 |
|||
------- ENDPROC _DELAY_10US |
|||
------- PROC _DELAY_MS |
|||
D:0006H SYMBOL ms |
|||
------- DO |
|||
D:0006H SYMBOL i |
|||
D:0004H SYMBOL j |
|||
------- ENDDO |
|||
C:051AH LINE# 31 |
|||
C:051AH LINE# 32 |
|||
C:051AH LINE# 34 |
|||
C:0523H LINE# 35 |
|||
C:0537H LINE# 36 |
|||
------- ENDPROC _DELAY_MS |
|||
------- PROC _KEY_SCAN |
|||
D:0007H SYMBOL mode |
|||
------- DO |
|||
X:0000H SYMBOL key |
|||
------- ENDDO |
|||
C:0355H LINE# 34 |
|||
C:0355H LINE# 35 |
|||
C:0355H LINE# 38 |
|||
C:035EH LINE# 39 |
|||
C:0372H LINE# 40 |
|||
C:0372H LINE# 41 |
|||
C:0379H LINE# 42 |
|||
C:037EH LINE# 43 |
|||
C:0381H LINE# 44 |
|||
C:0384H LINE# 45 |
|||
C:0387H LINE# 46 |
|||
C:038AH LINE# 47 |
|||
C:038DH LINE# 48 |
|||
C:0390H LINE# 49 |
|||
C:0393H LINE# 50 |
|||
C:0396H LINE# 51 |
|||
C:0396H LINE# 52 |
|||
C:03A2H LINE# 53 |
|||
C:03A2H LINE# 54 |
|||
C:03A8H LINE# 55 |
|||
C:03A8H LINE# 56 |
|||
C:03AAH LINE# 57 |
|||
------- ENDPROC _KEY_SCAN |
|||
------- PROC _TIMER0_INIT |
|||
D:0007H SYMBOL tmod |
|||
D:0005H SYMBOL th0 |
|||
D:0003H SYMBOL tl0 |
|||
C:0553H LINE# 11 |
|||
C:0553H LINE# 12 |
|||
C:0553H LINE# 13 |
|||
C:055EH LINE# 14 |
|||
C:0562H LINE# 15 |
|||
C:0566H LINE# 16 |
|||
C:0568H LINE# 17 |
|||
BL51 BANKED LINKER/LOCATER V6.22.2.0 06/14/2022 09:14:54 PAGE 5 |
|||
|
|||
|
|||
C:056AH LINE# 18 |
|||
C:056CH LINE# 19 |
|||
------- ENDPROC _TIMER0_INIT |
|||
------- PROC _TIMER0_RESET |
|||
D:0007H SYMBOL th0 |
|||
D:0005H SYMBOL tl0 |
|||
C:0003H LINE# 21 |
|||
C:0003H LINE# 22 |
|||
C:0003H LINE# 23 |
|||
C:0005H LINE# 24 |
|||
C:0009H LINE# 25 |
|||
------- ENDPROC _TIMER0_RESET |
|||
------- PROC _TIMER1_INIT |
|||
D:0007H SYMBOL tmod |
|||
D:0005H SYMBOL th1 |
|||
D:0003H SYMBOL tl1 |
|||
C:056DH LINE# 27 |
|||
C:056DH LINE# 28 |
|||
C:056DH LINE# 29 |
|||
C:0578H LINE# 30 |
|||
C:057CH LINE# 31 |
|||
C:0580H LINE# 32 |
|||
C:0582H LINE# 33 |
|||
C:0584H LINE# 34 |
|||
C:0586H LINE# 35 |
|||
------- ENDPROC _TIMER1_INIT |
|||
------- PROC _TIMER1_RESET |
|||
D:0007H SYMBOL th1 |
|||
D:0005H SYMBOL tl1 |
|||
C:0596H LINE# 37 |
|||
C:0596H LINE# 38 |
|||
C:0596H LINE# 39 |
|||
C:0598H LINE# 40 |
|||
C:059CH LINE# 41 |
|||
------- ENDPROC _TIMER1_RESET |
|||
------- PROC L?0085 |
|||
------- ENDPROC L?0085 |
|||
------- PROC _DISPLAY |
|||
D:0007H SYMBOL x |
|||
D:0005H SYMBOL y |
|||
------- DO |
|||
D:0006H SYMBOL one |
|||
------- ENDDO |
|||
C:04FFH LINE# 48 |
|||
C:04FFH LINE# 49 |
|||
C:04FFH LINE# 50 |
|||
C:0501H LINE# 51 |
|||
C:0519H LINE# 52 |
|||
------- ENDPROC _DISPLAY |
|||
------- PROC _DEL |
|||
D:0007H SYMBOL x |
|||
D:0005H SYMBOL y |
|||
------- DO |
|||
D:0006H SYMBOL one |
|||
------- ENDDO |
|||
C:04CFH LINE# 54 |
|||
C:04CFH LINE# 55 |
|||
BL51 BANKED LINKER/LOCATER V6.22.2.0 06/14/2022 09:14:54 PAGE 6 |
|||
|
|||
|
|||
C:04CFH LINE# 56 |
|||
C:04D1H LINE# 57 |
|||
C:04F4H LINE# 58 |
|||
------- ENDPROC _DEL |
|||
C:0400H SYMBOL L?0084 |
|||
------- PROC L?0083 |
|||
------- ENDPROC L?0083 |
|||
C:0400H SYMBOL L?0084 |
|||
------- PROC _PUSH |
|||
D:0007H SYMBOL x |
|||
D:0005H SYMBOL y |
|||
C:0405H LINE# 60 |
|||
C:0405H LINE# 61 |
|||
C:0405H LINE# 62 |
|||
C:040BH LINE# 63 |
|||
C:0411H LINE# 64 |
|||
C:041CH LINE# 65 |
|||
C:0429H LINE# 66 |
|||
C:0435H LINE# 67 |
|||
------- ENDPROC _PUSH |
|||
------- PROC POP |
|||
------- DO |
|||
X:00B2H SYMBOL one |
|||
------- ENDDO |
|||
C:0438H LINE# 70 |
|||
C:0438H LINE# 71 |
|||
C:0438H LINE# 72 |
|||
C:043EH LINE# 73 |
|||
C:0444H LINE# 74 |
|||
C:044AH LINE# 75 |
|||
C:0455H LINE# 76 |
|||
------- ENDPROC POP |
|||
------- PROC _HC595_WRITE_DATA |
|||
D:0005H SYMBOL dat |
|||
------- DO |
|||
D:0003H SYMBOL i |
|||
------- ENDDO |
|||
C:04A5H LINE# 81 |
|||
C:04A7H LINE# 82 |
|||
C:04A7H LINE# 83 |
|||
C:04A9H LINE# 84 |
|||
C:04A9H LINE# 85 |
|||
C:04A9H LINE# 86 |
|||
C:04B4H LINE# 87 |
|||
C:04B8H LINE# 88 |
|||
C:04BAH LINE# 89 |
|||
C:04BDH LINE# 90 |
|||
C:04BFH LINE# 91 |
|||
C:04C2H LINE# 92 |
|||
C:04C7H LINE# 93 |
|||
C:04C9H LINE# 94 |
|||
C:04CCH LINE# 95 |
|||
C:04CEH LINE# 96 |
|||
------- ENDPROC _HC595_WRITE_DATA |
|||
------- PROC _SHOW |
|||
X:00B2H SYMBOL gled_row |
|||
------- DO |
|||
BL51 BANKED LINKER/LOCATER V6.22.2.0 06/14/2022 09:14:54 PAGE 7 |
|||
|
|||
|
|||
X:00B5H SYMBOL i |
|||
------- ENDDO |
|||
C:03ABH LINE# 98 |
|||
C:03B6H LINE# 99 |
|||
C:03B6H LINE# 100 |
|||
C:03B9H LINE# 101 |
|||
C:03BAH LINE# 102 |
|||
C:03BAH LINE# 103 |
|||
C:03CBH LINE# 104 |
|||
C:03E2H LINE# 105 |
|||
C:03E9H LINE# 106 |
|||
C:03EEH LINE# 107 |
|||
C:03FAH LINE# 108 |
|||
------- ENDPROC _SHOW |
|||
------- PROC MONITOR_KEY |
|||
------- DO |
|||
D:0007H SYMBOL key |
|||
------- ENDDO |
|||
C:0538H LINE# 110 |
|||
C:0538H LINE# 111 |
|||
C:0538H LINE# 112 |
|||
C:053DH LINE# 113 |
|||
C:0541H LINE# 114 |
|||
C:0541H LINE# 115 |
|||
C:0547H LINE# 116 |
|||
C:0548H LINE# 117 |
|||
C:054CH LINE# 118 |
|||
C:054CH LINE# 119 |
|||
C:0552H LINE# 120 |
|||
C:0552H LINE# 121 |
|||
C:0552H LINE# 122 |
|||
C:0552H LINE# 124 |
|||
C:0552H LINE# 125 |
|||
C:0552H LINE# 126 |
|||
C:0552H LINE# 128 |
|||
C:0552H LINE# 129 |
|||
------- ENDPROC MONITOR_KEY |
|||
------- PROC TIMER0 |
|||
C:0471H LINE# 131 |
|||
C:0480H LINE# 133 |
|||
C:0487H LINE# 134 |
|||
C:048DH LINE# 135 |
|||
C:0491H LINE# 136 |
|||
C:0491H LINE# 137 |
|||
C:0493H LINE# 138 |
|||
C:0498H LINE# 139 |
|||
C:0498H LINE# 140 |
|||
------- ENDPROC TIMER0 |
|||
------- PROC RAND_APPLE |
|||
------- DO |
|||
D:0007H SYMBOL k |
|||
X:00B2H SYMBOL rand |
|||
D:0003H SYMBOL count |
|||
D:0002H SYMBOL over |
|||
------- ENDDO |
|||
C:0144H LINE# 142 |
|||
C:0144H LINE# 143 |
|||
BL51 BANKED LINKER/LOCATER V6.22.2.0 06/14/2022 09:14:54 PAGE 8 |
|||
|
|||
|
|||
C:0144H LINE# 145 |
|||
C:0160H LINE# 146 |
|||
C:0162H LINE# 147 |
|||
C:0162H LINE# 148 |
|||
C:0166H LINE# 149 |
|||
C:0166H LINE# 150 |
|||
C:016BH LINE# 151 |
|||
C:016BH LINE# 152 |
|||
C:0170H LINE# 153 |
|||
C:0172H LINE# 154 |
|||
C:0179H LINE# 155 |
|||
C:0189H LINE# 156 |
|||
C:01AFH LINE# 157 |
|||
C:01AFH LINE# 158 |
|||
C:01B1H LINE# 159 |
|||
C:01B1H LINE# 160 |
|||
C:01B3H LINE# 161 |
|||
C:01B6H LINE# 162 |
|||
C:01B6H LINE# 163 |
|||
C:01BDH LINE# 164 |
|||
C:01BDH LINE# 165 |
|||
C:01C5H LINE# 166 |
|||
C:01CEH LINE# 168 |
|||
C:01CEH LINE# 169 |
|||
C:01CFH LINE# 170 |
|||
C:01CFH LINE# 171 |
|||
C:01DAH LINE# 172 |
|||
C:01E5H LINE# 173 |
|||
------- ENDPROC RAND_APPLE |
|||
------- PROC MAIN |
|||
------- DO |
|||
X:00B1H SYMBOL i |
|||
------- ENDDO |
|||
C:000EH LINE# 175 |
|||
C:000EH LINE# 176 |
|||
C:000EH LINE# 177 |
|||
C:0013H LINE# 178 |
|||
C:001BH LINE# 179 |
|||
C:001EH LINE# 180 |
|||
C:0021H LINE# 181 |
|||
C:0024H LINE# 182 |
|||
C:0024H LINE# 183 |
|||
C:0024H LINE# 184 |
|||
C:0027H LINE# 185 |
|||
C:0037H LINE# 186 |
|||
C:0042H LINE# 187 |
|||
C:0046H LINE# 188 |
|||
C:005BH LINE# 189 |
|||
C:006FH LINE# 190 |
|||
C:008EH LINE# 191 |
|||
C:008EH LINE# 192 |
|||
C:0094H LINE# 193 |
|||
C:0094H LINE# 195 |
|||
C:009CH LINE# 196 |
|||
C:00A9H LINE# 197 |
|||
C:00B9H LINE# 198 |
|||
C:00E0H LINE# 199 |
|||
BL51 BANKED LINKER/LOCATER V6.22.2.0 06/14/2022 09:14:54 PAGE 9 |
|||
|
|||
|
|||
C:00E0H LINE# 200 |
|||
C:00E6H LINE# 201 |
|||
C:00E6H LINE# 202 |
|||
C:00E8H LINE# 204 |
|||
C:00EEH LINE# 205 |
|||
C:00EEH LINE# 206 |
|||
C:0107H LINE# 207 |
|||
C:0107H LINE# 208 |
|||
C:010AH LINE# 209 |
|||
C:010DH LINE# 210 |
|||
C:0110H LINE# 211 |
|||
C:0113H LINE# 212 |
|||
C:0115H LINE# 214 |
|||
C:0115H LINE# 215 |
|||
C:011AH LINE# 216 |
|||
C:011DH LINE# 217 |
|||
C:011DH LINE# 218 |
|||
C:011DH LINE# 219 |
|||
C:0122H LINE# 220 |
|||
C:0126H LINE# 221 |
|||
C:0126H LINE# 222 |
|||
C:012CH LINE# 223 |
|||
C:012CH LINE# 224 |
|||
C:0135H LINE# 225 |
|||
C:0138H LINE# 227 |
|||
C:0138H LINE# 228 |
|||
C:0141H LINE# 229 |
|||
C:0141H LINE# 230 |
|||
------- ENDPROC MAIN |
|||
------- ENDMOD MAIN |
|||
|
|||
------- MODULE ?C?CLDOPTR |
|||
C:0272H PUBLIC ?C?CLDOPTR |
|||
------- ENDMOD ?C?CLDOPTR |
|||
|
|||
------- MODULE ?C?UIDIV |
|||
C:029FH PUBLIC ?C?UIDIV |
|||
------- ENDMOD ?C?UIDIV |
|||
|
|||
*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS |
|||
SEGMENT: ?PR?_DELAY_MS?MAIN |
|||
|
|||
*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS |
|||
SEGMENT: ?PR?_TIMER1_INIT?MAIN |
|||
|
|||
*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS |
|||
SEGMENT: ?PR?_TIMER1_RESET?MAIN |
|||
|
|||
Program Size: data=9.0 xdata=182 code=1436 |
|||
LINK/LOCATE RUN COMPLETE. 3 WARNING(S), 0 ERROR(S) |
@ -0,0 +1,231 @@ |
|||
#include "public.h" |
|||
#include "key.h" |
|||
#include "stdio.h" |
|||
#include "timer.h" |
|||
|
|||
//定义74HC595控制管脚
|
|||
sbit SRCLK=P3^6; //移位寄存器时钟输入
|
|||
sbit RCLK=P3^5; //存储寄存器时钟输入
|
|||
sbit SER=P3^4; //串行数据输入
|
|||
|
|||
#define LEDDZ_COL_PORT P0 //点阵列控制端口
|
|||
|
|||
u8 death[8]={0x00,0x38,0x6e,0x7c,0x7c,0x6e,0x38,0x00}; |
|||
|
|||
u8 gled_col[8]={0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe};//LED点阵显示图像的列数据
|
|||
u8 map[8] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; |
|||
u8 step[4][2] = {{1,0},{0,1},{-1,0},{0,-1}}; |
|||
|
|||
|
|||
u8 queue_x[65]; |
|||
u8 queue_y[65]; |
|||
u8 leader=0; |
|||
u8 tail=0; |
|||
u8 length=0; |
|||
|
|||
u8 act=0; |
|||
u8 game_over=0; |
|||
u8 turn=0; |
|||
|
|||
u8 direction=0; |
|||
u8 head_x = 3; |
|||
u8 head_y = 3; |
|||
|
|||
u8 apple_x=4; |
|||
u8 apple_y=4; |
|||
|
|||
u8 timer = 0; |
|||
|
|||
u8 i; |
|||
u8 j; |
|||
/*******************************************************************************
|
|||
* 函 数 名 : hc595_write_data(u8 dat) |
|||
* 函数功能 : 向74HC595写入一个字节的数据 |
|||
* 输 入 : dat:数据 |
|||
* 输 出 : 无 |
|||
*******************************************************************************/ |
|||
|
|||
void display(u8 x, u8 y) |
|||
{ |
|||
u8 one = 0x01; |
|||
map[x] = map[x] + (one<<y); |
|||
} |
|||
|
|||
void del(u8 x, u8 y) |
|||
{ |
|||
u8 one = 0x01; |
|||
map[x] = map[x] - (one<<y); |
|||
} |
|||
|
|||
void push(u8 x, u8 y) |
|||
{ |
|||
leader++; |
|||
length++; |
|||
leader %= 65; |
|||
queue_x[leader] = x; |
|||
queue_y[leader] = y; |
|||
display(x,y); |
|||
} |
|||
|
|||
void pop() |
|||
{ |
|||
u8 one = 0x01; |
|||
tail++; |
|||
length--; |
|||
tail %= 65; |
|||
del(queue_x[tail], queue_y[tail]); |
|||
} |
|||
|
|||
|
|||
|
|||
void hc595_write_data(u8 dat) |
|||
{ |
|||
u8 i=0; |
|||
for(i=0;i<8;i++)//循环8次即可将一个字节写入寄存器中
|
|||
{ |
|||
SER=dat>>7;//优先传输一个字节中的高位
|
|||
dat<<=1;//将低位移动到高位
|
|||
SRCLK=0; |
|||
delay_10us(1); |
|||
SRCLK=1; |
|||
delay_10us(1);//移位寄存器时钟上升沿将端口数据送入寄存器中
|
|||
} |
|||
RCLK=0; |
|||
delay_10us(1); |
|||
RCLK=1;//存储寄存器时钟上升沿将前面写入到寄存器的数据输出
|
|||
} |
|||
|
|||
void show(u8 gled_row[8]) |
|||
{ |
|||
u8 i=0; |
|||
for(i=0;i<8;i++)//循环8次扫描8行、列
|
|||
{ |
|||
LEDDZ_COL_PORT=gled_col[i];//传送列选数据
|
|||
hc595_write_data(gled_row[i]);//传送行选数据
|
|||
delay_10us(100);//延时一段时间,等待显示稳定
|
|||
hc595_write_data(0x00);//消影
|
|||
} |
|||
} |
|||
|
|||
void monitor_key() |
|||
{ |
|||
u8 key=key_scan(0); |
|||
if(key==KEY1_PRESS) |
|||
{ |
|||
turn = 1; |
|||
} |
|||
else if(key==KEY2_PRESS) |
|||
{ |
|||
turn = 3; |
|||
} |
|||
else if(key==KEY3_PRESS) |
|||
{ |
|||
|
|||
} |
|||
else if(key==KEY4_PRESS) |
|||
{ |
|||
|
|||
} |
|||
} |
|||
|
|||
void timer0() interrupt 1 |
|||
{ |
|||
timer0_reset(0x4c,0x00); |
|||
timer++; |
|||
if(timer==15) |
|||
{ |
|||
timer = 0; |
|||
act=1; |
|||
} |
|||
} |
|||
|
|||
void rand_apple() |
|||
{ |
|||
u8 k; |
|||
u8 rand=TL0%(64-length); |
|||
u8 count = 0; |
|||
u8 over = 0; |
|||
for(i=0;i<8;i++) |
|||
{ |
|||
for(j=0;j<8;j++) |
|||
{ |
|||
k = tail; |
|||
over = 0; |
|||
while(k != leader){ |
|||
k = (k+1)%65; |
|||
if(i == queue_x[k] && j == queue_y[k]) |
|||
{ |
|||
over = 1; |
|||
} |
|||
} |
|||
if(over == 0)// over == 0 but not run rightly
|
|||
{ |
|||
if(count == rand) |
|||
{ |
|||
apple_x = i; |
|||
apple_y = j; |
|||
return; |
|||
} |
|||
count++; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
void main() |
|||
{ |
|||
u8 i=0; |
|||
timer0_init(0x01,0x4c,0x00); |
|||
push(head_x,head_y); |
|||
rand_apple(); |
|||
display(apple_x, apple_y); |
|||
while(1) |
|||
{ |
|||
monitor_key(); |
|||
if(act && game_over == 0){ |
|||
direction += turn; |
|||
direction %= 4; |
|||
head_x += step[direction][0]; |
|||
head_y += step[direction][1]; |
|||
if(head_x >=8 || head_x < 0 || head_y >= 8 || head_y < 0) |
|||
{ |
|||
game_over = 1; |
|||
} |
|||
|
|||
i = tail; |
|||
while(i != leader){ |
|||
i = (i+1)%65; |
|||
if(head_x == queue_x[i] && head_y == queue_y[i]) |
|||
{ |
|||
game_over = 1; |
|||
} |
|||
} |
|||
|
|||
if(game_over == 0) |
|||
{ |
|||
if(head_x == apple_x && head_y == apple_y) |
|||
{ |
|||
del(apple_x,apple_y); |
|||
rand_apple(); |
|||
display(apple_x,apple_y); |
|||
push(head_x,head_y); |
|||
} |
|||
else |
|||
{ |
|||
push(head_x,head_y); |
|||
pop(); |
|||
} |
|||
} |
|||
turn = 0; |
|||
act = 0; |
|||
} |
|||
if(game_over) |
|||
{ |
|||
show(death); |
|||
} |
|||
else |
|||
{ |
|||
show(map); |
|||
} |
|||
} |
|||
} |
Binary file not shown.
@ -0,0 +1,43 @@ |
|||
<html> |
|||
<body> |
|||
<pre> |
|||
<h1>µVision Build Log</h1> |
|||
<h2>Tool Versions:</h2> |
|||
IDE-Version: ¦ÌVision V5.24.2.86 |
|||
Copyright (C) 2017 ARM Ltd and ARM Germany GmbH. All rights reserved. |
|||
License Information: leaf green, oair, LIC=3U39U-SKLG7-H1EPN-YJ8UA-X3RTS-RJMY6 |
|||
|
|||
Tool Versions: |
|||
Toolchain: MDK51 Professional Version: 9.57.0.0 |
|||
Toolchain Path: C:\Keil_v5\C51\BIN |
|||
C Compiler: C51.exe V9.57.0.0 |
|||
Assembler: A51.exe V8.2.7.0 |
|||
Linker/Locator: BL51.exe V6.22.2.0 |
|||
Library Manager: LIB51.exe V4.30.1.0 |
|||
Hex Converter: OH51.exe V2.7.0.0 |
|||
CPU DLL: S8051.DLL V3.113.0.0 |
|||
Dialog DLL: DP51.DLL V2.64.0.0 |
|||
Target DLL: MON51.DLL V2.47.0.0 |
|||
Dialog DLL: TP51.DLL V2.60.0.0 |
|||
|
|||
<h2>Project:</h2> |
|||
C:\Users\Simular\Desktop\snake\snake.uvproj |
|||
Project File Date: 06/13/2022 |
|||
|
|||
<h2>Output:</h2> |
|||
Rebuild target 'Target 1' |
|||
compiling main.c... |
|||
linking... |
|||
*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS |
|||
SEGMENT: ?PR?_DELAY_MS?MAIN |
|||
*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS |
|||
SEGMENT: ?PR?_TIMER1_INIT?MAIN |
|||
*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS |
|||
SEGMENT: ?PR?_TIMER1_RESET?MAIN |
|||
Program Size: data=9.0 xdata=182 code=1436 |
|||
creating hex file from ".\Objects\snake"... |
|||
".\Objects\snake" - 0 Error(s), 3 Warning(s). |
|||
Build Time Elapsed: 00:00:01 |
|||
</pre> |
|||
</body> |
|||
</html> |
@ -0,0 +1,3 @@ |
|||
".\Objects\main.obj" |
|||
TO ".\Objects\snake" |
|||
PRINT(".\Listings\snake.m51") RAMSIZE(256) |
File diff suppressed because one or more lines are too long
@ -0,0 +1,197 @@ |
|||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?> |
|||
<ProjectOpt xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="project_opt.xsd"> |
|||
|
|||
<SchemaVersion>1.0</SchemaVersion> |
|||
|
|||
<Header>### uVision Project, (C) Keil Software</Header> |
|||
|
|||
<Extensions> |
|||
<cExt>*.c</cExt> |
|||
<aExt>*.s*; *.src; *.a*</aExt> |
|||
<oExt>*.obj; *.o</oExt> |
|||
<lExt>*.lib</lExt> |
|||
<tExt>*.txt; *.h; *.inc</tExt> |
|||
<pExt>*.plm</pExt> |
|||
<CppX>*.cpp</CppX> |
|||
<nMigrate>0</nMigrate> |
|||
</Extensions> |
|||
|
|||
<DaveTm> |
|||
<dwLowDateTime>0</dwLowDateTime> |
|||
<dwHighDateTime>0</dwHighDateTime> |
|||
</DaveTm> |
|||
|
|||
<Target> |
|||
<TargetName>Target 1</TargetName> |
|||
<ToolsetNumber>0x0</ToolsetNumber> |
|||
<ToolsetName>MCS-51</ToolsetName> |
|||
<TargetOption> |
|||
<CLK51>24000000</CLK51> |
|||
<OPTTT> |
|||
<gFlags>1</gFlags> |
|||
<BeepAtEnd>1</BeepAtEnd> |
|||
<RunSim>1</RunSim> |
|||
<RunTarget>0</RunTarget> |
|||
<RunAbUc>0</RunAbUc> |
|||
</OPTTT> |
|||
<OPTHX> |
|||
<HexSelection>0</HexSelection> |
|||
<FlashByte>65535</FlashByte> |
|||
<HexRangeLowAddress>0</HexRangeLowAddress> |
|||
<HexRangeHighAddress>0</HexRangeHighAddress> |
|||
<HexOffset>0</HexOffset> |
|||
</OPTHX> |
|||
<OPTLEX> |
|||
<PageWidth>120</PageWidth> |
|||
<PageLength>65</PageLength> |
|||
<TabStop>8</TabStop> |
|||
<ListingPath>.\Listings\</ListingPath> |
|||
</OPTLEX> |
|||
<ListingPage> |
|||
<CreateCListing>1</CreateCListing> |
|||
<CreateAListing>1</CreateAListing> |
|||
<CreateLListing>1</CreateLListing> |
|||
<CreateIListing>0</CreateIListing> |
|||
<AsmCond>1</AsmCond> |
|||
<AsmSymb>1</AsmSymb> |
|||
<AsmXref>0</AsmXref> |
|||
<CCond>1</CCond> |
|||
<CCode>0</CCode> |
|||
<CListInc>0</CListInc> |
|||
<CSymb>0</CSymb> |
|||
<LinkerCodeListing>0</LinkerCodeListing> |
|||
</ListingPage> |
|||
<OPTXL> |
|||
<LMap>1</LMap> |
|||
<LComments>1</LComments> |
|||
<LGenerateSymbols>1</LGenerateSymbols> |
|||
<LLibSym>1</LLibSym> |
|||
<LLines>1</LLines> |
|||
<LLocSym>1</LLocSym> |
|||
<LPubSym>1</LPubSym> |
|||
<LXref>0</LXref> |
|||
<LExpSel>0</LExpSel> |
|||
</OPTXL> |
|||
<OPTFL> |
|||
<tvExp>1</tvExp> |
|||
<tvExpOptDlg>0</tvExpOptDlg> |
|||
<IsCurrentTarget>1</IsCurrentTarget> |
|||
</OPTFL> |
|||
<CpuCode>255</CpuCode> |
|||
<Books> |
|||
<Book> |
|||
<Number>0</Number> |
|||
<Title>Data Sheet</Title> |
|||
<Path>DATASHTS\ATMEL\AT89C52_DS.PDF</Path> |
|||
</Book> |
|||
<Book> |
|||
<Number>1</Number> |
|||
<Title>Instruction Set Manual</Title> |
|||
<Path>DATASHTS\ATMEL\AT_C51ISM.PDF</Path> |
|||
</Book> |
|||
</Books> |
|||
<DebugOpt> |
|||
<uSim>0</uSim> |
|||
<uTrg>1</uTrg> |
|||
<sLdApp>1</sLdApp> |
|||
<sGomain>1</sGomain> |
|||
<sRbreak>1</sRbreak> |
|||
<sRwatch>1</sRwatch> |
|||
<sRmem>1</sRmem> |
|||
<sRfunc>1</sRfunc> |
|||
<sRbox>1</sRbox> |
|||
<tLdApp>1</tLdApp> |
|||
<tGomain>0</tGomain> |
|||
<tRbreak>1</tRbreak> |
|||
<tRwatch>1</tRwatch> |
|||
<tRmem>1</tRmem> |
|||
<tRfunc>0</tRfunc> |
|||
<tRbox>1</tRbox> |
|||
<tRtrace>1</tRtrace> |
|||
<sRSysVw>1</sRSysVw> |
|||
<tRSysVw>1</tRSysVw> |
|||
<sRunDeb>0</sRunDeb> |
|||
<sLrtime>0</sLrtime> |
|||
<bEvRecOn>1</bEvRecOn> |
|||
<bSchkAxf>0</bSchkAxf> |
|||
<bTchkAxf>0</bTchkAxf> |
|||
<nTsel>0</nTsel> |
|||
<sDll></sDll> |
|||
<sDllPa></sDllPa> |
|||
<sDlgDll></sDlgDll> |
|||
<sDlgPa></sDlgPa> |
|||
<sIfile></sIfile> |
|||
<tDll></tDll> |
|||
<tDllPa></tDllPa> |
|||
<tDlgDll></tDlgDll> |
|||
<tDlgPa></tDlgPa> |
|||
<tIfile></tIfile> |
|||
<pMon>BIN\MON51.DLL</pMon> |
|||
</DebugOpt> |
|||
<Breakpoint/> |
|||
<Tracepoint> |
|||
<THDelay>0</THDelay> |
|||
</Tracepoint> |
|||
<DebugFlag> |
|||
<trace>0</trace> |
|||
<periodic>1</periodic> |
|||
<aLwin>0</aLwin> |
|||
<aCover>0</aCover> |
|||
<aSer1>0</aSer1> |
|||
<aSer2>0</aSer2> |
|||
<aPa>0</aPa> |
|||
<viewmode>0</viewmode> |
|||
<vrSel>0</vrSel> |
|||
<aSym>0</aSym> |
|||
<aTbox>0</aTbox> |
|||
<AscS1>0</AscS1> |
|||
<AscS2>0</AscS2> |
|||
<AscS3>0</AscS3> |
|||
<aSer3>0</aSer3> |
|||
<eProf>0</eProf> |
|||
<aLa>0</aLa> |
|||
<aPa1>0</aPa1> |
|||
<AscS4>0</AscS4> |
|||
<aSer4>0</aSer4> |
|||
<StkLoc>0</StkLoc> |
|||
<TrcWin>0</TrcWin> |
|||
<newCpu>0</newCpu> |
|||
<uProt>0</uProt> |
|||
</DebugFlag> |
|||
<LintExecutable></LintExecutable> |
|||
<LintConfigFile></LintConfigFile> |
|||
<bLintAuto>0</bLintAuto> |
|||
<bAutoGenD>0</bAutoGenD> |
|||
<LntExFlags>0</LntExFlags> |
|||
<pMisraName></pMisraName> |
|||
<pszMrule></pszMrule> |
|||
<pSingCmds></pSingCmds> |
|||
<pMultCmds></pMultCmds> |
|||
<pMisraNamep></pMisraNamep> |
|||
<pszMrulep></pszMrulep> |
|||
<pSingCmdsp></pSingCmdsp> |
|||
<pMultCmdsp></pMultCmdsp> |
|||
</TargetOption> |
|||
</Target> |
|||
|
|||
<Group> |
|||
<GroupName>Source Group 1</GroupName> |
|||
<tvExp>1</tvExp> |
|||
<tvExpOptDlg>0</tvExpOptDlg> |
|||
<cbSel>0</cbSel> |
|||
<RteFlg>0</RteFlg> |
|||
<File> |
|||
<GroupNumber>1</GroupNumber> |
|||
<FileNumber>1</FileNumber> |
|||
<FileType>1</FileType> |
|||
<tvExp>0</tvExp> |
|||
<tvExpOptDlg>0</tvExpOptDlg> |
|||
<bDave2>0</bDave2> |
|||
<PathWithFileName>.\Main\main.c</PathWithFileName> |
|||
<FilenameWithoutPath>main.c</FilenameWithoutPath> |
|||
<RteFlg>0</RteFlg> |
|||
<bShared>0</bShared> |
|||
</File> |
|||
</Group> |
|||
|
|||
</ProjectOpt> |
@ -0,0 +1,378 @@ |
|||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?> |
|||
<Project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="project_proj.xsd"> |
|||
|
|||
<SchemaVersion>1.1</SchemaVersion> |
|||
|
|||
<Header>### uVision Project, (C) Keil Software</Header> |
|||
|
|||
<Targets> |
|||
<Target> |
|||
<TargetName>Target 1</TargetName> |
|||
<ToolsetNumber>0x0</ToolsetNumber> |
|||
<ToolsetName>MCS-51</ToolsetName> |
|||
<uAC6>0</uAC6> |
|||
<TargetOption> |
|||
<TargetCommonOption> |
|||
<Device>AT89C52</Device> |
|||
<Vendor>Microchip</Vendor> |
|||
<Cpu>IRAM(0-0xFF) IROM(0-0x1FFF) CLOCK(24000000)</Cpu> |
|||
<FlashUtilSpec></FlashUtilSpec> |
|||
<StartupFile>"LIB\STARTUP.A51" ("Standard 8051 Startup Code")</StartupFile> |
|||
<FlashDriverDll></FlashDriverDll> |
|||
<DeviceId>2980</DeviceId> |
|||
<RegisterFile>REGX52.H</RegisterFile> |
|||
<MemoryEnv></MemoryEnv> |
|||
<Cmp></Cmp> |
|||
<Asm></Asm> |
|||
<Linker></Linker> |
|||
<OHString></OHString> |
|||
<InfinionOptionDll></InfinionOptionDll> |
|||
<SLE66CMisc></SLE66CMisc> |
|||
<SLE66AMisc></SLE66AMisc> |
|||
<SLE66LinkerMisc></SLE66LinkerMisc> |
|||
<SFDFile></SFDFile> |
|||
<bCustSvd>0</bCustSvd> |
|||
<UseEnv>0</UseEnv> |
|||
<BinPath></BinPath> |
|||
<IncludePath></IncludePath> |
|||
<LibPath></LibPath> |
|||
<RegisterFilePath>Atmel\</RegisterFilePath> |
|||
<DBRegisterFilePath>Atmel\</DBRegisterFilePath> |
|||
<TargetStatus> |
|||
<Error>0</Error> |
|||
<ExitCodeStop>0</ExitCodeStop> |
|||
<ButtonStop>0</ButtonStop> |
|||
<NotGenerated>0</NotGenerated> |
|||
<InvalidFlash>1</InvalidFlash> |
|||
</TargetStatus> |
|||
<OutputDirectory>.\Objects\</OutputDirectory> |
|||
<OutputName>snake</OutputName> |
|||
<CreateExecutable>1</CreateExecutable> |
|||
<CreateLib>0</CreateLib> |
|||
<CreateHexFile>1</CreateHexFile> |
|||
<DebugInformation>1</DebugInformation> |
|||
<BrowseInformation>1</BrowseInformation> |
|||
<ListingPath>.\Listings\</ListingPath> |
|||
<HexFormatSelection>0</HexFormatSelection> |
|||
<Merge32K>0</Merge32K> |
|||
<CreateBatchFile>0</CreateBatchFile> |
|||
<BeforeCompile> |
|||
<RunUserProg1>0</RunUserProg1> |
|||
<RunUserProg2>0</RunUserProg2> |
|||
<UserProg1Name></UserProg1Name> |
|||
<UserProg2Name></UserProg2Name> |
|||
<UserProg1Dos16Mode>0</UserProg1Dos16Mode> |
|||
<UserProg2Dos16Mode>0</UserProg2Dos16Mode> |
|||
<nStopU1X>0</nStopU1X> |
|||
<nStopU2X>0</nStopU2X> |
|||
</BeforeCompile> |
|||
<BeforeMake> |
|||
<RunUserProg1>0</RunUserProg1> |
|||
<RunUserProg2>0</RunUserProg2> |
|||
<UserProg1Name></UserProg1Name> |
|||
<UserProg2Name></UserProg2Name> |
|||
<UserProg1Dos16Mode>0</UserProg1Dos16Mode> |
|||
<UserProg2Dos16Mode>0</UserProg2Dos16Mode> |
|||
<nStopB1X>0</nStopB1X> |
|||
<nStopB2X>0</nStopB2X> |
|||
</BeforeMake> |
|||
<AfterMake> |
|||
<RunUserProg1>0</RunUserProg1> |
|||
<RunUserProg2>0</RunUserProg2> |
|||
<UserProg1Name></UserProg1Name> |
|||
<UserProg2Name></UserProg2Name> |
|||
<UserProg1Dos16Mode>0</UserProg1Dos16Mode> |
|||
<UserProg2Dos16Mode>0</UserProg2Dos16Mode> |
|||
<nStopA1X>0</nStopA1X> |
|||
<nStopA2X>0</nStopA2X> |
|||
</AfterMake> |
|||
<SelectedForBatchBuild>0</SelectedForBatchBuild> |
|||
<SVCSIdString></SVCSIdString> |
|||
</TargetCommonOption> |
|||
<CommonProperty> |
|||
<UseCPPCompiler>0</UseCPPCompiler> |
|||
<RVCTCodeConst>0</RVCTCodeConst> |
|||
<RVCTZI>0</RVCTZI> |
|||
<RVCTOtherData>0</RVCTOtherData> |
|||
<ModuleSelection>0</ModuleSelection> |
|||
<IncludeInBuild>1</IncludeInBuild> |
|||
<AlwaysBuild>0</AlwaysBuild> |
|||
<GenerateAssemblyFile>0</GenerateAssemblyFile> |
|||
<AssembleAssemblyFile>0</AssembleAssemblyFile> |
|||
<PublicsOnly>0</PublicsOnly> |
|||
<StopOnExitCode>3</StopOnExitCode> |
|||
<CustomArgument></CustomArgument> |
|||
<IncludeLibraryModules></IncludeLibraryModules> |
|||
<ComprImg>1</ComprImg> |
|||
<BankNo>65535</BankNo> |
|||
</CommonProperty> |
|||
<DllOption> |
|||
<SimDllName>S8051.DLL</SimDllName> |
|||
<SimDllArguments></SimDllArguments> |
|||
<SimDlgDll>DP51.DLL</SimDlgDll> |
|||
<SimDlgDllArguments>-p52</SimDlgDllArguments> |
|||
<TargetDllName>S8051.DLL</TargetDllName> |
|||
<TargetDllArguments></TargetDllArguments> |
|||
<TargetDlgDll>TP51.DLL</TargetDlgDll> |
|||
<TargetDlgDllArguments>-p52</TargetDlgDllArguments> |
|||
</DllOption> |
|||
<DebugOption> |
|||
<OPTHX> |
|||
<HexSelection>0</HexSelection> |
|||
<HexRangeLowAddress>0</HexRangeLowAddress> |
|||
<HexRangeHighAddress>0</HexRangeHighAddress> |
|||
<HexOffset>0</HexOffset> |
|||
<Oh166RecLen>16</Oh166RecLen> |
|||
</OPTHX> |
|||
<Simulator> |
|||
<UseSimulator>0</UseSimulator> |
|||
<LoadApplicationAtStartup>1</LoadApplicationAtStartup> |
|||
<RunToMain>1</RunToMain> |
|||
<RestoreBreakpoints>1</RestoreBreakpoints> |
|||
<RestoreWatchpoints>1</RestoreWatchpoints> |
|||
<RestoreMemoryDisplay>1</RestoreMemoryDisplay> |
|||
<RestoreFunctions>1</RestoreFunctions> |
|||
<RestoreToolbox>1</RestoreToolbox> |
|||
<LimitSpeedToRealTime>0</LimitSpeedToRealTime> |
|||
<RestoreSysVw>1</RestoreSysVw> |
|||
</Simulator> |
|||
<Target> |
|||
<UseTarget>1</UseTarget> |
|||
<LoadApplicationAtStartup>1</LoadApplicationAtStartup> |
|||
<RunToMain>0</RunToMain> |
|||
<RestoreBreakpoints>1</RestoreBreakpoints> |
|||
<RestoreWatchpoints>1</RestoreWatchpoints> |
|||
<RestoreMemoryDisplay>1</RestoreMemoryDisplay> |
|||
<RestoreFunctions>0</RestoreFunctions> |
|||
<RestoreToolbox>1</RestoreToolbox> |
|||
<RestoreTracepoints>1</RestoreTracepoints> |
|||
<RestoreSysVw>1</RestoreSysVw> |
|||
</Target> |
|||
<RunDebugAfterBuild>0</RunDebugAfterBuild> |
|||
<TargetSelection>0</TargetSelection> |
|||
<SimDlls> |
|||
<CpuDll></CpuDll> |
|||
<CpuDllArguments></CpuDllArguments> |
|||
<PeripheralDll></PeripheralDll> |
|||
<PeripheralDllArguments></PeripheralDllArguments> |
|||
<InitializationFile></InitializationFile> |
|||
</SimDlls> |
|||
<TargetDlls> |
|||
<CpuDll></CpuDll> |
|||
<CpuDllArguments></CpuDllArguments> |
|||
<PeripheralDll></PeripheralDll> |
|||
<PeripheralDllArguments></PeripheralDllArguments> |
|||
<InitializationFile></InitializationFile> |
|||
<Driver>BIN\MON51.DLL</Driver> |
|||
</TargetDlls> |
|||
</DebugOption> |
|||
<Utilities> |
|||
<Flash1> |
|||
<UseTargetDll>0</UseTargetDll> |
|||
<UseExternalTool>0</UseExternalTool> |
|||
<RunIndependent>0</RunIndependent> |
|||
<UpdateFlashBeforeDebugging>0</UpdateFlashBeforeDebugging> |
|||
<Capability>0</Capability> |
|||
<DriverSelection>-1</DriverSelection> |
|||
</Flash1> |
|||
<bUseTDR>0</bUseTDR> |
|||
<Flash2></Flash2> |
|||
<Flash3>"" ()</Flash3> |
|||
<Flash4></Flash4> |
|||
<pFcarmOut></pFcarmOut> |
|||
<pFcarmGrp></pFcarmGrp> |
|||
<pFcArmRoot></pFcArmRoot> |
|||
<FcArmLst>0</FcArmLst> |
|||
</Utilities> |
|||
<Target51> |
|||
<Target51Misc> |
|||
<MemoryModel>2</MemoryModel> |
|||
<RTOS>0</RTOS> |
|||
<RomSize>2</RomSize> |
|||
<DataHold>0</DataHold> |
|||
<XDataHold>0</XDataHold> |
|||
<UseOnchipRom>0</UseOnchipRom> |
|||
<UseOnchipArithmetic>0</UseOnchipArithmetic> |
|||
<UseMultipleDPTR>0</UseMultipleDPTR> |
|||
<UseOnchipXram>0</UseOnchipXram> |
|||
<HadIRAM>1</HadIRAM> |
|||
<HadXRAM>0</HadXRAM> |
|||
<HadIROM>1</HadIROM> |
|||
<Moda2>0</Moda2> |
|||
<Moddp2>0</Moddp2> |
|||
<Modp2>0</Modp2> |
|||
<Mod517dp>0</Mod517dp> |
|||
<Mod517au>0</Mod517au> |
|||
<Mode2>0</Mode2> |
|||
<useCB>0</useCB> |
|||
<useXB>0</useXB> |
|||
<useL251>0</useL251> |
|||
<useA251>0</useA251> |
|||
<Mx51>0</Mx51> |
|||
<ModC812>0</ModC812> |
|||
<ModCont>0</ModCont> |
|||
<Lp51>0</Lp51> |
|||
<useXBS>0</useXBS> |
|||
<ModDA>0</ModDA> |
|||
<ModAB2>0</ModAB2> |
|||
<Mx51P>0</Mx51P> |
|||
<hadXRAM2>0</hadXRAM2> |
|||
<uocXram2>0</uocXram2> |
|||
<ModC2>0</ModC2> |
|||
<ModH2>0</ModH2> |
|||
<Mdu_R515>0</Mdu_R515> |
|||
<Mdu_F120>0</Mdu_F120> |
|||
<Psoc>0</Psoc> |
|||
<hadIROM2>0</hadIROM2> |
|||
<ModSmx2>0</ModSmx2> |
|||
<cBanks>0</cBanks> |
|||
<xBanks>0</xBanks> |
|||
<OnChipMemories> |
|||
<RCB> |
|||
<Type>0</Type> |
|||
<StartAddress>0x0</StartAddress> |
|||
<Size>0xffff</Size> |
|||
</RCB> |
|||
<RXB> |
|||
<Type>0</Type> |
|||
<StartAddress>0x0</StartAddress> |
|||
<Size>0x0</Size> |
|||
</RXB> |
|||
<Ocm1> |
|||
<Type>0</Type> |
|||
<StartAddress>0x0</StartAddress> |
|||
<Size>0x0</Size> |
|||
</Ocm1> |
|||
<Ocm2> |
|||
<Type>0</Type> |
|||
<StartAddress>0x0</StartAddress> |
|||
<Size>0x0</Size> |
|||
</Ocm2> |
|||
<Ocm3> |
|||
<Type>0</Type> |
|||
<StartAddress>0x0</StartAddress> |
|||
<Size>0x0</Size> |
|||
</Ocm3> |
|||
<Ocr1> |
|||
<Type>0</Type> |
|||
<StartAddress>0x0</StartAddress> |
|||
<Size>0x0</Size> |
|||
</Ocr1> |
|||
<Ocr2> |
|||
<Type>0</Type> |
|||
<StartAddress>0x0</StartAddress> |
|||
<Size>0x0</Size> |
|||
</Ocr2> |
|||
<Ocr3> |
|||
<Type>0</Type> |
|||
<StartAddress>0x0</StartAddress> |
|||
<Size>0x0</Size> |
|||
</Ocr3> |
|||
<IRO> |
|||
<Type>1</Type> |
|||
<StartAddress>0x0</StartAddress> |
|||
<Size>0x2000</Size> |
|||
</IRO> |
|||
<IRA> |
|||
<Type>0</Type> |
|||
<StartAddress>0x0</StartAddress> |
|||
<Size>0x100</Size> |
|||
</IRA> |
|||
<XRA> |
|||
<Type>0</Type> |
|||
<StartAddress>0x0</StartAddress> |
|||
<Size>0x0</Size> |
|||
</XRA> |
|||
<XRA512> |
|||
<Type>0</Type> |
|||
<StartAddress>0x0</StartAddress> |
|||
<Size>0x0</Size> |
|||
</XRA512> |
|||
<IROM512> |
|||
<Type>0</Type> |
|||
<StartAddress>0x0</StartAddress> |
|||
<Size>0x0</Size> |
|||
</IROM512> |
|||
</OnChipMemories> |
|||
</Target51Misc> |
|||
<C51> |
|||
<RegisterColoring>0</RegisterColoring> |
|||
<VariablesInOrder>0</VariablesInOrder> |
|||
<IntegerPromotion>1</IntegerPromotion> |
|||
<uAregs>0</uAregs> |
|||
<UseInterruptVector>1</UseInterruptVector> |
|||
<Fuzzy>3</Fuzzy> |
|||
<Optimize>8</Optimize> |
|||
<WarningLevel>2</WarningLevel> |
|||
<SizeSpeed>1</SizeSpeed> |
|||
<ObjectExtend>1</ObjectExtend> |
|||
<ACallAJmp>0</ACallAJmp> |
|||
<InterruptVectorAddress>0</InterruptVectorAddress> |
|||
<VariousControls> |
|||
<MiscControls></MiscControls> |
|||
<Define></Define> |
|||
<Undefine></Undefine> |
|||
<IncludePath>.\Includes</IncludePath> |
|||
</VariousControls> |
|||
</C51> |
|||
<Ax51> |
|||
<UseMpl>0</UseMpl> |
|||
<UseStandard>1</UseStandard> |
|||
<UseCase>0</UseCase> |
|||
<UseMod51>0</UseMod51> |
|||
<VariousControls> |
|||
<MiscControls></MiscControls> |
|||
<Define></Define> |
|||
<Undefine></Undefine> |
|||
<IncludePath></IncludePath> |
|||
</VariousControls> |
|||
</Ax51> |
|||
<Lx51> |
|||
<useFile>0</useFile> |
|||
<linkonly>0</linkonly> |
|||
<UseMemoryFromTarget>1</UseMemoryFromTarget> |
|||
<CaseSensitiveSymbols>0</CaseSensitiveSymbols> |
|||
<WarningLevel>2</WarningLevel> |
|||
<DataOverlaying>1</DataOverlaying> |
|||
<OverlayString></OverlayString> |
|||
<MiscControls></MiscControls> |
|||
<DisableWarningNumbers></DisableWarningNumbers> |
|||
<LinkerCmdFile></LinkerCmdFile> |
|||
<Assign></Assign> |
|||
<ReserveString></ReserveString> |
|||
<CClasses></CClasses> |
|||
<UserClasses></UserClasses> |
|||
<CSection></CSection> |
|||
<UserSection></UserSection> |
|||
<CodeBaseAddress></CodeBaseAddress> |
|||
<XDataBaseAddress></XDataBaseAddress> |
|||
<PDataBaseAddress></PDataBaseAddress> |
|||
<BitBaseAddress></BitBaseAddress> |
|||
<DataBaseAddress></DataBaseAddress> |
|||
<IDataBaseAddress></IDataBaseAddress> |
|||
<Precede></Precede> |
|||
<Stack></Stack> |
|||
<CodeSegmentName></CodeSegmentName> |
|||
<XDataSegmentName></XDataSegmentName> |
|||
<BitSegmentName></BitSegmentName> |
|||
<DataSegmentName></DataSegmentName> |
|||
<IDataSegmentName></IDataSegmentName> |
|||
</Lx51> |
|||
</Target51> |
|||
</TargetOption> |
|||
<Groups> |
|||
<Group> |
|||
<GroupName>Source Group 1</GroupName> |
|||
<Files> |
|||
<File> |
|||
<FileName>main.c</FileName> |
|||
<FileType>1</FileType> |
|||
<FilePath>.\Main\main.c</FilePath> |
|||
</File> |
|||
</Files> |
|||
</Group> |
|||
</Groups> |
|||
</Target> |
|||
</Targets> |
|||
|
|||
</Project> |
Loading…
Reference in new issue