C51 COMPILER V6.02  TEXT_GRAPHICS_FUNCTIONS                                                05/08/2008 14:44:22 PAGE 1   


C51 COMPILER V6.02, COMPILATION OF MODULE TEXT_GRAPHICS_FUNCTIONS
OBJECT MODULE PLACED IN .\text_graphics_functions.OBJ
COMPILER INVOKED BY: E:\Brno\zaloha\disk_C\ATMEL\C51\Keil6\C51\BIN\C51.EXE .\text_graphics_functions.c OPTIMIZE(9,SPEED)
                    - NOINTPROMOTE DEBUG OBJECTEXTEND

stmt level    source

   1          #include <string.h>
   2          
   3          #include "text_graphics.h"
   4          #include "main.h"
   5          #include "buttons.h"
   6          
   7          //=====================================================================================================
   8          // draw string
   9          //=====================================================================================================
  10          void DrawString(unsigned char x, unsigned char y, unsigned char font, unsigned char btn, char *str)
  11          {
  12   1      	code unsigned char btnmap[8]={0x80,0x40,0x20,0x10,0x02,0x01,0x04,0x08};	
  13   1      
  14   1      	if(x==-1) x=xpos; else xpos=x;
  15   1      	if(y==-1) y=ypos; else ypos=y;
  16   1      
  17   1      	if(str!=NULL)
  18   1      		strcpy(strtmp,str);
  19   1      		
  20   1      	DrawStrXRAM(font,(btn>0&&(btnmap[btn-1]&ebtndown)!=0)!=0?1:((btn==0)?0x02:0x00));
  21   1      }
  22          
  23          //=====================================================================================================
  24          // draw frame
  25          //=====================================================================================================
  26          void DrawFrame(unsigned char Ax, unsigned char Ay, unsigned char Bx, unsigned char By, unsigned char style
             -)
  27          {
  28   1      	if(Ax<240 && Bx<240 && Ay<128 && By<128)
  29   1      	{
  30   2      		if(style==fstFilled)
  31   2      		{
  32   3      			for(;Ay<By;Ay++)
  33   3      				DrawLine(Ax,Ay,Bx,Ay);
  34   3      		}
  35   2      		else
  36   2      		{
  37   3      			DrawLine(Ax,Ay,Bx,Ay);
  38   3      			DrawLine(Ax,By,Bx,By);
  39   3      			DrawLine(Ax,Ay,Ax,By);
  40   3      			DrawLine(Bx,Ay,Bx,By);
  41   3      			if(style==fstDouble)
  42   3      			{
  43   4      				Ax+=2;Ay+=2;Bx-=2;By-=2;
  44   4      				DrawLine(Ax,Ay,Bx,Ay);
  45   4      				DrawLine(Ax,By,Bx,By);
  46   4      				DrawLine(Ax,Ay,Ax,By);
  47   4      				DrawLine(Bx,Ay,Bx,By);
  48   4      			}
  49   3      		}
  50   2      	}
  51   1      }
  52          

C51 COMPILER V6.02  TEXT_GRAPHICS_FUNCTIONS                                                05/08/2008 14:44:22 PAGE 2   


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =    243    ----
   CONSTANT SIZE    =      8    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =   ----      12
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----    ----
END OF MODULE INFORMATION.


C51 COMPILATION COMPLETE.  0 WARNING(S),  0 ERROR(S)
