📄 mb90092.lst
字号:
213 1 send_byte(0xa2);/*-------command 4----------*/
214 1 send_byte(0x1b);//(0x2b); //change to 1,noncolor
215 1
216 1 /*1010 0 IE IN EB
217 1 0 EO CM ZM NP P2 P0 DC:
218 1 EO:field control
219 1 CM:color display control
220 1 ZM:zoom in control
221 1 NP: NTSC/PAL control
222 1 P2/0: backgrond pattern control
223 1 DC:
224 1
225 1 */
226 1 /*
227 1 for(i=0;i<12;i++)
228 1 {
229 1 disp_color(i);
230 1 }
231 1 */
232 1 Clr_Display();
233 1
234 1 }
235 /*------------------------------------------*/
236 /* No Message Guide Display
237
238 Desription: when check all address, no message belong to the user,
239 display this guide frame to user ,under is :
240 "您目前暂无信息"
C51 COMPILER V7.02b MB90092 06/20/2006 18:46:35 PAGE 5
241
242 */
243 /*--------------------------------------------*/
244 void No_Message_Guide(void)
245 {
246 1 uchar data i;
247 1 send_byte(0xa2); //command 5
248 1 send_byte(0x29);
249 1
250 1 disp_num(4,5,0xc4fa,1,1);
251 1 disp_num(4,6,0xc4bf,1,1);
252 1 disp_num(4,7,0xc7b0,1,1);
253 1 disp_num(4,8,0xd4dd,1,1);
254 1 disp_num(4,9,0xcede,1,1);
255 1 disp_num(4,10,0xd0c5,1,1);
256 1 disp_num(4,11,0xcfa2,1,1);
257 1 for(i=0;i<100;i++)
258 1 {
259 2 delay();
260 2 }
261 1 }
262 /*---------------------------------------------*/
263 /* 取消提示
264
265 描述: 出现字体 "请确认退出"
266
267
268 */
269 /*-----------------------------------------------*/
270 void Inqire_Frame()
271 {
272 1 uchar data i;
273 1
274 1 send_byte(0xa2); //command 5
275 1 send_byte(0x29);
276 1
277 1 disp_num(4,4,0xc7eb,1,1);
278 1 disp_num(4,5,0xc8b7,1,1);
279 1 disp_num(4,6,0xc8cf,1,1);
280 1 disp_num(4,7,0xc8a1,1,1);
281 1 disp_num(4,8,0xcffb,1,1);
282 1 disp_num(4,9,0xb2d9,1,1);
283 1 disp_num(4,10,0xd7f7,1,1);
284 1
285 1 for(i=0;i<100;i++)
286 1 {
287 2 delay();
288 2 }
289 1 }
290 /*------------------------------------------*/
291 /* 字体显示
292 Description:
293 显示字在相应的位置,共显示如下:
294 XX-XX-XX____(信息标题)
295
296 使用的寄存器:READ_BLOCK, message_group[18]
297
298 */
299 /*----------------------------------------*/
300 void Config_Word(uchar line)
301 {
302 1 uchar data i,j,y;
C51 COMPILER V7.02b MB90092 06/20/2006 18:46:35 PAGE 6
303 1 uint data n;
304 1
305 1 i=line;
306 1 Page_Read_Op(); //used read_block!!!
307 1 for(y=1;y<9;y++)
308 1 {
309 2 if(y<5)
310 2 {
311 3 j=message_group[2*y];
312 3 n=(uint)(j);
313 3 // n=n-0x0020; //TEST
314 3
315 3 disp_num(i,(2*y), n, 1, 1);
316 3
317 3 j=message_group[2*y+1];
318 3 n=(uint)(j);
319 3 // n=n-0x0020; //TEST
320 3 /*
321 3 if(i==0)
322 3 {
323 3 k=3;
324 3 }
325 3 else
326 3 {
327 3 k=1;
328 3 }
329 3 */
330 3 disp_num(i,(2*y+1), n, 1, 1);
331 3 }
332 2 else
333 2 {
334 3 n=(uint)(message_group[2*y]);
335 3 n=n<<8;
336 3 n=n&0xff00;
337 3 j=message_group[2*y+1];
338 3 n=n+j;
339 3 /*
340 3 if(i==0)
341 3 {
342 3 k=3;
343 3 }
344 3 else
345 3 {
346 3 k=1;
347 3 }
348 3 */
349 3 disp_num(i,(5+y), n, 1, 1);
350 3 }
351 2 }
352 1 }
353 /*---------------------------------------------*/
354 /*
355 目录显示
356
357 描述 :显示信息的前面部分字节作为目录
358 用户目前选中的条目反白显示,由计算得出
359
360 供用户选择使用的变量:read_block
361 wink_offset, self_newscount, pub_newscount
362 self_newscount
363 self_smalloffset-----个人最老信息的地址偏移位置
364
C51 COMPILER V7.02b MB90092 06/20/2006 18:46:35 PAGE 7
365 pub_newscount-----公用最老信息的地址偏移位置
366 pub_smallest记录的是最小的位置
367 */
368 /*--------------------------------------------*/
369 void disp_detail()
370 {
371 1 char data i;
372 1 uchar data j;
373 1
374 1 send_byte(0xa2); //command 4
375 1 send_byte(0x2b);
376 1
377 1 i=self_newscount+pub_newscount-wink_offset;
378 1 if((i/8)<(self_newscount/8))
379 1 {
380 2 if(self_bigoffset>7) //在下面开始
381 2 {
382 3 j=self_bigoffset-i/8*8;
383 3 if(j>8)
384 3 {
385 4 for(i=j;i>(j-8);i--)
386 4 {
387 5 read_block=address_pointer+i*0x100;
388 5 Config_Word(j-i);
389 5 }
390 4 }
391 3 else
392 3 {
393 4 for(i=j;i>=0;i--)
394 4 {
395 5 read_block=address_pointer+i*0x100;
396 5 Config_Word(j-i);
397 5 }
398 4 for(i=15;i>(7-j);i--)
399 4 {
400 5 read_block=address_pointer+i*0x100;
401 5 Config_Word(j+15-i);
402 5 }
403 4 }
404 3 }
405 2 else //j<7,some messages offset in high zone
406 2 {
407 3 for(i=j;i>-1;i--)
408 3 {
409 4 read_block=address_pointer+i*0x100;
410 4 Config_Word(j-i);
411 4 }
412 3 //私人信息第一区域显示完成,显示第二区域;
413 3 for(i=15;i>(j-6);i--)
414 3 {
415 4 read_block=address_pointer+i*0x100;
416 4 Config_Word(j+16-i);
417 4 }
418 3 }
419 2 }
420 1
421 1 else if((i/8)==(self_newscount/8)) //有部分信息在私人区
422 1 {
423 2 j=self_bigoffset-i; //j = first begin offset
424 2 for(i=j;i>-1;i--)
425 2 {
426 3 read_block=address_pointer+i*0x100;
C51 COMPILER V7.02b MB90092 06/20/2006 18:46:35 PAGE 8
427 3 Config_Word(j-i);
428 3 }
429 2 //私人信息第一区域显示完成,显示公用信息
430 2 i=self_newscount-wink_offset; //代表已经显示的私人信息条数
431 2 if( pub_newscount>(8-i))
432 2 {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -