
Ex1_TFT43_Clock.elf:     file format elf32-avr

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .data         00000060  00800100  00001a3a  00001ace  2**0
                  CONTENTS, ALLOC, LOAD, DATA
  1 .text         00001a3a  00000000  00000000  00000094  2**1
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  2 .bss          00000013  00800160  00800160  00001b2e  2**0
                  ALLOC
  3 .debug_aranges 00000020  00000000  00000000  00001b2e  2**0
                  CONTENTS, READONLY, DEBUGGING
  4 .debug_pubnames 000002ef  00000000  00000000  00001b4e  2**0
                  CONTENTS, READONLY, DEBUGGING
  5 .debug_info   00001524  00000000  00000000  00001e3d  2**0
                  CONTENTS, READONLY, DEBUGGING
  6 .debug_abbrev 0000027c  00000000  00000000  00003361  2**0
                  CONTENTS, READONLY, DEBUGGING
  7 .debug_line   0000123f  00000000  00000000  000035dd  2**0
                  CONTENTS, READONLY, DEBUGGING
  8 .debug_frame  00000250  00000000  00000000  0000481c  2**2
                  CONTENTS, READONLY, DEBUGGING
  9 .debug_str    000003e7  00000000  00000000  00004a6c  2**0
                  CONTENTS, READONLY, DEBUGGING
 10 .debug_loc    00000fe5  00000000  00000000  00004e53  2**0
                  CONTENTS, READONLY, DEBUGGING
 11 .debug_ranges 00000060  00000000  00000000  00005e38  2**0
                  CONTENTS, READONLY, DEBUGGING

Disassembly of section .text:

00000000 <__vectors>:
       0:	0c 94 46 00 	jmp	0x8c	; 0x8c <__ctors_end>
       4:	0c 94 66 00 	jmp	0xcc	; 0xcc <__bad_interrupt>
       8:	0c 94 66 00 	jmp	0xcc	; 0xcc <__bad_interrupt>
       c:	0c 94 66 00 	jmp	0xcc	; 0xcc <__bad_interrupt>
      10:	0c 94 66 00 	jmp	0xcc	; 0xcc <__bad_interrupt>
      14:	0c 94 66 00 	jmp	0xcc	; 0xcc <__bad_interrupt>
      18:	0c 94 66 00 	jmp	0xcc	; 0xcc <__bad_interrupt>
      1c:	0c 94 66 00 	jmp	0xcc	; 0xcc <__bad_interrupt>
      20:	0c 94 66 00 	jmp	0xcc	; 0xcc <__bad_interrupt>
      24:	0c 94 66 00 	jmp	0xcc	; 0xcc <__bad_interrupt>
      28:	0c 94 66 00 	jmp	0xcc	; 0xcc <__bad_interrupt>
      2c:	0c 94 66 00 	jmp	0xcc	; 0xcc <__bad_interrupt>
      30:	0c 94 66 00 	jmp	0xcc	; 0xcc <__bad_interrupt>
      34:	0c 94 66 00 	jmp	0xcc	; 0xcc <__bad_interrupt>
      38:	0c 94 66 00 	jmp	0xcc	; 0xcc <__bad_interrupt>
      3c:	0c 94 66 00 	jmp	0xcc	; 0xcc <__bad_interrupt>
      40:	0c 94 66 00 	jmp	0xcc	; 0xcc <__bad_interrupt>
      44:	0c 94 66 00 	jmp	0xcc	; 0xcc <__bad_interrupt>
      48:	0c 94 66 00 	jmp	0xcc	; 0xcc <__bad_interrupt>
      4c:	0c 94 66 00 	jmp	0xcc	; 0xcc <__bad_interrupt>
      50:	0c 94 66 00 	jmp	0xcc	; 0xcc <__bad_interrupt>
      54:	0c 94 66 00 	jmp	0xcc	; 0xcc <__bad_interrupt>
      58:	0c 94 66 00 	jmp	0xcc	; 0xcc <__bad_interrupt>
      5c:	0c 94 66 00 	jmp	0xcc	; 0xcc <__bad_interrupt>
      60:	0c 94 66 00 	jmp	0xcc	; 0xcc <__bad_interrupt>
      64:	0c 94 66 00 	jmp	0xcc	; 0xcc <__bad_interrupt>
      68:	0c 94 66 00 	jmp	0xcc	; 0xcc <__bad_interrupt>
      6c:	0c 94 66 00 	jmp	0xcc	; 0xcc <__bad_interrupt>
      70:	0c 94 66 00 	jmp	0xcc	; 0xcc <__bad_interrupt>
      74:	0c 94 66 00 	jmp	0xcc	; 0xcc <__bad_interrupt>
      78:	0c 94 66 00 	jmp	0xcc	; 0xcc <__bad_interrupt>
      7c:	0c 94 66 00 	jmp	0xcc	; 0xcc <__bad_interrupt>
      80:	0c 94 66 00 	jmp	0xcc	; 0xcc <__bad_interrupt>
      84:	0c 94 66 00 	jmp	0xcc	; 0xcc <__bad_interrupt>
      88:	0c 94 66 00 	jmp	0xcc	; 0xcc <__bad_interrupt>

0000008c <__ctors_end>:
      8c:	11 24       	eor	r1, r1
      8e:	1f be       	out	0x3f, r1	; 63
      90:	cf ef       	ldi	r28, 0xFF	; 255
      92:	d0 e1       	ldi	r29, 0x10	; 16
      94:	de bf       	out	0x3e, r29	; 62
      96:	cd bf       	out	0x3d, r28	; 61

00000098 <__do_copy_data>:
      98:	11 e0       	ldi	r17, 0x01	; 1
      9a:	a0 e0       	ldi	r26, 0x00	; 0
      9c:	b1 e0       	ldi	r27, 0x01	; 1
      9e:	ea e3       	ldi	r30, 0x3A	; 58
      a0:	fa e1       	ldi	r31, 0x1A	; 26
      a2:	00 e0       	ldi	r16, 0x00	; 0
      a4:	0b bf       	out	0x3b, r16	; 59
      a6:	02 c0       	rjmp	.+4      	; 0xac <__do_copy_data+0x14>
      a8:	07 90       	elpm	r0, Z+
      aa:	0d 92       	st	X+, r0
      ac:	a0 36       	cpi	r26, 0x60	; 96
      ae:	b1 07       	cpc	r27, r17
      b0:	d9 f7       	brne	.-10     	; 0xa8 <__do_copy_data+0x10>
      b2:	1b be       	out	0x3b, r1	; 59

000000b4 <__do_clear_bss>:
      b4:	11 e0       	ldi	r17, 0x01	; 1
      b6:	a0 e6       	ldi	r26, 0x60	; 96
      b8:	b1 e0       	ldi	r27, 0x01	; 1
      ba:	01 c0       	rjmp	.+2      	; 0xbe <.do_clear_bss_start>

000000bc <.do_clear_bss_loop>:
      bc:	1d 92       	st	X+, r1

000000be <.do_clear_bss_start>:
      be:	a3 37       	cpi	r26, 0x73	; 115
      c0:	b1 07       	cpc	r27, r17
      c2:	e1 f7       	brne	.-8      	; 0xbc <.do_clear_bss_loop>
      c4:	0e 94 0e 0d 	call	0x1a1c	; 0x1a1c <main>
      c8:	0c 94 1b 0d 	jmp	0x1a36	; 0x1a36 <_exit>

000000cc <__bad_interrupt>:
      cc:	0c 94 00 00 	jmp	0	; 0x0 <__vectors>

000000d0 <delay_ms>:
    milliseconds can be achieved.
 */
void
_delay_loop_2(uint16_t __count)
{
	__asm__ volatile (
      d0:	20 ea       	ldi	r18, 0xA0	; 160
      d2:	3f e0       	ldi	r19, 0x0F	; 15
      d4:	04 c0       	rjmp	.+8      	; 0xde <delay_ms+0xe>
      d6:	f9 01       	movw	r30, r18
      d8:	31 97       	sbiw	r30, 0x01	; 1
      da:	f1 f7       	brne	.-4      	; 0xd8 <delay_ms+0x8>
 ++                                                ++
 +++++++++++++++++++++++++++++++++++++++++++++++++++*/

 void delay_ms(unsigned int cnt)
  {
    for(;cnt>0;cnt--)
      dc:	01 97       	sbiw	r24, 0x01	; 1
      de:	00 97       	sbiw	r24, 0x00	; 0
      e0:	d1 f7       	brne	.-12     	; 0xd6 <delay_ms+0x6>
       _delay_ms(1);
  }
      e2:	08 95       	ret

000000e4 <init_port>:
  +++++++++++++++++++++++++++++++++++++++++++++++++++*/

 void init_port(void)
  {

   DDRB  = 0x5E     ;        //Set PB1[MOSI],PB2[SCK],PB3[CS],PB4[PD#],PB6[SD_CS] = Output ; PB0[MISO],PB5(INT)=Input
      e4:	8e e5       	ldi	r24, 0x5E	; 94
      e6:	87 bb       	out	0x17, r24	; 23
   
   //------ Set Value Default Port ------ 
         
   PORTB = 0x7B     ;       //Set Default Port PB0(MISO),PB5(INT) = 1(Pull Up) ,PB4(PD)=1(Disable Power down),PB3(CS)=1, 
      e8:	8b e7       	ldi	r24, 0x7B	; 123
      ea:	88 bb       	out	0x18, r24	; 24
                            //                 PB2(SCK)=0,PB1(MOSI)=1 ,PB6(SD_CS) =1  

  }
      ec:	08 95       	ret

000000ee <spi_sdo_hi>:

//++++++++++++++++ Data MOSI [PB1] ++++++++++++++++++

void spi_sdo_hi(void)
 {
   sbi(PORTB,1) ;        //PB1 =1
      ee:	c1 9a       	sbi	0x18, 1	; 24
 }
      f0:	08 95       	ret

000000f2 <spi_sdo_lo>:

void spi_sdo_lo(void)
 {
  cbi(PORTB,1)  ;	     //PB1 =0
      f2:	c1 98       	cbi	0x18, 1	; 24
 }
      f4:	08 95       	ret

000000f6 <spi_sck_hi>:

//+++++++++++++++++ SCK [PB2] ++++++++++++++++++++++

void spi_sck_hi(void)
 {
   sbi(PORTB,2) ;        //PB2 =1
      f6:	c2 9a       	sbi	0x18, 2	; 24
 }
      f8:	08 95       	ret

000000fa <spi_sck_lo>:

void spi_sck_lo(void) 
 {
   cbi(PORTB,2) ;        //PB2 =0 (Ideal)
      fa:	c2 98       	cbi	0x18, 2	; 24
 }
      fc:	08 95       	ret

000000fe <spi_cs_hi>:

//+++++++++++++++++ CS [PB3] ++++++++++++++++++++++

 void spi_cs_hi(void)
 {
   sbi(PORTB,3)  ;       //PB3 =1
      fe:	c3 9a       	sbi	0x18, 3	; 24
 }
     100:	08 95       	ret

00000102 <spi_cs_lo>:

void spi_cs_lo(void)
 {
   cbi(PORTB,3) ;        //PB3 =0 (Active)
     102:	c3 98       	cbi	0x18, 3	; 24
 }
     104:	08 95       	ret

00000106 <spi_rw>:
 ++                                                                                   ++
 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/


unsigned char spi_rw(unsigned char Db)			  	
{
     106:	28 2f       	mov	r18, r24
     108:	80 e0       	ldi	r24, 0x00	; 0
     10a:	90 e0       	ldi	r25, 0x00	; 0
     for(bt=0;bt<8;bt++)                     //Loop read/write 8 bit
      {		
	   
		//--------- Write Data(PB1) ---------

		if((Db & 0x80)== 0x80)
     10c:	27 ff       	sbrs	r18, 7
     10e:	02 c0       	rjmp	.+4      	; 0x114 <spi_rw+0xe>

//++++++++++++++++ Data MOSI [PB1] ++++++++++++++++++

void spi_sdo_hi(void)
 {
   sbi(PORTB,1) ;        //PB1 =1
     110:	c1 9a       	sbi	0x18, 1	; 24
     112:	01 c0       	rjmp	.+2      	; 0x116 <spi_rw+0x10>
 }

void spi_sdo_lo(void)
 {
  cbi(PORTB,1)  ;	     //PB1 =0
     114:	c1 98       	cbi	0x18, 1	; 24

//+++++++++++++++++ SCK [PB2] ++++++++++++++++++++++

void spi_sck_hi(void)
 {
   sbi(PORTB,2) ;        //PB2 =1
     116:	c2 9a       	sbi	0x18, 2	; 24

       
	   	spi_sck_hi()                     ;	 //Start Clock  High (active rise edge) 
	
	  	//---------- Read Data(PB0) -------
	    result <<= 1                      ;	 //Shift data read to MSB bit 
     118:	88 0f       	add	r24, r24
	 				
	    if((PINB & 0x01)== 0x01)             //If SDI = "1"						
     11a:	b0 99       	sbic	0x16, 0	; 22
	     {
	       result |= 0x01                ;   //Keep Result of Read-data  									
     11c:	81 60       	ori	r24, 0x01	; 1
   sbi(PORTB,2) ;        //PB2 =1
 }

void spi_sck_lo(void) 
 {
   cbi(PORTB,2) ;        //PB2 =0 (Ideal)
     11e:	c2 98       	cbi	0x18, 2	; 24

unsigned char spi_rw(unsigned char Db)			  	
{
  unsigned char bt,result=0;				 	   

     for(bt=0;bt<8;bt++)                     //Loop read/write 8 bit
     120:	9f 5f       	subi	r25, 0xFF	; 255
     122:	98 30       	cpi	r25, 0x08	; 8
     124:	11 f0       	breq	.+4      	; 0x12a <spi_rw+0x24>
	    if((PINB & 0x01)== 0x01)             //If SDI = "1"						
	     {
	       result |= 0x01                ;   //Keep Result of Read-data  									
         }

   	    Db  <<= 1                        ;	 //Shift Next Bit Data			  
     126:	22 0f       	add	r18, r18
     128:	f1 cf       	rjmp	.-30     	; 0x10c <spi_rw+0x6>
	    spi_sck_lo()                     ;   //Clock low

	 }

	  return result                     ;
}
     12a:	08 95       	ret

0000012c <FT800_PD_hi>:
  ++                                                                         ++
  +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/

void FT800_PD_hi(void)
{
	sbi(PORTB,4)       ;   //PB4=1:Disable Power-Down FT800
     12c:	c4 9a       	sbi	0x18, 4	; 24
}
     12e:	08 95       	ret

00000130 <FT800_PD_lo>:


void FT800_PD_lo(void)
{
    cbi(PORTB,4)       ;   //PB4=0:Enable Power-Down FT800
     130:	c4 98       	cbi	0x18, 4	; 24
}
     132:	08 95       	ret

00000134 <FT800memWrite8>:

//++++++++++++++ Function-Write Address Register,Ram-DL,Ram-CMD + Data 8 bit ++++++++++++++++


void FT800memWrite8(unsigned long addr, unsigned char data8)
{
     134:	df 92       	push	r13
     136:	ef 92       	push	r14
     138:	ff 92       	push	r15
     13a:	0f 93       	push	r16
     13c:	1f 93       	push	r17
     13e:	7b 01       	movw	r14, r22
     140:	8c 01       	movw	r16, r24
     142:	d4 2e       	mov	r13, r20
   sbi(PORTB,3)  ;       //PB3 =1
 }

void spi_cs_lo(void)
 {
   cbi(PORTB,3) ;        //PB3 =0 (Active)
     144:	c3 98       	cbi	0x18, 3	; 24

void FT800memWrite8(unsigned long addr, unsigned char data8)
{
  spi_cs_lo()                     ; // Set CS# low

  spi_rw(((addr>>16)|MEM_WRITE))  ; // Send Memory Write plus high address byte
     146:	c8 01       	movw	r24, r16
     148:	aa 27       	eor	r26, r26
     14a:	bb 27       	eor	r27, r27
     14c:	80 68       	ori	r24, 0x80	; 128
     14e:	0e 94 83 00 	call	0x106	; 0x106 <spi_rw>
  spi_rw(addr>>8)                 ; // Send middle address byte
     152:	bb 27       	eor	r27, r27
     154:	a1 2f       	mov	r26, r17
     156:	90 2f       	mov	r25, r16
     158:	8f 2d       	mov	r24, r15
     15a:	0e 94 83 00 	call	0x106	; 0x106 <spi_rw>
  spi_rw(addr)                    ; // Send low address byte
     15e:	8e 2d       	mov	r24, r14
     160:	0e 94 83 00 	call	0x106	; 0x106 <spi_rw>

  spi_rw(data8)                   ; // Send data byte
     164:	8d 2d       	mov	r24, r13
     166:	0e 94 83 00 	call	0x106	; 0x106 <spi_rw>

//+++++++++++++++++ CS [PB3] ++++++++++++++++++++++

 void spi_cs_hi(void)
 {
   sbi(PORTB,3)  ;       //PB3 =1
     16a:	c3 9a       	sbi	0x18, 3	; 24
  spi_rw(addr)                    ; // Send low address byte

  spi_rw(data8)                   ; // Send data byte

  spi_cs_hi()                     ; // Set CS# high
}
     16c:	1f 91       	pop	r17
     16e:	0f 91       	pop	r16
     170:	ff 90       	pop	r15
     172:	ef 90       	pop	r14
     174:	df 90       	pop	r13
     176:	08 95       	ret

00000178 <FT800memWrite16>:


//++++++++++++++ Function-Write Address Register,Ram-DL,Ram-CMD + Data 16 bit++++++++++++++++

void FT800memWrite16(unsigned long addr, unsigned int data16)
{
     178:	cf 92       	push	r12
     17a:	df 92       	push	r13
     17c:	ef 92       	push	r14
     17e:	ff 92       	push	r15
     180:	0f 93       	push	r16
     182:	1f 93       	push	r17
     184:	7b 01       	movw	r14, r22
     186:	8c 01       	movw	r16, r24
     188:	d4 2e       	mov	r13, r20
     18a:	c5 2e       	mov	r12, r21
   sbi(PORTB,3)  ;       //PB3 =1
 }

void spi_cs_lo(void)
 {
   cbi(PORTB,3) ;        //PB3 =0 (Active)
     18c:	c3 98       	cbi	0x18, 3	; 24
void FT800memWrite16(unsigned long addr, unsigned int data16)
{

  spi_cs_lo()                     ;	// Set CS# low

  spi_rw(((addr>>16)|MEM_WRITE))  ; // Send Memory Write plus high address byte
     18e:	aa 27       	eor	r26, r26
     190:	bb 27       	eor	r27, r27
     192:	80 68       	ori	r24, 0x80	; 128
     194:	0e 94 83 00 	call	0x106	; 0x106 <spi_rw>
  spi_rw(addr>>8)                 ; // Send middle address byte
     198:	bb 27       	eor	r27, r27
     19a:	a1 2f       	mov	r26, r17
     19c:	90 2f       	mov	r25, r16
     19e:	8f 2d       	mov	r24, r15
     1a0:	0e 94 83 00 	call	0x106	; 0x106 <spi_rw>
  spi_rw(addr)                    ; // Send low address byte
     1a4:	8e 2d       	mov	r24, r14
     1a6:	0e 94 83 00 	call	0x106	; 0x106 <spi_rw>

  spi_rw(data16)                  ;	// Send data low byte
     1aa:	8d 2d       	mov	r24, r13
     1ac:	0e 94 83 00 	call	0x106	; 0x106 <spi_rw>
  spi_rw(data16>>8)               ;	// Send data high byte
     1b0:	8c 2d       	mov	r24, r12
     1b2:	0e 94 83 00 	call	0x106	; 0x106 <spi_rw>

//+++++++++++++++++ CS [PB3] ++++++++++++++++++++++

 void spi_cs_hi(void)
 {
   sbi(PORTB,3)  ;       //PB3 =1
     1b6:	c3 9a       	sbi	0x18, 3	; 24
  spi_rw(data16)                  ;	// Send data low byte
  spi_rw(data16>>8)               ;	// Send data high byte
  
  spi_cs_hi()                     ; // Set CS# high

}
     1b8:	1f 91       	pop	r17
     1ba:	0f 91       	pop	r16
     1bc:	ff 90       	pop	r15
     1be:	ef 90       	pop	r14
     1c0:	df 90       	pop	r13
     1c2:	cf 90       	pop	r12
     1c4:	08 95       	ret

000001c6 <FT800memWrite32>:

//++++++++++++ Function-Write Address Register,Ram-DL,Ram-CMD + Data 32 bit +++++++++++++++

void FT800memWrite32(unsigned long addr, unsigned long data32)
{
     1c6:	af 92       	push	r10
     1c8:	bf 92       	push	r11
     1ca:	cf 92       	push	r12
     1cc:	df 92       	push	r13
     1ce:	ef 92       	push	r14
     1d0:	ff 92       	push	r15
     1d2:	0f 93       	push	r16
     1d4:	1f 93       	push	r17
     1d6:	7b 01       	movw	r14, r22
     1d8:	8c 01       	movw	r16, r24
     1da:	59 01       	movw	r10, r18
     1dc:	6a 01       	movw	r12, r20
   sbi(PORTB,3)  ;       //PB3 =1
 }

void spi_cs_lo(void)
 {
   cbi(PORTB,3) ;        //PB3 =0 (Active)
     1de:	c3 98       	cbi	0x18, 3	; 24

void FT800memWrite32(unsigned long addr, unsigned long data32)
{
  spi_cs_lo()                     ;	// Set CS# low

  spi_rw(((addr>>16)|MEM_WRITE))  ; // Send Memory Write plus high address byte
     1e0:	aa 27       	eor	r26, r26
     1e2:	bb 27       	eor	r27, r27
     1e4:	80 68       	ori	r24, 0x80	; 128
     1e6:	0e 94 83 00 	call	0x106	; 0x106 <spi_rw>
  spi_rw(addr>>8)                 ; // Send middle address byte
     1ea:	bb 27       	eor	r27, r27
     1ec:	a1 2f       	mov	r26, r17
     1ee:	90 2f       	mov	r25, r16
     1f0:	8f 2d       	mov	r24, r15
     1f2:	0e 94 83 00 	call	0x106	; 0x106 <spi_rw>
  spi_rw(addr)                    ; // Send low address byte
     1f6:	8e 2d       	mov	r24, r14
     1f8:	0e 94 83 00 	call	0x106	; 0x106 <spi_rw>

  spi_rw(data32)                  ;	// Send data low byte
     1fc:	8a 2d       	mov	r24, r10
     1fe:	0e 94 83 00 	call	0x106	; 0x106 <spi_rw>
  spi_rw(data32>>8)               ;	
     202:	bb 27       	eor	r27, r27
     204:	ad 2d       	mov	r26, r13
     206:	9c 2d       	mov	r25, r12
     208:	8b 2d       	mov	r24, r11
     20a:	0e 94 83 00 	call	0x106	; 0x106 <spi_rw>
  spi_rw(data32>>16)              ;	
     20e:	c6 01       	movw	r24, r12
     210:	aa 27       	eor	r26, r26
     212:	bb 27       	eor	r27, r27
     214:	0e 94 83 00 	call	0x106	; 0x106 <spi_rw>
  spi_rw(data32>>24)              ;	// Send data high byte
     218:	ad 2c       	mov	r10, r13
     21a:	bb 24       	eor	r11, r11
     21c:	cc 24       	eor	r12, r12
     21e:	dd 24       	eor	r13, r13
     220:	8a 2d       	mov	r24, r10
     222:	0e 94 83 00 	call	0x106	; 0x106 <spi_rw>

//+++++++++++++++++ CS [PB3] ++++++++++++++++++++++

 void spi_cs_hi(void)
 {
   sbi(PORTB,3)  ;       //PB3 =1
     226:	c3 9a       	sbi	0x18, 3	; 24
  spi_rw(data32>>16)              ;	
  spi_rw(data32>>24)              ;	// Send data high byte
  
  spi_cs_hi()                     ; // Set CS# high

}
     228:	1f 91       	pop	r17
     22a:	0f 91       	pop	r16
     22c:	ff 90       	pop	r15
     22e:	ef 90       	pop	r14
     230:	df 90       	pop	r13
     232:	cf 90       	pop	r12
     234:	bf 90       	pop	r11
     236:	af 90       	pop	r10
     238:	08 95       	ret

0000023a <FT800memWriteStr>:
  ++                                                                        ++
  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/

                                                          
void FT800memWriteStr(unsigned long addr,char *str)
{
     23a:	cf 92       	push	r12
     23c:	df 92       	push	r13
     23e:	ef 92       	push	r14
     240:	ff 92       	push	r15
     242:	0f 93       	push	r16
     244:	1f 93       	push	r17
     246:	cf 93       	push	r28
     248:	df 93       	push	r29
     24a:	7b 01       	movw	r14, r22
     24c:	8c 01       	movw	r16, r24
     24e:	d4 2e       	mov	r13, r20
     250:	c5 2e       	mov	r12, r21
  unsigned int i ;
  
  num_cha = 0                     ;
     252:	10 92 6e 01 	sts	0x016E, r1
   sbi(PORTB,3)  ;       //PB3 =1
 }

void spi_cs_lo(void)
 {
   cbi(PORTB,3) ;        //PB3 =0 (Active)
     256:	c3 98       	cbi	0x18, 3	; 24
  unsigned int i ;
  
  num_cha = 0                     ;
  spi_cs_lo()                     ;	// Set CS# low

  spi_rw(((addr>>16)|MEM_WRITE))  ; // Send Memory Write plus high address byte
     258:	aa 27       	eor	r26, r26
     25a:	bb 27       	eor	r27, r27
     25c:	80 68       	ori	r24, 0x80	; 128
     25e:	0e 94 83 00 	call	0x106	; 0x106 <spi_rw>
  spi_rw(addr>>8)                 ; // Send middle address byte
     262:	bb 27       	eor	r27, r27
     264:	a1 2f       	mov	r26, r17
     266:	90 2f       	mov	r25, r16
     268:	8f 2d       	mov	r24, r15
     26a:	0e 94 83 00 	call	0x106	; 0x106 <spi_rw>
  spi_rw(addr)                    ; // Send low address byte
     26e:	8e 2d       	mov	r24, r14
     270:	0e 94 83 00 	call	0x106	; 0x106 <spi_rw>
     274:	2d 2d       	mov	r18, r13
     276:	3c 2d       	mov	r19, r12
     278:	c9 01       	movw	r24, r18
     27a:	ec 01       	movw	r28, r24
     27c:	07 c0       	rjmp	.+14     	; 0x28c <FT800memWriteStr+0x52>


 for (i=0; str[i] != '\0'; i++)     //Check End String In C
  { 					 
	  spi_rw(str[i])              ;
     27e:	0e 94 83 00 	call	0x106	; 0x106 <spi_rw>
	  num_cha +=  1               ;
     282:	80 91 6e 01 	lds	r24, 0x016E
     286:	8f 5f       	subi	r24, 0xFF	; 255
     288:	80 93 6e 01 	sts	0x016E, r24
  spi_rw(((addr>>16)|MEM_WRITE))  ; // Send Memory Write plus high address byte
  spi_rw(addr>>8)                 ; // Send middle address byte
  spi_rw(addr)                    ; // Send low address byte


 for (i=0; str[i] != '\0'; i++)     //Check End String In C
     28c:	89 91       	ld	r24, Y+
     28e:	88 23       	and	r24, r24
     290:	b1 f7       	brne	.-20     	; 0x27e <FT800memWriteStr+0x44>
  { 					 
	  spi_rw(str[i])              ;
	  num_cha +=  1               ;
   }

  spi_rw(0)                       ; //Sent End Write String Sent 0
     292:	0e 94 83 00 	call	0x106	; 0x106 <spi_rw>

  num_cha = num_cha+1             ;
     296:	80 91 6e 01 	lds	r24, 0x016E
     29a:	8f 5f       	subi	r24, 0xFF	; 255
     29c:	80 93 6e 01 	sts	0x016E, r24

//+++++++++++++++++ CS [PB3] ++++++++++++++++++++++

 void spi_cs_hi(void)
 {
   sbi(PORTB,3)  ;       //PB3 =1
     2a0:	c3 9a       	sbi	0x18, 3	; 24

  num_cha = num_cha+1             ;

  spi_cs_hi()                     ; // Set CS# high

}
     2a2:	df 91       	pop	r29
     2a4:	cf 91       	pop	r28
     2a6:	1f 91       	pop	r17
     2a8:	0f 91       	pop	r16
     2aa:	ff 90       	pop	r15
     2ac:	ef 90       	pop	r14
     2ae:	df 90       	pop	r13
     2b0:	cf 90       	pop	r12
     2b2:	08 95       	ret

000002b4 <FT800_HostCmdWrite>:
   sbi(PORTB,3)  ;       //PB3 =1
 }

void spi_cs_lo(void)
 {
   cbi(PORTB,3) ;        //PB3 =0 (Active)
     2b4:	c3 98       	cbi	0x18, 3	; 24

void FT800_HostCmdWrite(unsigned char Command)
{
  spi_cs_lo()            ;  // Set CS# low

  spi_rw(Command)        ;  // Send command
     2b6:	0e 94 83 00 	call	0x106	; 0x106 <spi_rw>
  spi_rw(0x00)           ;  // Commands consist of two more zero bytes
     2ba:	80 e0       	ldi	r24, 0x00	; 0
     2bc:	0e 94 83 00 	call	0x106	; 0x106 <spi_rw>
  spi_rw(0x00)           ;  // Send last zero byte
     2c0:	80 e0       	ldi	r24, 0x00	; 0
     2c2:	0e 94 83 00 	call	0x106	; 0x106 <spi_rw>

//+++++++++++++++++ CS [PB3] ++++++++++++++++++++++

 void spi_cs_hi(void)
 {
   sbi(PORTB,3)  ;       //PB3 =1
     2c6:	c3 9a       	sbi	0x18, 3	; 24
  spi_rw(Command)        ;  // Send command
  spi_rw(0x00)           ;  // Commands consist of two more zero bytes
  spi_rw(0x00)           ;  // Send last zero byte

  spi_cs_hi()            ;  // Set CS# high
}
     2c8:	08 95       	ret

000002ca <FT800memRead8>:


//++++++++++++++++++ Function-Read data Memory 8 bit +++++++++++++++++++++++

unsigned char FT800memRead8(unsigned long addr)
{
     2ca:	ef 92       	push	r14
     2cc:	ff 92       	push	r15
     2ce:	0f 93       	push	r16
     2d0:	1f 93       	push	r17
     2d2:	7b 01       	movw	r14, r22
     2d4:	8c 01       	movw	r16, r24
   sbi(PORTB,3)  ;       //PB3 =1
 }

void spi_cs_lo(void)
 {
   cbi(PORTB,3) ;        //PB3 =0 (Active)
     2d6:	c3 98       	cbi	0x18, 3	; 24
{
  unsigned char data8 ;

  spi_cs_lo()                     ; // Set CS# low

  spi_rw(((addr>>16)&MEM_READ))   ; // Send Memory Write plus high address byte
     2d8:	c8 01       	movw	r24, r16
     2da:	aa 27       	eor	r26, r26
     2dc:	bb 27       	eor	r27, r27
     2de:	8f 73       	andi	r24, 0x3F	; 63
     2e0:	0e 94 83 00 	call	0x106	; 0x106 <spi_rw>
  spi_rw(addr>>8)                 ; // Send middle address byte
     2e4:	bb 27       	eor	r27, r27
     2e6:	a1 2f       	mov	r26, r17
     2e8:	90 2f       	mov	r25, r16
     2ea:	8f 2d       	mov	r24, r15
     2ec:	0e 94 83 00 	call	0x106	; 0x106 <spi_rw>
  spi_rw(addr)                    ; // Send low address byte
     2f0:	8e 2d       	mov	r24, r14
     2f2:	0e 94 83 00 	call	0x106	; 0x106 <spi_rw>
  spi_rw(ZERO)                    ; // Send dummy byte
     2f6:	80 e0       	ldi	r24, 0x00	; 0
     2f8:	0e 94 83 00 	call	0x106	; 0x106 <spi_rw>
  data8 = spi_rw(ZERO)            ; // Read data byte
     2fc:	80 e0       	ldi	r24, 0x00	; 0
     2fe:	0e 94 83 00 	call	0x106	; 0x106 <spi_rw>

//+++++++++++++++++ CS [PB3] ++++++++++++++++++++++

 void spi_cs_hi(void)
 {
   sbi(PORTB,3)  ;       //PB3 =1
     302:	c3 9a       	sbi	0x18, 3	; 24

  spi_cs_hi()                     ; // Set CS# high
  return data8                    ;	// Return byte read


}
     304:	1f 91       	pop	r17
     306:	0f 91       	pop	r16
     308:	ff 90       	pop	r15
     30a:	ef 90       	pop	r14
     30c:	08 95       	ret

0000030e <FT800memRead16>:


//++++++++++++++++++++ Function-Read data Memory 16 bit ++++++++++++++++++++

unsigned int FT800memRead16(unsigned long addr)
{
     30e:	ef 92       	push	r14
     310:	ff 92       	push	r15
     312:	0f 93       	push	r16
     314:	1f 93       	push	r17
     316:	7b 01       	movw	r14, r22
     318:	8c 01       	movw	r16, r24
   sbi(PORTB,3)  ;       //PB3 =1
 }

void spi_cs_lo(void)
 {
   cbi(PORTB,3) ;        //PB3 =0 (Active)
     31a:	c3 98       	cbi	0x18, 3	; 24
{
  unsigned int data16,dat;

  spi_cs_lo()                                  ; // Set CS# low

  spi_rw(((addr>>16)&MEM_READ))                ; // Send Memory Write plus high address byte
     31c:	aa 27       	eor	r26, r26
     31e:	bb 27       	eor	r27, r27
     320:	8f 73       	andi	r24, 0x3F	; 63
     322:	0e 94 83 00 	call	0x106	; 0x106 <spi_rw>
  spi_rw(addr>>8)                              ; // Send middle address byte
     326:	bb 27       	eor	r27, r27
     328:	a1 2f       	mov	r26, r17
     32a:	90 2f       	mov	r25, r16
     32c:	8f 2d       	mov	r24, r15
     32e:	0e 94 83 00 	call	0x106	; 0x106 <spi_rw>
  spi_rw(addr)                                 ; // Send low address byte
     332:	8e 2d       	mov	r24, r14
     334:	0e 94 83 00 	call	0x106	; 0x106 <spi_rw>
  spi_rw(ZERO)                                 ; // Send dummy byte
     338:	80 e0       	ldi	r24, 0x00	; 0
     33a:	0e 94 83 00 	call	0x106	; 0x106 <spi_rw>


  data16 = spi_rw(ZERO)                        ; // Read low byte
     33e:	80 e0       	ldi	r24, 0x00	; 0
     340:	0e 94 83 00 	call	0x106	; 0x106 <spi_rw>
     344:	08 2f       	mov	r16, r24
     346:	10 e0       	ldi	r17, 0x00	; 0
  dat    = spi_rw(ZERO)                        ; // Read high byte
     348:	80 e0       	ldi	r24, 0x00	; 0
     34a:	0e 94 83 00 	call	0x106	; 0x106 <spi_rw>

//+++++++++++++++++ CS [PB3] ++++++++++++++++++++++

 void spi_cs_hi(void)
 {
   sbi(PORTB,3)  ;       //PB3 =1
     34e:	c3 9a       	sbi	0x18, 3	; 24
     350:	38 2f       	mov	r19, r24
     352:	20 e0       	ldi	r18, 0x00	; 0
     354:	20 2b       	or	r18, r16
     356:	31 2b       	or	r19, r17
 

  spi_cs_hi()                                  ; // Set CS# high
    
  return data16;				                 // Return integer read
}
     358:	c9 01       	movw	r24, r18
     35a:	1f 91       	pop	r17
     35c:	0f 91       	pop	r16
     35e:	ff 90       	pop	r15
     360:	ef 90       	pop	r14
     362:	08 95       	ret

00000364 <FT800memRead32>:


//+++++++++++++++++ Function-Read data Memory 32 bit +++++++++++++++++++++

unsigned long FT800memRead32(unsigned long addr)
{
     364:	6f 92       	push	r6
     366:	7f 92       	push	r7
     368:	8f 92       	push	r8
     36a:	9f 92       	push	r9
     36c:	af 92       	push	r10
     36e:	bf 92       	push	r11
     370:	cf 92       	push	r12
     372:	df 92       	push	r13
     374:	ef 92       	push	r14
     376:	ff 92       	push	r15
     378:	0f 93       	push	r16
     37a:	1f 93       	push	r17
     37c:	7b 01       	movw	r14, r22
     37e:	8c 01       	movw	r16, r24
   sbi(PORTB,3)  ;       //PB3 =1
 }

void spi_cs_lo(void)
 {
   cbi(PORTB,3) ;        //PB3 =0 (Active)
     380:	c3 98       	cbi	0x18, 3	; 24
{
  unsigned long data32,dat;

  spi_cs_lo()                                  ; // Set CS# low

  spi_rw(((addr>>16)&MEM_READ))                ; // Send Memory Write plus high address byte
     382:	c8 01       	movw	r24, r16
     384:	aa 27       	eor	r26, r26
     386:	bb 27       	eor	r27, r27
     388:	8f 73       	andi	r24, 0x3F	; 63
     38a:	0e 94 83 00 	call	0x106	; 0x106 <spi_rw>
  spi_rw(addr>>8)                              ; // Send middle address byte
     38e:	bb 27       	eor	r27, r27
     390:	a1 2f       	mov	r26, r17
     392:	90 2f       	mov	r25, r16
     394:	8f 2d       	mov	r24, r15
     396:	0e 94 83 00 	call	0x106	; 0x106 <spi_rw>
  spi_rw(addr)                                 ; // Send low address byte
     39a:	8e 2d       	mov	r24, r14
     39c:	0e 94 83 00 	call	0x106	; 0x106 <spi_rw>
  spi_rw(ZERO)                                 ; // Send dummy byte
     3a0:	80 e0       	ldi	r24, 0x00	; 0
     3a2:	0e 94 83 00 	call	0x106	; 0x106 <spi_rw>


  data32 = spi_rw(ZERO)                        ; // Read low byte
     3a6:	80 e0       	ldi	r24, 0x00	; 0
     3a8:	0e 94 83 00 	call	0x106	; 0x106 <spi_rw>
     3ac:	68 2e       	mov	r6, r24
     3ae:	77 24       	eor	r7, r7
     3b0:	88 24       	eor	r8, r8
     3b2:	99 24       	eor	r9, r9
  dat    = spi_rw(ZERO)                        ; 
     3b4:	80 e0       	ldi	r24, 0x00	; 0
     3b6:	0e 94 83 00 	call	0x106	; 0x106 <spi_rw>
     3ba:	e8 2e       	mov	r14, r24
  data32 = (dat<<8)| data32                    ;
  dat    = spi_rw(ZERO)                        ; 
     3bc:	80 e0       	ldi	r24, 0x00	; 0
     3be:	0e 94 83 00 	call	0x106	; 0x106 <spi_rw>
     3c2:	a8 2e       	mov	r10, r24
  data32 = (dat<<16)| data32                   ;
  dat    = spi_rw(ZERO)                        ; // Read high byte 
     3c4:	80 e0       	ldi	r24, 0x00	; 0
     3c6:	0e 94 83 00 	call	0x106	; 0x106 <spi_rw>
  spi_rw(ZERO)                                 ; // Send dummy byte


  data32 = spi_rw(ZERO)                        ; // Read low byte
  dat    = spi_rw(ZERO)                        ; 
  data32 = (dat<<8)| data32                    ;
     3ca:	ff 24       	eor	r15, r15
     3cc:	00 e0       	ldi	r16, 0x00	; 0
     3ce:	10 e0       	ldi	r17, 0x00	; 0
     3d0:	10 2f       	mov	r17, r16
     3d2:	0f 2d       	mov	r16, r15
     3d4:	fe 2c       	mov	r15, r14
     3d6:	ee 24       	eor	r14, r14
     3d8:	bb 24       	eor	r11, r11
     3da:	cc 24       	eor	r12, r12
     3dc:	dd 24       	eor	r13, r13
     3de:	65 01       	movw	r12, r10
     3e0:	bb 24       	eor	r11, r11
     3e2:	aa 24       	eor	r10, r10
     3e4:	ea 28       	or	r14, r10
     3e6:	fb 28       	or	r15, r11
     3e8:	0c 29       	or	r16, r12
     3ea:	1d 29       	or	r17, r13
  dat    = spi_rw(ZERO)                        ; 
  data32 = (dat<<16)| data32                   ;
     3ec:	e6 28       	or	r14, r6
     3ee:	f7 28       	or	r15, r7
     3f0:	08 29       	or	r16, r8
     3f2:	19 29       	or	r17, r9

//+++++++++++++++++ CS [PB3] ++++++++++++++++++++++

 void spi_cs_hi(void)
 {
   sbi(PORTB,3)  ;       //PB3 =1
     3f4:	c3 9a       	sbi	0x18, 3	; 24
     3f6:	90 e0       	ldi	r25, 0x00	; 0
     3f8:	a0 e0       	ldi	r26, 0x00	; 0
     3fa:	b0 e0       	ldi	r27, 0x00	; 0
     3fc:	b8 2f       	mov	r27, r24
     3fe:	aa 27       	eor	r26, r26
     400:	99 27       	eor	r25, r25
     402:	88 27       	eor	r24, r24
     404:	e8 2a       	or	r14, r24
     406:	f9 2a       	or	r15, r25
     408:	0a 2b       	or	r16, r26
     40a:	1b 2b       	or	r17, r27
  data32 = (dat<<24)| data32                   ;

  spi_cs_hi()                                  ; // Set CS# high
    
  return data32                                ; // Return integer read
}
     40c:	b7 01       	movw	r22, r14
     40e:	c8 01       	movw	r24, r16
     410:	1f 91       	pop	r17
     412:	0f 91       	pop	r16
     414:	ff 90       	pop	r15
     416:	ef 90       	pop	r14
     418:	df 90       	pop	r13
     41a:	cf 90       	pop	r12
     41c:	bf 90       	pop	r11
     41e:	af 90       	pop	r10
     420:	9f 90       	pop	r9
     422:	8f 90       	pop	r8
     424:	7f 90       	pop	r7
     426:	6f 90       	pop	r6
     428:	08 95       	ret

0000042a <Start_CMDOffset>:

 {
  //------------Determine Pointer Offset for Ram_CMD Address---------------
	 do
     {
       cmdBufferRd = FT800memRead16(REG_CMD_READ)      ;   //***Read Reg.the graphics processor read pointer
     42a:	64 ee       	ldi	r22, 0xE4	; 228
     42c:	74 e2       	ldi	r23, 0x24	; 36
     42e:	80 e1       	ldi	r24, 0x10	; 16
     430:	90 e0       	ldi	r25, 0x00	; 0
     432:	0e 94 87 01 	call	0x30e	; 0x30e <FT800memRead16>
     436:	90 93 65 01 	sts	0x0165, r25
     43a:	80 93 64 01 	sts	0x0164, r24
       cmdBufferWr = FT800memRead16(REG_CMD_WRITE)     ;   //***Read Reg.the graphics processor write pointer
     43e:	68 ee       	ldi	r22, 0xE8	; 232
     440:	74 e2       	ldi	r23, 0x24	; 36
     442:	80 e1       	ldi	r24, 0x10	; 16
     444:	90 e0       	ldi	r25, 0x00	; 0
     446:	0e 94 87 01 	call	0x30e	; 0x30e <FT800memRead16>
     44a:	9c 01       	movw	r18, r24
     44c:	90 93 67 01 	sts	0x0167, r25
     450:	80 93 66 01 	sts	0x0166, r24
  
     }while(cmdBufferWr != cmdBufferRd)                ;   //Wait until the two registers match
     454:	80 91 64 01 	lds	r24, 0x0164
     458:	90 91 65 01 	lds	r25, 0x0165
     45c:	28 17       	cp	r18, r24
     45e:	39 07       	cpc	r19, r25
     460:	21 f7       	brne	.-56     	; 0x42a <Start_CMDOffset>
  
      cmdOffset = cmdBufferWr                          ;   //The new starting point the first location after the last command
     462:	30 93 63 01 	sts	0x0163, r19
     466:	20 93 62 01 	sts	0x0162, r18

  }
     46a:	08 95       	ret

0000046c <incCMDOffset>:

unsigned int incCMDOffset(unsigned int currentOffset, unsigned char commandSize)
{
    unsigned int newOffset                  ;   //used to hold new offset

    newOffset = currentOffset + commandSize ;	//Calculate new offset
     46c:	9c 01       	movw	r18, r24
     46e:	26 0f       	add	r18, r22
     470:	31 1d       	adc	r19, r1

    if(newOffset > 4095)			            //If new offset past boundary...
     472:	80 e1       	ldi	r24, 0x10	; 16
     474:	20 30       	cpi	r18, 0x00	; 0
     476:	38 07       	cpc	r19, r24
     478:	10 f0       	brcs	.+4      	; 0x47e <incCMDOffset+0x12>
    {
        newOffset = (newOffset - 4096)      ;	//... roll over pointer
     47a:	20 50       	subi	r18, 0x00	; 0
     47c:	30 41       	sbci	r19, 0x10	; 16
    }

    return newOffset;				            //Return new offset
}
     47e:	c9 01       	movw	r24, r18
     480:	08 95       	ret

00000482 <End_incCMDOffset>:

unsigned int End_incCMDOffset(unsigned int currentOffset, unsigned char commandSize)
{
  unsigned int newOffset                   ;  //used to hold new offset

   newOffset = currentOffset + commandSize ;  //Calculate new offset
     482:	9c 01       	movw	r18, r24
     484:	26 0f       	add	r18, r22
     486:	31 1d       	adc	r19, r1

   if(newOffset > 4095)	             	  	  //If new offset past boundary...
     488:	80 e1       	ldi	r24, 0x10	; 16
     48a:	20 30       	cpi	r18, 0x00	; 0
     48c:	38 07       	cpc	r19, r24
     48e:	10 f0       	brcs	.+4      	; 0x494 <End_incCMDOffset+0x12>
    {
        newOffset = (newOffset - 4096)     ;  //... roll over pointer
     490:	20 50       	subi	r18, 0x00	; 0
     492:	30 41       	sbci	r19, 0x10	; 16
    }
   

  //increment the length and align it by 4 bytes//

   newOffset = (newOffset+3) & 4092        ;
     494:	2d 5f       	subi	r18, 0xFD	; 253
     496:	3f 4f       	sbci	r19, 0xFF	; 255
     498:	2c 7f       	andi	r18, 0xFC	; 252
     49a:	3f 70       	andi	r19, 0x0F	; 15

   return newOffset;				          //Return new offset
}
     49c:	c9 01       	movw	r24, r18
     49e:	08 95       	ret

000004a0 <Touch_Detect>:

 char Touch_Detect(void)
  {
    unsigned int td  ;

    td = FT800memRead16(REG_TOUCH_RAW_XY)  ;   //***Read Reg.Toucu Detect
     4a0:	68 e0       	ldi	r22, 0x08	; 8
     4a2:	75 e2       	ldi	r23, 0x25	; 37
     4a4:	80 e1       	ldi	r24, 0x10	; 16
     4a6:	90 e0       	ldi	r25, 0x00	; 0
     4a8:	0e 94 87 01 	call	0x30e	; 0x30e <FT800memRead16>
     4ac:	20 e0       	ldi	r18, 0x00	; 0
     4ae:	8f 5f       	subi	r24, 0xFF	; 255
     4b0:	9f 4f       	sbci	r25, 0xFF	; 255
     4b2:	09 f0       	breq	.+2      	; 0x4b6 <Touch_Detect+0x16>
     4b4:	21 e0       	ldi	r18, 0x01	; 1
	if(td != 0xFFFF)   
	  return 1 ;       //Touch return 1
    else
	  return 0 ;       //No Touch return 0
	   
  }
     4b6:	82 2f       	mov	r24, r18
     4b8:	08 95       	ret

000004ba <Touch_Read_XY>:

void Touch_Read_XY(void)
 {
    unsigned long xy ;  

   xy = FT800memRead32(REG_TOUCH_SCREEN_XY)   ; //***Read Reg : Read Value Position XY Touch Screen
     4ba:	60 e1       	ldi	r22, 0x10	; 16
     4bc:	75 e2       	ldi	r23, 0x25	; 37
     4be:	80 e1       	ldi	r24, 0x10	; 16
     4c0:	90 e0       	ldi	r25, 0x00	; 0
     4c2:	0e 94 b2 01 	call	0x364	; 0x364 <FT800memRead32>

   tc_x = (xy >> 16) & 0x000001FF             ; //Mark X-Position 0-479 in Pixel
     4c6:	9c 01       	movw	r18, r24
     4c8:	44 27       	eor	r20, r20
     4ca:	55 27       	eor	r21, r21
     4cc:	31 70       	andi	r19, 0x01	; 1
     4ce:	30 93 70 01 	sts	0x0170, r19
     4d2:	20 93 6f 01 	sts	0x016F, r18

   tc_y = xy & 0x1FF                          ; //Mark Y-Position 0-271 in Pixel 
     4d6:	71 70       	andi	r23, 0x01	; 1
     4d8:	70 93 72 01 	sts	0x0172, r23
     4dc:	60 93 71 01 	sts	0x0171, r22

 }
     4e0:	08 95       	ret

000004e2 <Sound_Effect>:
  ++                    00 : No Sound                                     ++                                                     
  ++                                                                      ++
  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/

 void Sound_Effect(unsigned char vol,int midi,int effect)
  {
     4e2:	ff 92       	push	r15
     4e4:	0f 93       	push	r16
     4e6:	1f 93       	push	r17
     4e8:	28 2f       	mov	r18, r24
     4ea:	f6 2e       	mov	r15, r22
     4ec:	8a 01       	movw	r16, r20

    midi = midi << 8                                ;  //Set data Midi 8 bit High
    FT800memWrite8(REG_VOL_SOUND,vol)               ;  //***Write data to Reg : Turn synthesizer volume 0-0xFF   
     4ee:	60 e8       	ldi	r22, 0x80	; 128
     4f0:	74 e2       	ldi	r23, 0x24	; 36
     4f2:	80 e1       	ldi	r24, 0x10	; 16
     4f4:	90 e0       	ldi	r25, 0x00	; 0
     4f6:	42 2f       	mov	r20, r18
     4f8:	0e 94 9a 00 	call	0x134	; 0x134 <FT800memWrite8>
    FT800memWrite16(REG_SOUND,midi | effect)        ;  //***Write data to Reg : Select Sound Effect = Silence(No Sound) 
     4fc:	5f 2d       	mov	r21, r15
     4fe:	40 e0       	ldi	r20, 0x00	; 0
     500:	40 2b       	or	r20, r16
     502:	51 2b       	or	r21, r17
     504:	64 e8       	ldi	r22, 0x84	; 132
     506:	74 e2       	ldi	r23, 0x24	; 36
     508:	80 e1       	ldi	r24, 0x10	; 16
     50a:	90 e0       	ldi	r25, 0x00	; 0
     50c:	0e 94 bc 00 	call	0x178	; 0x178 <FT800memWrite16>
    FT800memWrite8(REG_PLAY,0x01)                   ;  //***Write data to Reg : Play Sound Effect
     510:	68 e8       	ldi	r22, 0x88	; 136
     512:	74 e2       	ldi	r23, 0x24	; 36
     514:	80 e1       	ldi	r24, 0x10	; 16
     516:	90 e0       	ldi	r25, 0x00	; 0
     518:	41 e0       	ldi	r20, 0x01	; 1
     51a:	0e 94 9a 00 	call	0x134	; 0x134 <FT800memWrite8>


  }
     51e:	1f 91       	pop	r17
     520:	0f 91       	pop	r16
     522:	ff 90       	pop	r15
     524:	08 95       	ret

00000526 <Start_CMDList>:
  ++           screen_color  : Color Background Screen                            ++
  ++                                                                              ++
  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
  
  void Start_CMDList(long screen_color)
   {
     526:	ef 92       	push	r14
     528:	ff 92       	push	r15
     52a:	0f 93       	push	r16
     52c:	1f 93       	push	r17
     52e:	7b 01       	movw	r14, r22
     530:	8c 01       	movw	r16, r24

    //-------------------- Start Display List ------------------------

	 Start_CMDOffset()                                                  ; //Start Offset pointer for Ram-CMD
     532:	0e 94 15 02 	call	0x42a	; 0x42a <Start_CMDOffset>

     FT800memWrite32(RAM_CMD + cmdOffset,CMD_DLSTART)                   ; //*** Sent Co-CMD Start the display list					                              	     
     536:	60 91 62 01 	lds	r22, 0x0162
     53a:	70 91 63 01 	lds	r23, 0x0163
     53e:	80 e0       	ldi	r24, 0x00	; 0
     540:	90 e0       	ldi	r25, 0x00	; 0
     542:	60 50       	subi	r22, 0x00	; 0
     544:	70 48       	sbci	r23, 0x80	; 128
     546:	8f 4e       	sbci	r24, 0xEF	; 239
     548:	9f 4f       	sbci	r25, 0xFF	; 255
     54a:	20 e0       	ldi	r18, 0x00	; 0
     54c:	3f ef       	ldi	r19, 0xFF	; 255
     54e:	4f ef       	ldi	r20, 0xFF	; 255
     550:	5f ef       	ldi	r21, 0xFF	; 255
     552:	0e 94 e3 00 	call	0x1c6	; 0x1c6 <FT800memWrite32>

unsigned int incCMDOffset(unsigned int currentOffset, unsigned char commandSize)
{
    unsigned int newOffset                  ;   //used to hold new offset

    newOffset = currentOffset + commandSize ;	//Calculate new offset
     556:	80 91 62 01 	lds	r24, 0x0162
     55a:	90 91 63 01 	lds	r25, 0x0163
     55e:	bc 01       	movw	r22, r24
     560:	6c 5f       	subi	r22, 0xFC	; 252
     562:	7f 4f       	sbci	r23, 0xFF	; 255

    if(newOffset > 4095)			            //If new offset past boundary...
     564:	20 e1       	ldi	r18, 0x10	; 16
     566:	60 30       	cpi	r22, 0x00	; 0
     568:	72 07       	cpc	r23, r18
     56a:	18 f0       	brcs	.+6      	; 0x572 <Start_CMDList+0x4c>
    {
        newOffset = (newOffset - 4096)      ;	//... roll over pointer
     56c:	bc 01       	movw	r22, r24
     56e:	6c 5f       	subi	r22, 0xFC	; 252
     570:	7f 40       	sbci	r23, 0x0F	; 15
    //-------------------- Start Display List ------------------------

	 Start_CMDOffset()                                                  ; //Start Offset pointer for Ram-CMD

     FT800memWrite32(RAM_CMD + cmdOffset,CMD_DLSTART)                   ; //*** Sent Co-CMD Start the display list					                              	     
     cmdOffset = incCMDOffset(cmdOffset,4)                              ; //Update Offset pointer Ram-CMD 4 byte for Next CMD     
     572:	70 93 63 01 	sts	0x0163, r23
     576:	60 93 62 01 	sts	0x0162, r22
    
     FT800memWrite32(RAM_CMD + cmdOffset,(DL_CLEAR_RGB | screen_color)) ; //*** Sent DL-CMD Clear color BackGround to Black (Set BackGround)						
     57a:	80 e0       	ldi	r24, 0x00	; 0
     57c:	90 e0       	ldi	r25, 0x00	; 0
     57e:	60 50       	subi	r22, 0x00	; 0
     580:	70 48       	sbci	r23, 0x80	; 128
     582:	8f 4e       	sbci	r24, 0xEF	; 239
     584:	9f 4f       	sbci	r25, 0xFF	; 255
     586:	20 e0       	ldi	r18, 0x00	; 0
     588:	30 e0       	ldi	r19, 0x00	; 0
     58a:	40 e0       	ldi	r20, 0x00	; 0
     58c:	52 e0       	ldi	r21, 0x02	; 2
     58e:	e2 2a       	or	r14, r18
     590:	f3 2a       	or	r15, r19
     592:	04 2b       	or	r16, r20
     594:	15 2b       	or	r17, r21
     596:	a8 01       	movw	r20, r16
     598:	97 01       	movw	r18, r14
     59a:	0e 94 e3 00 	call	0x1c6	; 0x1c6 <FT800memWrite32>

unsigned int incCMDOffset(unsigned int currentOffset, unsigned char commandSize)
{
    unsigned int newOffset                  ;   //used to hold new offset

    newOffset = currentOffset + commandSize ;	//Calculate new offset
     59e:	80 91 62 01 	lds	r24, 0x0162
     5a2:	90 91 63 01 	lds	r25, 0x0163
     5a6:	bc 01       	movw	r22, r24
     5a8:	6c 5f       	subi	r22, 0xFC	; 252
     5aa:	7f 4f       	sbci	r23, 0xFF	; 255

    if(newOffset > 4095)			            //If new offset past boundary...
     5ac:	30 e1       	ldi	r19, 0x10	; 16
     5ae:	60 30       	cpi	r22, 0x00	; 0
     5b0:	73 07       	cpc	r23, r19
     5b2:	18 f0       	brcs	.+6      	; 0x5ba <Start_CMDList+0x94>
    {
        newOffset = (newOffset - 4096)      ;	//... roll over pointer
     5b4:	bc 01       	movw	r22, r24
     5b6:	6c 5f       	subi	r22, 0xFC	; 252
     5b8:	7f 40       	sbci	r23, 0x0F	; 15

     FT800memWrite32(RAM_CMD + cmdOffset,CMD_DLSTART)                   ; //*** Sent Co-CMD Start the display list					                              	     
     cmdOffset = incCMDOffset(cmdOffset,4)                              ; //Update Offset pointer Ram-CMD 4 byte for Next CMD     
    
     FT800memWrite32(RAM_CMD + cmdOffset,(DL_CLEAR_RGB | screen_color)) ; //*** Sent DL-CMD Clear color BackGround to Black (Set BackGround)						
     cmdOffset = incCMDOffset(cmdOffset,4)                              ; //Update Offset pointer Ram-CMD 4 byte for Next CMD
     5ba:	70 93 63 01 	sts	0x0163, r23
     5be:	60 93 62 01 	sts	0x0162, r22

     FT800memWrite32(RAM_CMD + cmdOffset,(DL_CLEAR | CLR_COL | CLR_STN | CLR_TAG));	//*** Sent DL-CMD Clear the screen - this and the previous prevent artifacts between lists	 					                                                            // Attributes are the color, stencil and tag buffers
     5c2:	80 e0       	ldi	r24, 0x00	; 0
     5c4:	90 e0       	ldi	r25, 0x00	; 0
     5c6:	60 50       	subi	r22, 0x00	; 0
     5c8:	70 48       	sbci	r23, 0x80	; 128
     5ca:	8f 4e       	sbci	r24, 0xEF	; 239
     5cc:	9f 4f       	sbci	r25, 0xFF	; 255
     5ce:	27 e0       	ldi	r18, 0x07	; 7
     5d0:	30 e0       	ldi	r19, 0x00	; 0
     5d2:	40 e0       	ldi	r20, 0x00	; 0
     5d4:	56 e2       	ldi	r21, 0x26	; 38
     5d6:	0e 94 e3 00 	call	0x1c6	; 0x1c6 <FT800memWrite32>

unsigned int incCMDOffset(unsigned int currentOffset, unsigned char commandSize)
{
    unsigned int newOffset                  ;   //used to hold new offset

    newOffset = currentOffset + commandSize ;	//Calculate new offset
     5da:	20 91 62 01 	lds	r18, 0x0162
     5de:	30 91 63 01 	lds	r19, 0x0163
     5e2:	c9 01       	movw	r24, r18
     5e4:	04 96       	adiw	r24, 0x04	; 4

    if(newOffset > 4095)			            //If new offset past boundary...
     5e6:	40 e1       	ldi	r20, 0x10	; 16
     5e8:	80 30       	cpi	r24, 0x00	; 0
     5ea:	94 07       	cpc	r25, r20
     5ec:	18 f0       	brcs	.+6      	; 0x5f4 <Start_CMDList+0xce>
    {
        newOffset = (newOffset - 4096)      ;	//... roll over pointer
     5ee:	c9 01       	movw	r24, r18
     5f0:	8c 5f       	subi	r24, 0xFC	; 252
     5f2:	9f 40       	sbci	r25, 0x0F	; 15
    
     FT800memWrite32(RAM_CMD + cmdOffset,(DL_CLEAR_RGB | screen_color)) ; //*** Sent DL-CMD Clear color BackGround to Black (Set BackGround)						
     cmdOffset = incCMDOffset(cmdOffset,4)                              ; //Update Offset pointer Ram-CMD 4 byte for Next CMD

     FT800memWrite32(RAM_CMD + cmdOffset,(DL_CLEAR | CLR_COL | CLR_STN | CLR_TAG));	//*** Sent DL-CMD Clear the screen - this and the previous prevent artifacts between lists	 					                                                            // Attributes are the color, stencil and tag buffers
     cmdOffset = incCMDOffset(cmdOffset,4)                              ;           //Update Offset pointer Ram-CMD 4 byte for Next CMD
     5f4:	90 93 63 01 	sts	0x0163, r25
     5f8:	80 93 62 01 	sts	0x0162, r24

   }
     5fc:	1f 91       	pop	r17
     5fe:	0f 91       	pop	r16
     600:	ff 90       	pop	r15
     602:	ef 90       	pop	r14
     604:	08 95       	ret

00000606 <End_CMDList>:

  void End_CMDList(void)               
  {
    //----------------- End Display List and Update Execute -----------------

    FT800memWrite32(RAM_CMD + cmdOffset,DL_DISPLAY)          ;//*** Sent DL-CMD End Display List						
     606:	60 91 62 01 	lds	r22, 0x0162
     60a:	70 91 63 01 	lds	r23, 0x0163
     60e:	80 e0       	ldi	r24, 0x00	; 0
     610:	90 e0       	ldi	r25, 0x00	; 0
     612:	60 50       	subi	r22, 0x00	; 0
     614:	70 48       	sbci	r23, 0x80	; 128
     616:	8f 4e       	sbci	r24, 0xEF	; 239
     618:	9f 4f       	sbci	r25, 0xFF	; 255
     61a:	20 e0       	ldi	r18, 0x00	; 0
     61c:	30 e0       	ldi	r19, 0x00	; 0
     61e:	40 e0       	ldi	r20, 0x00	; 0
     620:	50 e0       	ldi	r21, 0x00	; 0
     622:	0e 94 e3 00 	call	0x1c6	; 0x1c6 <FT800memWrite32>

unsigned int incCMDOffset(unsigned int currentOffset, unsigned char commandSize)
{
    unsigned int newOffset                  ;   //used to hold new offset

    newOffset = currentOffset + commandSize ;	//Calculate new offset
     626:	80 91 62 01 	lds	r24, 0x0162
     62a:	90 91 63 01 	lds	r25, 0x0163
     62e:	bc 01       	movw	r22, r24
     630:	6c 5f       	subi	r22, 0xFC	; 252
     632:	7f 4f       	sbci	r23, 0xFF	; 255

    if(newOffset > 4095)			            //If new offset past boundary...
     634:	20 e1       	ldi	r18, 0x10	; 16
     636:	60 30       	cpi	r22, 0x00	; 0
     638:	72 07       	cpc	r23, r18
     63a:	18 f0       	brcs	.+6      	; 0x642 <End_CMDList+0x3c>
    {
        newOffset = (newOffset - 4096)      ;	//... roll over pointer
     63c:	bc 01       	movw	r22, r24
     63e:	6c 5f       	subi	r22, 0xFC	; 252
     640:	7f 40       	sbci	r23, 0x0F	; 15
  void End_CMDList(void)               
  {
    //----------------- End Display List and Update Execute -----------------

    FT800memWrite32(RAM_CMD + cmdOffset,DL_DISPLAY)          ;//*** Sent DL-CMD End Display List						
    cmdOffset = incCMDOffset(cmdOffset,4)                    ;//Update Offset pointer Ram-CMD 4 byte for Next CMD
     642:	70 93 63 01 	sts	0x0163, r23
     646:	60 93 62 01 	sts	0x0162, r22
 
    FT800memWrite32(RAM_CMD + cmdOffset,CMD_SWAP)            ;//*** Sent Co-CMD Requse Display List Swap
     64a:	80 e0       	ldi	r24, 0x00	; 0
     64c:	90 e0       	ldi	r25, 0x00	; 0
     64e:	60 50       	subi	r22, 0x00	; 0
     650:	70 48       	sbci	r23, 0x80	; 128
     652:	8f 4e       	sbci	r24, 0xEF	; 239
     654:	9f 4f       	sbci	r25, 0xFF	; 255
     656:	21 e0       	ldi	r18, 0x01	; 1
     658:	3f ef       	ldi	r19, 0xFF	; 255
     65a:	4f ef       	ldi	r20, 0xFF	; 255
     65c:	5f ef       	ldi	r21, 0xFF	; 255
     65e:	0e 94 e3 00 	call	0x1c6	; 0x1c6 <FT800memWrite32>

unsigned int incCMDOffset(unsigned int currentOffset, unsigned char commandSize)
{
    unsigned int newOffset                  ;   //used to hold new offset

    newOffset = currentOffset + commandSize ;	//Calculate new offset
     662:	80 91 62 01 	lds	r24, 0x0162
     666:	90 91 63 01 	lds	r25, 0x0163
     66a:	ac 01       	movw	r20, r24
     66c:	4c 5f       	subi	r20, 0xFC	; 252
     66e:	5f 4f       	sbci	r21, 0xFF	; 255

    if(newOffset > 4095)			            //If new offset past boundary...
     670:	20 e1       	ldi	r18, 0x10	; 16
     672:	40 30       	cpi	r20, 0x00	; 0
     674:	52 07       	cpc	r21, r18
     676:	18 f0       	brcs	.+6      	; 0x67e <End_CMDList+0x78>
    {
        newOffset = (newOffset - 4096)      ;	//... roll over pointer
     678:	ac 01       	movw	r20, r24
     67a:	4c 5f       	subi	r20, 0xFC	; 252
     67c:	5f 40       	sbci	r21, 0x0F	; 15

    FT800memWrite32(RAM_CMD + cmdOffset,DL_DISPLAY)          ;//*** Sent DL-CMD End Display List						
    cmdOffset = incCMDOffset(cmdOffset,4)                    ;//Update Offset pointer Ram-CMD 4 byte for Next CMD
 
    FT800memWrite32(RAM_CMD + cmdOffset,CMD_SWAP)            ;//*** Sent Co-CMD Requse Display List Swap
    cmdOffset = incCMDOffset(cmdOffset,4)                    ;//Update Offset pointer Ram-CMD 4 byte for Next CMD
     67e:	50 93 63 01 	sts	0x0163, r21
     682:	40 93 62 01 	sts	0x0162, r20

    FT800memWrite16(REG_CMD_WRITE,cmdOffset)                 ;//*** Sent Data cmdOffset to reg. CMD_Write for
     686:	68 ee       	ldi	r22, 0xE8	; 232
     688:	74 e2       	ldi	r23, 0x24	; 36
     68a:	80 e1       	ldi	r24, 0x10	; 16
     68c:	90 e0       	ldi	r25, 0x00	; 0
     68e:	0e 94 bc 00 	call	0x178	; 0x178 <FT800memWrite16>
	                                                          //Update the ring buffer pointer so the graphics processor starts executing
  } 
     692:	08 95       	ret

00000694 <Background_DL>:
  ++     8.3) Function:Display-List Set Background  (Write Program to Ram_DL)     ++
  ++                                                                              ++                                                                       
  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/

  void Background_DL(long bg_color)               
  {
     694:	9b 01       	movw	r18, r22
     696:	ac 01       	movw	r20, r24

   FT800memWrite32(RAM_DL,(DL_CLEAR_RGB | bg_color))        ; //*** Sent DL-CMD Set Background Color  
     698:	52 60       	ori	r21, 0x02	; 2
     69a:	60 e0       	ldi	r22, 0x00	; 0
     69c:	70 e0       	ldi	r23, 0x00	; 0
     69e:	80 e1       	ldi	r24, 0x10	; 16
     6a0:	90 e0       	ldi	r25, 0x00	; 0
     6a2:	0e 94 e3 00 	call	0x1c6	; 0x1c6 <FT800memWrite32>
     
  } 
     6a6:	08 95       	ret

000006a8 <Button_CMD>:
  ++           bt_color =  Color Button                                           ++
  ++                                                                              ++
  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/

void Button_CMD(char *str,int x,int y,int wide,int high,int font,int opt,long tx_color,long bt_color)
 {
     6a8:	2f 92       	push	r2
     6aa:	3f 92       	push	r3
     6ac:	4f 92       	push	r4
     6ae:	5f 92       	push	r5
     6b0:	6f 92       	push	r6
     6b2:	7f 92       	push	r7
     6b4:	8f 92       	push	r8
     6b6:	9f 92       	push	r9
     6b8:	af 92       	push	r10
     6ba:	bf 92       	push	r11
     6bc:	cf 92       	push	r12
     6be:	df 92       	push	r13
     6c0:	ef 92       	push	r14
     6c2:	ff 92       	push	r15
     6c4:	0f 93       	push	r16
     6c6:	1f 93       	push	r17
     6c8:	df 93       	push	r29
     6ca:	cf 93       	push	r28
     6cc:	00 d0       	rcall	.+0      	; 0x6ce <Button_CMD+0x26>
     6ce:	cd b7       	in	r28, 0x3d	; 61
     6d0:	de b7       	in	r29, 0x3e	; 62
     6d2:	9a 83       	std	Y+2, r25	; 0x02
     6d4:	89 83       	std	Y+1, r24	; 0x01
     6d6:	3b 01       	movw	r6, r22
     6d8:	2a 01       	movw	r4, r20
     6da:	19 01       	movw	r2, r18
     6dc:	a5 01       	movw	r20, r10
     6de:	94 01       	movw	r18, r8

   	// Set Attribute Button //

	FT800memWrite32(RAM_CMD + cmdOffset,(DL_COLOR_RGB | tx_color))      ; //*** Sent DL-CMD Set Color Text  				
     6e0:	60 91 62 01 	lds	r22, 0x0162
     6e4:	70 91 63 01 	lds	r23, 0x0163
     6e8:	80 e0       	ldi	r24, 0x00	; 0
     6ea:	90 e0       	ldi	r25, 0x00	; 0
     6ec:	60 50       	subi	r22, 0x00	; 0
     6ee:	70 48       	sbci	r23, 0x80	; 128
     6f0:	8f 4e       	sbci	r24, 0xEF	; 239
     6f2:	9f 4f       	sbci	r25, 0xFF	; 255
     6f4:	54 60       	ori	r21, 0x04	; 4
     6f6:	0e 94 e3 00 	call	0x1c6	; 0x1c6 <FT800memWrite32>

unsigned int incCMDOffset(unsigned int currentOffset, unsigned char commandSize)
{
    unsigned int newOffset                  ;   //used to hold new offset

    newOffset = currentOffset + commandSize ;	//Calculate new offset
     6fa:	80 91 62 01 	lds	r24, 0x0162
     6fe:	90 91 63 01 	lds	r25, 0x0163
     702:	bc 01       	movw	r22, r24
     704:	6c 5f       	subi	r22, 0xFC	; 252
     706:	7f 4f       	sbci	r23, 0xFF	; 255

    if(newOffset > 4095)			            //If new offset past boundary...
     708:	20 e1       	ldi	r18, 0x10	; 16
     70a:	60 30       	cpi	r22, 0x00	; 0
     70c:	72 07       	cpc	r23, r18
     70e:	18 f0       	brcs	.+6      	; 0x716 <Button_CMD+0x6e>
    {
        newOffset = (newOffset - 4096)      ;	//... roll over pointer
     710:	bc 01       	movw	r22, r24
     712:	6c 5f       	subi	r22, 0xFC	; 252
     714:	7f 40       	sbci	r23, 0x0F	; 15
 {

   	// Set Attribute Button //

	FT800memWrite32(RAM_CMD + cmdOffset,(DL_COLOR_RGB | tx_color))      ; //*** Sent DL-CMD Set Color Text  				
    cmdOffset = incCMDOffset(cmdOffset,4)                               ; //Update Offset pointer Ram-CMD 4 byte for Next CMD
     716:	70 93 63 01 	sts	0x0163, r23
     71a:	60 93 62 01 	sts	0x0162, r22


    FT800memWrite32(RAM_CMD + cmdOffset,CMD_FGCOLOR)                    ; //*** Sent Co-CMD Set Color Button				                              	     
     71e:	80 e0       	ldi	r24, 0x00	; 0
     720:	90 e0       	ldi	r25, 0x00	; 0
     722:	60 50       	subi	r22, 0x00	; 0
     724:	70 48       	sbci	r23, 0x80	; 128
     726:	8f 4e       	sbci	r24, 0xEF	; 239
     728:	9f 4f       	sbci	r25, 0xFF	; 255
     72a:	2a e0       	ldi	r18, 0x0A	; 10
     72c:	3f ef       	ldi	r19, 0xFF	; 255
     72e:	4f ef       	ldi	r20, 0xFF	; 255
     730:	5f ef       	ldi	r21, 0xFF	; 255
     732:	0e 94 e3 00 	call	0x1c6	; 0x1c6 <FT800memWrite32>

unsigned int incCMDOffset(unsigned int currentOffset, unsigned char commandSize)
{
    unsigned int newOffset                  ;   //used to hold new offset

    newOffset = currentOffset + commandSize ;	//Calculate new offset
     736:	80 91 62 01 	lds	r24, 0x0162
     73a:	90 91 63 01 	lds	r25, 0x0163
     73e:	bc 01       	movw	r22, r24
     740:	6c 5f       	subi	r22, 0xFC	; 252
     742:	7f 4f       	sbci	r23, 0xFF	; 255

    if(newOffset > 4095)			            //If new offset past boundary...
     744:	20 e1       	ldi	r18, 0x10	; 16
     746:	60 30       	cpi	r22, 0x00	; 0
     748:	72 07       	cpc	r23, r18
     74a:	18 f0       	brcs	.+6      	; 0x752 <Button_CMD+0xaa>
    {
        newOffset = (newOffset - 4096)      ;	//... roll over pointer
     74c:	bc 01       	movw	r22, r24
     74e:	6c 5f       	subi	r22, 0xFC	; 252
     750:	7f 40       	sbci	r23, 0x0F	; 15
	FT800memWrite32(RAM_CMD + cmdOffset,(DL_COLOR_RGB | tx_color))      ; //*** Sent DL-CMD Set Color Text  				
    cmdOffset = incCMDOffset(cmdOffset,4)                               ; //Update Offset pointer Ram-CMD 4 byte for Next CMD


    FT800memWrite32(RAM_CMD + cmdOffset,CMD_FGCOLOR)                    ; //*** Sent Co-CMD Set Color Button				                              	     
    cmdOffset = incCMDOffset(cmdOffset,4)                               ; //Update Offset pointer Ram-CMD 4 byte for Next CMD
     752:	70 93 63 01 	sts	0x0163, r23
     756:	60 93 62 01 	sts	0x0162, r22
   
    FT800memWrite32(RAM_CMD + cmdOffset,bt_color)                       ; //---Sent Data Color Button
     75a:	80 e0       	ldi	r24, 0x00	; 0
     75c:	90 e0       	ldi	r25, 0x00	; 0
     75e:	60 50       	subi	r22, 0x00	; 0
     760:	70 48       	sbci	r23, 0x80	; 128
     762:	8f 4e       	sbci	r24, 0xEF	; 239
     764:	9f 4f       	sbci	r25, 0xFF	; 255
     766:	2f 89       	ldd	r18, Y+23	; 0x17
     768:	38 8d       	ldd	r19, Y+24	; 0x18
     76a:	49 8d       	ldd	r20, Y+25	; 0x19
     76c:	5a 8d       	ldd	r21, Y+26	; 0x1a
     76e:	0e 94 e3 00 	call	0x1c6	; 0x1c6 <FT800memWrite32>

unsigned int incCMDOffset(unsigned int currentOffset, unsigned char commandSize)
{
    unsigned int newOffset                  ;   //used to hold new offset

    newOffset = currentOffset + commandSize ;	//Calculate new offset
     772:	80 91 62 01 	lds	r24, 0x0162
     776:	90 91 63 01 	lds	r25, 0x0163
     77a:	bc 01       	movw	r22, r24
     77c:	6c 5f       	subi	r22, 0xFC	; 252
     77e:	7f 4f       	sbci	r23, 0xFF	; 255

    if(newOffset > 4095)			            //If new offset past boundary...
     780:	20 e1       	ldi	r18, 0x10	; 16
     782:	60 30       	cpi	r22, 0x00	; 0
     784:	72 07       	cpc	r23, r18
     786:	18 f0       	brcs	.+6      	; 0x78e <Button_CMD+0xe6>
    {
        newOffset = (newOffset - 4096)      ;	//... roll over pointer
     788:	bc 01       	movw	r22, r24
     78a:	6c 5f       	subi	r22, 0xFC	; 252
     78c:	7f 40       	sbci	r23, 0x0F	; 15

    FT800memWrite32(RAM_CMD + cmdOffset,CMD_FGCOLOR)                    ; //*** Sent Co-CMD Set Color Button				                              	     
    cmdOffset = incCMDOffset(cmdOffset,4)                               ; //Update Offset pointer Ram-CMD 4 byte for Next CMD
   
    FT800memWrite32(RAM_CMD + cmdOffset,bt_color)                       ; //---Sent Data Color Button
    cmdOffset = incCMDOffset(cmdOffset,4)                               ; //Update Offset pointer Ram-CMD 4 byte for Next CMD
     78e:	70 93 63 01 	sts	0x0163, r23
     792:	60 93 62 01 	sts	0x0162, r22

    // Start Draw Button1 //   

    FT800memWrite32(RAM_CMD + cmdOffset,CMD_BUTTON)                     ; //***Sent Co-CMD Build Button
     796:	80 e0       	ldi	r24, 0x00	; 0
     798:	90 e0       	ldi	r25, 0x00	; 0
     79a:	60 50       	subi	r22, 0x00	; 0
     79c:	70 48       	sbci	r23, 0x80	; 128
     79e:	8f 4e       	sbci	r24, 0xEF	; 239
     7a0:	9f 4f       	sbci	r25, 0xFF	; 255
     7a2:	2d e0       	ldi	r18, 0x0D	; 13
     7a4:	3f ef       	ldi	r19, 0xFF	; 255
     7a6:	4f ef       	ldi	r20, 0xFF	; 255
     7a8:	5f ef       	ldi	r21, 0xFF	; 255
     7aa:	0e 94 e3 00 	call	0x1c6	; 0x1c6 <FT800memWrite32>

unsigned int incCMDOffset(unsigned int currentOffset, unsigned char commandSize)
{
    unsigned int newOffset                  ;   //used to hold new offset

    newOffset = currentOffset + commandSize ;	//Calculate new offset
     7ae:	80 91 62 01 	lds	r24, 0x0162
     7b2:	90 91 63 01 	lds	r25, 0x0163
     7b6:	bc 01       	movw	r22, r24
     7b8:	6c 5f       	subi	r22, 0xFC	; 252
     7ba:	7f 4f       	sbci	r23, 0xFF	; 255

    if(newOffset > 4095)			            //If new offset past boundary...
     7bc:	20 e1       	ldi	r18, 0x10	; 16
     7be:	60 30       	cpi	r22, 0x00	; 0
     7c0:	72 07       	cpc	r23, r18
     7c2:	18 f0       	brcs	.+6      	; 0x7ca <Button_CMD+0x122>
    {
        newOffset = (newOffset - 4096)      ;	//... roll over pointer
     7c4:	bc 01       	movw	r22, r24
     7c6:	6c 5f       	subi	r22, 0xFC	; 252
     7c8:	7f 40       	sbci	r23, 0x0F	; 15
    cmdOffset = incCMDOffset(cmdOffset,4)                               ; //Update Offset pointer Ram-CMD 4 byte for Next CMD

    // Start Draw Button1 //   

    FT800memWrite32(RAM_CMD + cmdOffset,CMD_BUTTON)                     ; //***Sent Co-CMD Build Button
    cmdOffset = incCMDOffset(cmdOffset,4)                               ; //Update Offset pointer Ram-CMD 4 byte for Next Data
     7ca:	70 93 63 01 	sts	0x0163, r23
     7ce:	60 93 62 01 	sts	0x0162, r22

    FT800memWrite16(RAM_CMD + cmdOffset,x)                              ; //---Sent data X-Point top-left (Pixel) 
     7d2:	80 e0       	ldi	r24, 0x00	; 0
     7d4:	90 e0       	ldi	r25, 0x00	; 0
     7d6:	60 50       	subi	r22, 0x00	; 0
     7d8:	70 48       	sbci	r23, 0x80	; 128
     7da:	8f 4e       	sbci	r24, 0xEF	; 239
     7dc:	9f 4f       	sbci	r25, 0xFF	; 255
     7de:	a3 01       	movw	r20, r6
     7e0:	0e 94 bc 00 	call	0x178	; 0x178 <FT800memWrite16>

unsigned int incCMDOffset(unsigned int currentOffset, unsigned char commandSize)
{
    unsigned int newOffset                  ;   //used to hold new offset

    newOffset = currentOffset + commandSize ;	//Calculate new offset
     7e4:	80 91 62 01 	lds	r24, 0x0162
     7e8:	90 91 63 01 	lds	r25, 0x0163
     7ec:	bc 01       	movw	r22, r24
     7ee:	6e 5f       	subi	r22, 0xFE	; 254
     7f0:	7f 4f       	sbci	r23, 0xFF	; 255

    if(newOffset > 4095)			            //If new offset past boundary...
     7f2:	20 e1       	ldi	r18, 0x10	; 16
     7f4:	60 30       	cpi	r22, 0x00	; 0
     7f6:	72 07       	cpc	r23, r18
     7f8:	18 f0       	brcs	.+6      	; 0x800 <Button_CMD+0x158>
    {
        newOffset = (newOffset - 4096)      ;	//... roll over pointer
     7fa:	bc 01       	movw	r22, r24
     7fc:	6e 5f       	subi	r22, 0xFE	; 254
     7fe:	7f 40       	sbci	r23, 0x0F	; 15

    FT800memWrite32(RAM_CMD + cmdOffset,CMD_BUTTON)                     ; //***Sent Co-CMD Build Button
    cmdOffset = incCMDOffset(cmdOffset,4)                               ; //Update Offset pointer Ram-CMD 4 byte for Next Data

    FT800memWrite16(RAM_CMD + cmdOffset,x)                              ; //---Sent data X-Point top-left (Pixel) 
    cmdOffset = incCMDOffset(cmdOffset,2)                               ; //Update Offset pointer Ram-CMD 2 byte for Next Data
     800:	70 93 63 01 	sts	0x0163, r23
     804:	60 93 62 01 	sts	0x0162, r22

    FT800memWrite16(RAM_CMD + cmdOffset,y)                              ; //---Sent data Y-Point  top-left (Pixel)
     808:	80 e0       	ldi	r24, 0x00	; 0
     80a:	90 e0       	ldi	r25, 0x00	; 0
     80c:	60 50       	subi	r22, 0x00	; 0
     80e:	70 48       	sbci	r23, 0x80	; 128
     810:	8f 4e       	sbci	r24, 0xEF	; 239
     812:	9f 4f       	sbci	r25, 0xFF	; 255
     814:	a2 01       	movw	r20, r4
     816:	0e 94 bc 00 	call	0x178	; 0x178 <FT800memWrite16>

unsigned int incCMDOffset(unsigned int currentOffset, unsigned char commandSize)
{
    unsigned int newOffset                  ;   //used to hold new offset

    newOffset = currentOffset + commandSize ;	//Calculate new offset
     81a:	80 91 62 01 	lds	r24, 0x0162
     81e:	90 91 63 01 	lds	r25, 0x0163
     822:	bc 01       	movw	r22, r24
     824:	6e 5f       	subi	r22, 0xFE	; 254
     826:	7f 4f       	sbci	r23, 0xFF	; 255

    if(newOffset > 4095)			            //If new offset past boundary...
     828:	20 e1       	ldi	r18, 0x10	; 16
     82a:	60 30       	cpi	r22, 0x00	; 0
     82c:	72 07       	cpc	r23, r18
     82e:	18 f0       	brcs	.+6      	; 0x836 <Button_CMD+0x18e>
    {
        newOffset = (newOffset - 4096)      ;	//... roll over pointer
     830:	bc 01       	movw	r22, r24
     832:	6e 5f       	subi	r22, 0xFE	; 254
     834:	7f 40       	sbci	r23, 0x0F	; 15

    FT800memWrite16(RAM_CMD + cmdOffset,x)                              ; //---Sent data X-Point top-left (Pixel) 
    cmdOffset = incCMDOffset(cmdOffset,2)                               ; //Update Offset pointer Ram-CMD 2 byte for Next Data

    FT800memWrite16(RAM_CMD + cmdOffset,y)                              ; //---Sent data Y-Point  top-left (Pixel)
    cmdOffset = incCMDOffset(cmdOffset,2)                               ; //Update Offset pointer Ram-CMD 2 byte for Next Data
     836:	70 93 63 01 	sts	0x0163, r23
     83a:	60 93 62 01 	sts	0x0162, r22

    FT800memWrite16(RAM_CMD + cmdOffset,wide)                           ; //---Sent data wide-Button (pixel)
     83e:	80 e0       	ldi	r24, 0x00	; 0
     840:	90 e0       	ldi	r25, 0x00	; 0
     842:	60 50       	subi	r22, 0x00	; 0
     844:	70 48       	sbci	r23, 0x80	; 128
     846:	8f 4e       	sbci	r24, 0xEF	; 239
     848:	9f 4f       	sbci	r25, 0xFF	; 255
     84a:	a1 01       	movw	r20, r2
     84c:	0e 94 bc 00 	call	0x178	; 0x178 <FT800memWrite16>

unsigned int incCMDOffset(unsigned int currentOffset, unsigned char commandSize)
{
    unsigned int newOffset                  ;   //used to hold new offset

    newOffset = currentOffset + commandSize ;	//Calculate new offset
     850:	80 91 62 01 	lds	r24, 0x0162
     854:	90 91 63 01 	lds	r25, 0x0163
     858:	bc 01       	movw	r22, r24
     85a:	6e 5f       	subi	r22, 0xFE	; 254
     85c:	7f 4f       	sbci	r23, 0xFF	; 255

    if(newOffset > 4095)			            //If new offset past boundary...
     85e:	20 e1       	ldi	r18, 0x10	; 16
     860:	60 30       	cpi	r22, 0x00	; 0
     862:	72 07       	cpc	r23, r18
     864:	18 f0       	brcs	.+6      	; 0x86c <Button_CMD+0x1c4>
    {
        newOffset = (newOffset - 4096)      ;	//... roll over pointer
     866:	bc 01       	movw	r22, r24
     868:	6e 5f       	subi	r22, 0xFE	; 254
     86a:	7f 40       	sbci	r23, 0x0F	; 15

    FT800memWrite16(RAM_CMD + cmdOffset,y)                              ; //---Sent data Y-Point  top-left (Pixel)
    cmdOffset = incCMDOffset(cmdOffset,2)                               ; //Update Offset pointer Ram-CMD 2 byte for Next Data

    FT800memWrite16(RAM_CMD + cmdOffset,wide)                           ; //---Sent data wide-Button (pixel)
    cmdOffset = incCMDOffset(cmdOffset,2)                               ; //Update Offset pointer Ram-CMD 2 byte for Next Data
     86c:	70 93 63 01 	sts	0x0163, r23
     870:	60 93 62 01 	sts	0x0162, r22

    FT800memWrite16(RAM_CMD + cmdOffset,high)                           ; //---Sent data high-Button (Pixel)					                              	     
     874:	80 e0       	ldi	r24, 0x00	; 0
     876:	90 e0       	ldi	r25, 0x00	; 0
     878:	60 50       	subi	r22, 0x00	; 0
     87a:	70 48       	sbci	r23, 0x80	; 128
     87c:	8f 4e       	sbci	r24, 0xEF	; 239
     87e:	9f 4f       	sbci	r25, 0xFF	; 255
     880:	a8 01       	movw	r20, r16
     882:	0e 94 bc 00 	call	0x178	; 0x178 <FT800memWrite16>

unsigned int incCMDOffset(unsigned int currentOffset, unsigned char commandSize)
{
    unsigned int newOffset                  ;   //used to hold new offset

    newOffset = currentOffset + commandSize ;	//Calculate new offset
     886:	80 91 62 01 	lds	r24, 0x0162
     88a:	90 91 63 01 	lds	r25, 0x0163
     88e:	bc 01       	movw	r22, r24
     890:	6e 5f       	subi	r22, 0xFE	; 254
     892:	7f 4f       	sbci	r23, 0xFF	; 255

    if(newOffset > 4095)			            //If new offset past boundary...
     894:	20 e1       	ldi	r18, 0x10	; 16
     896:	60 30       	cpi	r22, 0x00	; 0
     898:	72 07       	cpc	r23, r18
     89a:	18 f0       	brcs	.+6      	; 0x8a2 <Button_CMD+0x1fa>
    {
        newOffset = (newOffset - 4096)      ;	//... roll over pointer
     89c:	bc 01       	movw	r22, r24
     89e:	6e 5f       	subi	r22, 0xFE	; 254
     8a0:	7f 40       	sbci	r23, 0x0F	; 15

    FT800memWrite16(RAM_CMD + cmdOffset,wide)                           ; //---Sent data wide-Button (pixel)
    cmdOffset = incCMDOffset(cmdOffset,2)                               ; //Update Offset pointer Ram-CMD 2 byte for Next Data

    FT800memWrite16(RAM_CMD + cmdOffset,high)                           ; //---Sent data high-Button (Pixel)					                              	     
    cmdOffset = incCMDOffset(cmdOffset,2)                               ; //Update Offset pointer Ram-CMD 2 byte for Next Data
     8a2:	70 93 63 01 	sts	0x0163, r23
     8a6:	60 93 62 01 	sts	0x0162, r22

    FT800memWrite16(RAM_CMD + cmdOffset,font)                           ; //---Sent data format font in Button label (16,18,20,21,22...)					                              	     
     8aa:	80 e0       	ldi	r24, 0x00	; 0
     8ac:	90 e0       	ldi	r25, 0x00	; 0
     8ae:	60 50       	subi	r22, 0x00	; 0
     8b0:	70 48       	sbci	r23, 0x80	; 128
     8b2:	8f 4e       	sbci	r24, 0xEF	; 239
     8b4:	9f 4f       	sbci	r25, 0xFF	; 255
     8b6:	a7 01       	movw	r20, r14
     8b8:	0e 94 bc 00 	call	0x178	; 0x178 <FT800memWrite16>

unsigned int incCMDOffset(unsigned int currentOffset, unsigned char commandSize)
{
    unsigned int newOffset                  ;   //used to hold new offset

    newOffset = currentOffset + commandSize ;	//Calculate new offset
     8bc:	80 91 62 01 	lds	r24, 0x0162
     8c0:	90 91 63 01 	lds	r25, 0x0163
     8c4:	bc 01       	movw	r22, r24
     8c6:	6e 5f       	subi	r22, 0xFE	; 254
     8c8:	7f 4f       	sbci	r23, 0xFF	; 255

    if(newOffset > 4095)			            //If new offset past boundary...
     8ca:	20 e1       	ldi	r18, 0x10	; 16
     8cc:	60 30       	cpi	r22, 0x00	; 0
     8ce:	72 07       	cpc	r23, r18
     8d0:	18 f0       	brcs	.+6      	; 0x8d8 <Button_CMD+0x230>
    {
        newOffset = (newOffset - 4096)      ;	//... roll over pointer
     8d2:	bc 01       	movw	r22, r24
     8d4:	6e 5f       	subi	r22, 0xFE	; 254
     8d6:	7f 40       	sbci	r23, 0x0F	; 15

    FT800memWrite16(RAM_CMD + cmdOffset,high)                           ; //---Sent data high-Button (Pixel)					                              	     
    cmdOffset = incCMDOffset(cmdOffset,2)                               ; //Update Offset pointer Ram-CMD 2 byte for Next Data

    FT800memWrite16(RAM_CMD + cmdOffset,font)                           ; //---Sent data format font in Button label (16,18,20,21,22...)					                              	     
    cmdOffset = incCMDOffset(cmdOffset,2)                               ; //Update Offset pointer Ram-CMD 2 byte for Next Data
     8d8:	70 93 63 01 	sts	0x0163, r23
     8dc:	60 93 62 01 	sts	0x0162, r22

    FT800memWrite16(RAM_CMD + cmdOffset,opt)                            ; //---Sent data Option Button Drawn 3D					                              	     
     8e0:	80 e0       	ldi	r24, 0x00	; 0
     8e2:	90 e0       	ldi	r25, 0x00	; 0
     8e4:	60 50       	subi	r22, 0x00	; 0
     8e6:	70 48       	sbci	r23, 0x80	; 128
     8e8:	8f 4e       	sbci	r24, 0xEF	; 239
     8ea:	9f 4f       	sbci	r25, 0xFF	; 255
     8ec:	a6 01       	movw	r20, r12
     8ee:	0e 94 bc 00 	call	0x178	; 0x178 <FT800memWrite16>

unsigned int incCMDOffset(unsigned int currentOffset, unsigned char commandSize)
{
    unsigned int newOffset                  ;   //used to hold new offset

    newOffset = currentOffset + commandSize ;	//Calculate new offset
     8f2:	80 91 62 01 	lds	r24, 0x0162
     8f6:	90 91 63 01 	lds	r25, 0x0163
     8fa:	bc 01       	movw	r22, r24
     8fc:	6e 5f       	subi	r22, 0xFE	; 254
     8fe:	7f 4f       	sbci	r23, 0xFF	; 255

    if(newOffset > 4095)			            //If new offset past boundary...
     900:	20 e1       	ldi	r18, 0x10	; 16
     902:	60 30       	cpi	r22, 0x00	; 0
     904:	72 07       	cpc	r23, r18
     906:	18 f0       	brcs	.+6      	; 0x90e <Button_CMD+0x266>
    {
        newOffset = (newOffset - 4096)      ;	//... roll over pointer
     908:	bc 01       	movw	r22, r24
     90a:	6e 5f       	subi	r22, 0xFE	; 254
     90c:	7f 40       	sbci	r23, 0x0F	; 15

    FT800memWrite16(RAM_CMD + cmdOffset,font)                           ; //---Sent data format font in Button label (16,18,20,21,22...)					                              	     
    cmdOffset = incCMDOffset(cmdOffset,2)                               ; //Update Offset pointer Ram-CMD 2 byte for Next Data

    FT800memWrite16(RAM_CMD + cmdOffset,opt)                            ; //---Sent data Option Button Drawn 3D					                              	     
    cmdOffset = incCMDOffset(cmdOffset,2)                               ; //Update Offset pointer Ram-CMD 2 byte for Next Data
     90e:	70 93 63 01 	sts	0x0163, r23
     912:	60 93 62 01 	sts	0x0162, r22

    FT800memWriteStr(RAM_CMD + cmdOffset,str)                           ; //---Sent data Text Button Label (String)
     916:	80 e0       	ldi	r24, 0x00	; 0
     918:	90 e0       	ldi	r25, 0x00	; 0
     91a:	60 50       	subi	r22, 0x00	; 0
     91c:	70 48       	sbci	r23, 0x80	; 128
     91e:	8f 4e       	sbci	r24, 0xEF	; 239
     920:	9f 4f       	sbci	r25, 0xFF	; 255
     922:	49 81       	ldd	r20, Y+1	; 0x01
     924:	5a 81       	ldd	r21, Y+2	; 0x02
     926:	0e 94 1d 01 	call	0x23a	; 0x23a <FT800memWriteStr>

unsigned int End_incCMDOffset(unsigned int currentOffset, unsigned char commandSize)
{
  unsigned int newOffset                   ;  //used to hold new offset

   newOffset = currentOffset + commandSize ;  //Calculate new offset
     92a:	80 91 6e 01 	lds	r24, 0x016E
     92e:	20 91 62 01 	lds	r18, 0x0162
     932:	30 91 63 01 	lds	r19, 0x0163
     936:	28 0f       	add	r18, r24
     938:	31 1d       	adc	r19, r1

   if(newOffset > 4095)	             	  	  //If new offset past boundary...
     93a:	80 e1       	ldi	r24, 0x10	; 16
     93c:	20 30       	cpi	r18, 0x00	; 0
     93e:	38 07       	cpc	r19, r24
     940:	10 f0       	brcs	.+4      	; 0x946 <Button_CMD+0x29e>
    {
        newOffset = (newOffset - 4096)     ;  //... roll over pointer
     942:	20 50       	subi	r18, 0x00	; 0
     944:	30 41       	sbci	r19, 0x10	; 16
    }
   

  //increment the length and align it by 4 bytes//

   newOffset = (newOffset+3) & 4092        ;
     946:	2d 5f       	subi	r18, 0xFD	; 253
     948:	3f 4f       	sbci	r19, 0xFF	; 255

    FT800memWrite16(RAM_CMD + cmdOffset,opt)                            ; //---Sent data Option Button Drawn 3D					                              	     
    cmdOffset = incCMDOffset(cmdOffset,2)                               ; //Update Offset pointer Ram-CMD 2 byte for Next Data

    FT800memWriteStr(RAM_CMD + cmdOffset,str)                           ; //---Sent data Text Button Label (String)
    cmdOffset = End_incCMDOffset(cmdOffset,num_cha)                     ; //Update Offset pointer Ram-CMD for End CMD-Button  
     94a:	2c 7f       	andi	r18, 0xFC	; 252
     94c:	3f 70       	andi	r19, 0x0F	; 15
     94e:	30 93 63 01 	sts	0x0163, r19
     952:	20 93 62 01 	sts	0x0162, r18
 
 }
     956:	0f 90       	pop	r0
     958:	0f 90       	pop	r0
     95a:	cf 91       	pop	r28
     95c:	df 91       	pop	r29
     95e:	1f 91       	pop	r17
     960:	0f 91       	pop	r16
     962:	ff 90       	pop	r15
     964:	ef 90       	pop	r14
     966:	df 90       	pop	r13
     968:	cf 90       	pop	r12
     96a:	bf 90       	pop	r11
     96c:	af 90       	pop	r10
     96e:	9f 90       	pop	r9
     970:	8f 90       	pop	r8
     972:	7f 90       	pop	r7
     974:	6f 90       	pop	r6
     976:	5f 90       	pop	r5
     978:	4f 90       	pop	r4
     97a:	3f 90       	pop	r3
     97c:	2f 90       	pop	r2
     97e:	08 95       	ret

00000980 <Clock_CMD>:
  ++        clock_color =  Color Clock                                                     ++
  ++                                                                                       ++
  +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/

void Clock_CMD(int x,int y,int radius,int opt,int hour,int minute,int second ,int ms,long pin_color,long clock_color)
 {
     980:	2f 92       	push	r2
     982:	3f 92       	push	r3
     984:	4f 92       	push	r4
     986:	5f 92       	push	r5
     988:	6f 92       	push	r6
     98a:	7f 92       	push	r7
     98c:	8f 92       	push	r8
     98e:	9f 92       	push	r9
     990:	af 92       	push	r10
     992:	bf 92       	push	r11
     994:	cf 92       	push	r12
     996:	df 92       	push	r13
     998:	ef 92       	push	r14
     99a:	ff 92       	push	r15
     99c:	0f 93       	push	r16
     99e:	1f 93       	push	r17
     9a0:	df 93       	push	r29
     9a2:	cf 93       	push	r28
     9a4:	cd b7       	in	r28, 0x3d	; 61
     9a6:	de b7       	in	r29, 0x3e	; 62
     9a8:	4c 01       	movw	r8, r24
     9aa:	3b 01       	movw	r6, r22
     9ac:	2a 01       	movw	r4, r20
     9ae:	19 01       	movw	r2, r18
     9b0:	2d 89       	ldd	r18, Y+21	; 0x15
     9b2:	3e 89       	ldd	r19, Y+22	; 0x16
     9b4:	4f 89       	ldd	r20, Y+23	; 0x17
     9b6:	58 8d       	ldd	r21, Y+24	; 0x18

    // Set Attribute Clock //
 
	FT800memWrite32(RAM_CMD + cmdOffset,(DL_COLOR_RGB | pin_color))     ; //*** Sent DL-CMD Set Color Pin-Clock  				
     9b8:	60 91 62 01 	lds	r22, 0x0162
     9bc:	70 91 63 01 	lds	r23, 0x0163
     9c0:	80 e0       	ldi	r24, 0x00	; 0
     9c2:	90 e0       	ldi	r25, 0x00	; 0
     9c4:	60 50       	subi	r22, 0x00	; 0
     9c6:	70 48       	sbci	r23, 0x80	; 128
     9c8:	8f 4e       	sbci	r24, 0xEF	; 239
     9ca:	9f 4f       	sbci	r25, 0xFF	; 255
     9cc:	54 60       	ori	r21, 0x04	; 4
     9ce:	0e 94 e3 00 	call	0x1c6	; 0x1c6 <FT800memWrite32>

unsigned int incCMDOffset(unsigned int currentOffset, unsigned char commandSize)
{
    unsigned int newOffset                  ;   //used to hold new offset

    newOffset = currentOffset + commandSize ;	//Calculate new offset
     9d2:	80 91 62 01 	lds	r24, 0x0162
     9d6:	90 91 63 01 	lds	r25, 0x0163
     9da:	bc 01       	movw	r22, r24
     9dc:	6c 5f       	subi	r22, 0xFC	; 252
     9de:	7f 4f       	sbci	r23, 0xFF	; 255

    if(newOffset > 4095)			            //If new offset past boundary...
     9e0:	20 e1       	ldi	r18, 0x10	; 16
     9e2:	60 30       	cpi	r22, 0x00	; 0
     9e4:	72 07       	cpc	r23, r18
     9e6:	18 f0       	brcs	.+6      	; 0x9ee <Clock_CMD+0x6e>
    {
        newOffset = (newOffset - 4096)      ;	//... roll over pointer
     9e8:	bc 01       	movw	r22, r24
     9ea:	6c 5f       	subi	r22, 0xFC	; 252
     9ec:	7f 40       	sbci	r23, 0x0F	; 15
 {

    // Set Attribute Clock //
 
	FT800memWrite32(RAM_CMD + cmdOffset,(DL_COLOR_RGB | pin_color))     ; //*** Sent DL-CMD Set Color Pin-Clock  				
    cmdOffset = incCMDOffset(cmdOffset,4)                               ; //Update Offset pointer Ram-CMD 4 byte for Next CMD
     9ee:	70 93 63 01 	sts	0x0163, r23
     9f2:	60 93 62 01 	sts	0x0162, r22

	FT800memWrite32(RAM_CMD + cmdOffset,CMD_BGCOLOR)                    ; //*** Sent Co-CMD Set Background color of CLOCK
     9f6:	80 e0       	ldi	r24, 0x00	; 0
     9f8:	90 e0       	ldi	r25, 0x00	; 0
     9fa:	60 50       	subi	r22, 0x00	; 0
     9fc:	70 48       	sbci	r23, 0x80	; 128
     9fe:	8f 4e       	sbci	r24, 0xEF	; 239
     a00:	9f 4f       	sbci	r25, 0xFF	; 255
     a02:	29 e0       	ldi	r18, 0x09	; 9
     a04:	3f ef       	ldi	r19, 0xFF	; 255
     a06:	4f ef       	ldi	r20, 0xFF	; 255
     a08:	5f ef       	ldi	r21, 0xFF	; 255
     a0a:	0e 94 e3 00 	call	0x1c6	; 0x1c6 <FT800memWrite32>

unsigned int incCMDOffset(unsigned int currentOffset, unsigned char commandSize)
{
    unsigned int newOffset                  ;   //used to hold new offset

    newOffset = currentOffset + commandSize ;	//Calculate new offset
     a0e:	80 91 62 01 	lds	r24, 0x0162
     a12:	90 91 63 01 	lds	r25, 0x0163
     a16:	bc 01       	movw	r22, r24
     a18:	6c 5f       	subi	r22, 0xFC	; 252
     a1a:	7f 4f       	sbci	r23, 0xFF	; 255

    if(newOffset > 4095)			            //If new offset past boundary...
     a1c:	40 e1       	ldi	r20, 0x10	; 16
     a1e:	60 30       	cpi	r22, 0x00	; 0
     a20:	74 07       	cpc	r23, r20
     a22:	18 f0       	brcs	.+6      	; 0xa2a <Clock_CMD+0xaa>
    {
        newOffset = (newOffset - 4096)      ;	//... roll over pointer
     a24:	bc 01       	movw	r22, r24
     a26:	6c 5f       	subi	r22, 0xFC	; 252
     a28:	7f 40       	sbci	r23, 0x0F	; 15
 
	FT800memWrite32(RAM_CMD + cmdOffset,(DL_COLOR_RGB | pin_color))     ; //*** Sent DL-CMD Set Color Pin-Clock  				
    cmdOffset = incCMDOffset(cmdOffset,4)                               ; //Update Offset pointer Ram-CMD 4 byte for Next CMD

	FT800memWrite32(RAM_CMD + cmdOffset,CMD_BGCOLOR)                    ; //*** Sent Co-CMD Set Background color of CLOCK
    cmdOffset = incCMDOffset(cmdOffset,4)                               ; //Update Offset pointer Ram-CMD 4 byte for Next CMD
     a2a:	70 93 63 01 	sts	0x0163, r23
     a2e:	60 93 62 01 	sts	0x0162, r22

    FT800memWrite32(RAM_CMD + cmdOffset,clock_color)                    ; //--- Sent data color bacground clock 					                              	     
     a32:	80 e0       	ldi	r24, 0x00	; 0
     a34:	90 e0       	ldi	r25, 0x00	; 0
     a36:	60 50       	subi	r22, 0x00	; 0
     a38:	70 48       	sbci	r23, 0x80	; 128
     a3a:	8f 4e       	sbci	r24, 0xEF	; 239
     a3c:	9f 4f       	sbci	r25, 0xFF	; 255
     a3e:	29 8d       	ldd	r18, Y+25	; 0x19
     a40:	3a 8d       	ldd	r19, Y+26	; 0x1a
     a42:	4b 8d       	ldd	r20, Y+27	; 0x1b
     a44:	5c 8d       	ldd	r21, Y+28	; 0x1c
     a46:	0e 94 e3 00 	call	0x1c6	; 0x1c6 <FT800memWrite32>

unsigned int incCMDOffset(unsigned int currentOffset, unsigned char commandSize)
{
    unsigned int newOffset                  ;   //used to hold new offset

    newOffset = currentOffset + commandSize ;	//Calculate new offset
     a4a:	80 91 62 01 	lds	r24, 0x0162
     a4e:	90 91 63 01 	lds	r25, 0x0163
     a52:	bc 01       	movw	r22, r24
     a54:	6c 5f       	subi	r22, 0xFC	; 252
     a56:	7f 4f       	sbci	r23, 0xFF	; 255

    if(newOffset > 4095)			            //If new offset past boundary...
     a58:	20 e1       	ldi	r18, 0x10	; 16
     a5a:	60 30       	cpi	r22, 0x00	; 0
     a5c:	72 07       	cpc	r23, r18
     a5e:	18 f0       	brcs	.+6      	; 0xa66 <Clock_CMD+0xe6>
    {
        newOffset = (newOffset - 4096)      ;	//... roll over pointer
     a60:	bc 01       	movw	r22, r24
     a62:	6c 5f       	subi	r22, 0xFC	; 252
     a64:	7f 40       	sbci	r23, 0x0F	; 15

	FT800memWrite32(RAM_CMD + cmdOffset,CMD_BGCOLOR)                    ; //*** Sent Co-CMD Set Background color of CLOCK
    cmdOffset = incCMDOffset(cmdOffset,4)                               ; //Update Offset pointer Ram-CMD 4 byte for Next CMD

    FT800memWrite32(RAM_CMD + cmdOffset,clock_color)                    ; //--- Sent data color bacground clock 					                              	     
    cmdOffset = incCMDOffset(cmdOffset,4)                               ; //Update Offset pointer Ram-CMD 4 byte for Next CMD
     a66:	70 93 63 01 	sts	0x0163, r23
     a6a:	60 93 62 01 	sts	0x0162, r22
	
	//Start Draw Analog Clock//	 

    FT800memWrite32(RAM_CMD + cmdOffset,CMD_CLOCK)                      ; //***Sent Command Draw Clock
     a6e:	80 e0       	ldi	r24, 0x00	; 0
     a70:	90 e0       	ldi	r25, 0x00	; 0
     a72:	60 50       	subi	r22, 0x00	; 0
     a74:	70 48       	sbci	r23, 0x80	; 128
     a76:	8f 4e       	sbci	r24, 0xEF	; 239
     a78:	9f 4f       	sbci	r25, 0xFF	; 255
     a7a:	24 e1       	ldi	r18, 0x14	; 20
     a7c:	3f ef       	ldi	r19, 0xFF	; 255
     a7e:	4f ef       	ldi	r20, 0xFF	; 255
     a80:	5f ef       	ldi	r21, 0xFF	; 255
     a82:	0e 94 e3 00 	call	0x1c6	; 0x1c6 <FT800memWrite32>

unsigned int incCMDOffset(unsigned int currentOffset, unsigned char commandSize)
{
    unsigned int newOffset                  ;   //used to hold new offset

    newOffset = currentOffset + commandSize ;	//Calculate new offset
     a86:	80 91 62 01 	lds	r24, 0x0162
     a8a:	90 91 63 01 	lds	r25, 0x0163
     a8e:	bc 01       	movw	r22, r24
     a90:	6c 5f       	subi	r22, 0xFC	; 252
     a92:	7f 4f       	sbci	r23, 0xFF	; 255

    if(newOffset > 4095)			            //If new offset past boundary...
     a94:	40 e1       	ldi	r20, 0x10	; 16
     a96:	60 30       	cpi	r22, 0x00	; 0
     a98:	74 07       	cpc	r23, r20
     a9a:	18 f0       	brcs	.+6      	; 0xaa2 <Clock_CMD+0x122>
    {
        newOffset = (newOffset - 4096)      ;	//... roll over pointer
     a9c:	bc 01       	movw	r22, r24
     a9e:	6c 5f       	subi	r22, 0xFC	; 252
     aa0:	7f 40       	sbci	r23, 0x0F	; 15
    cmdOffset = incCMDOffset(cmdOffset,4)                               ; //Update Offset pointer Ram-CMD 4 byte for Next CMD
	
	//Start Draw Analog Clock//	 

    FT800memWrite32(RAM_CMD + cmdOffset,CMD_CLOCK)                      ; //***Sent Command Draw Clock
    cmdOffset = incCMDOffset(cmdOffset,4)                               ; //Update Offset pointer Ram-CMD 4 byte for Next data
     aa2:	70 93 63 01 	sts	0x0163, r23
     aa6:	60 93 62 01 	sts	0x0162, r22

    FT800memWrite16(RAM_CMD + cmdOffset,x)                              ; //---Sent data Clock Center Point-X (Pixel) 
     aaa:	80 e0       	ldi	r24, 0x00	; 0
     aac:	90 e0       	ldi	r25, 0x00	; 0
     aae:	60 50       	subi	r22, 0x00	; 0
     ab0:	70 48       	sbci	r23, 0x80	; 128
     ab2:	8f 4e       	sbci	r24, 0xEF	; 239
     ab4:	9f 4f       	sbci	r25, 0xFF	; 255
     ab6:	a4 01       	movw	r20, r8
     ab8:	0e 94 bc 00 	call	0x178	; 0x178 <FT800memWrite16>

unsigned int incCMDOffset(unsigned int currentOffset, unsigned char commandSize)
{
    unsigned int newOffset                  ;   //used to hold new offset

    newOffset = currentOffset + commandSize ;	//Calculate new offset
     abc:	80 91 62 01 	lds	r24, 0x0162
     ac0:	90 91 63 01 	lds	r25, 0x0163
     ac4:	bc 01       	movw	r22, r24
     ac6:	6e 5f       	subi	r22, 0xFE	; 254
     ac8:	7f 4f       	sbci	r23, 0xFF	; 255

    if(newOffset > 4095)			            //If new offset past boundary...
     aca:	20 e1       	ldi	r18, 0x10	; 16
     acc:	60 30       	cpi	r22, 0x00	; 0
     ace:	72 07       	cpc	r23, r18
     ad0:	18 f0       	brcs	.+6      	; 0xad8 <Clock_CMD+0x158>
    {
        newOffset = (newOffset - 4096)      ;	//... roll over pointer
     ad2:	bc 01       	movw	r22, r24
     ad4:	6e 5f       	subi	r22, 0xFE	; 254
     ad6:	7f 40       	sbci	r23, 0x0F	; 15

    FT800memWrite32(RAM_CMD + cmdOffset,CMD_CLOCK)                      ; //***Sent Command Draw Clock
    cmdOffset = incCMDOffset(cmdOffset,4)                               ; //Update Offset pointer Ram-CMD 4 byte for Next data

    FT800memWrite16(RAM_CMD + cmdOffset,x)                              ; //---Sent data Clock Center Point-X (Pixel) 
    cmdOffset = incCMDOffset(cmdOffset,2)                               ; //Update Offset pointer Ram-CMD 2 byte for Next Data
     ad8:	70 93 63 01 	sts	0x0163, r23
     adc:	60 93 62 01 	sts	0x0162, r22

    FT800memWrite16(RAM_CMD + cmdOffset,y)                              ; //---Sent data Clock Center Point Y (Pixel) 
     ae0:	80 e0       	ldi	r24, 0x00	; 0
     ae2:	90 e0       	ldi	r25, 0x00	; 0
     ae4:	60 50       	subi	r22, 0x00	; 0
     ae6:	70 48       	sbci	r23, 0x80	; 128
     ae8:	8f 4e       	sbci	r24, 0xEF	; 239
     aea:	9f 4f       	sbci	r25, 0xFF	; 255
     aec:	a3 01       	movw	r20, r6
     aee:	0e 94 bc 00 	call	0x178	; 0x178 <FT800memWrite16>

unsigned int incCMDOffset(unsigned int currentOffset, unsigned char commandSize)
{
    unsigned int newOffset                  ;   //used to hold new offset

    newOffset = currentOffset + commandSize ;	//Calculate new offset
     af2:	80 91 62 01 	lds	r24, 0x0162
     af6:	90 91 63 01 	lds	r25, 0x0163
     afa:	bc 01       	movw	r22, r24
     afc:	6e 5f       	subi	r22, 0xFE	; 254
     afe:	7f 4f       	sbci	r23, 0xFF	; 255

    if(newOffset > 4095)			            //If new offset past boundary...
     b00:	40 e1       	ldi	r20, 0x10	; 16
     b02:	60 30       	cpi	r22, 0x00	; 0
     b04:	74 07       	cpc	r23, r20
     b06:	18 f0       	brcs	.+6      	; 0xb0e <Clock_CMD+0x18e>
    {
        newOffset = (newOffset - 4096)      ;	//... roll over pointer
     b08:	bc 01       	movw	r22, r24
     b0a:	6e 5f       	subi	r22, 0xFE	; 254
     b0c:	7f 40       	sbci	r23, 0x0F	; 15

    FT800memWrite16(RAM_CMD + cmdOffset,x)                              ; //---Sent data Clock Center Point-X (Pixel) 
    cmdOffset = incCMDOffset(cmdOffset,2)                               ; //Update Offset pointer Ram-CMD 2 byte for Next Data

    FT800memWrite16(RAM_CMD + cmdOffset,y)                              ; //---Sent data Clock Center Point Y (Pixel) 
    cmdOffset = incCMDOffset(cmdOffset,2)                               ; //Update Offset pointer Ram-CMD 2 byte for Next Data
     b0e:	70 93 63 01 	sts	0x0163, r23
     b12:	60 93 62 01 	sts	0x0162, r22

    FT800memWrite16(RAM_CMD + cmdOffset,radius)                         ; //---Sent data Radius for Clock (pixel)
     b16:	80 e0       	ldi	r24, 0x00	; 0
     b18:	90 e0       	ldi	r25, 0x00	; 0
     b1a:	60 50       	subi	r22, 0x00	; 0
     b1c:	70 48       	sbci	r23, 0x80	; 128
     b1e:	8f 4e       	sbci	r24, 0xEF	; 239
     b20:	9f 4f       	sbci	r25, 0xFF	; 255
     b22:	a2 01       	movw	r20, r4
     b24:	0e 94 bc 00 	call	0x178	; 0x178 <FT800memWrite16>

unsigned int incCMDOffset(unsigned int currentOffset, unsigned char commandSize)
{
    unsigned int newOffset                  ;   //used to hold new offset

    newOffset = currentOffset + commandSize ;	//Calculate new offset
     b28:	80 91 62 01 	lds	r24, 0x0162
     b2c:	90 91 63 01 	lds	r25, 0x0163
     b30:	bc 01       	movw	r22, r24
     b32:	6e 5f       	subi	r22, 0xFE	; 254
     b34:	7f 4f       	sbci	r23, 0xFF	; 255

    if(newOffset > 4095)			            //If new offset past boundary...
     b36:	20 e1       	ldi	r18, 0x10	; 16
     b38:	60 30       	cpi	r22, 0x00	; 0
     b3a:	72 07       	cpc	r23, r18
     b3c:	18 f0       	brcs	.+6      	; 0xb44 <Clock_CMD+0x1c4>
    {
        newOffset = (newOffset - 4096)      ;	//... roll over pointer
     b3e:	bc 01       	movw	r22, r24
     b40:	6e 5f       	subi	r22, 0xFE	; 254
     b42:	7f 40       	sbci	r23, 0x0F	; 15

    FT800memWrite16(RAM_CMD + cmdOffset,y)                              ; //---Sent data Clock Center Point Y (Pixel) 
    cmdOffset = incCMDOffset(cmdOffset,2)                               ; //Update Offset pointer Ram-CMD 2 byte for Next Data

    FT800memWrite16(RAM_CMD + cmdOffset,radius)                         ; //---Sent data Radius for Clock (pixel)
    cmdOffset = incCMDOffset(cmdOffset,2)                               ; //Update Offset pointer Ram-CMD 2 byte for Next Data
     b44:	70 93 63 01 	sts	0x0163, r23
     b48:	60 93 62 01 	sts	0x0162, r22

    FT800memWrite16(RAM_CMD + cmdOffset,opt)                            ; //---Sent datat Option Clock Drawn 3D	
     b4c:	80 e0       	ldi	r24, 0x00	; 0
     b4e:	90 e0       	ldi	r25, 0x00	; 0
     b50:	60 50       	subi	r22, 0x00	; 0
     b52:	70 48       	sbci	r23, 0x80	; 128
     b54:	8f 4e       	sbci	r24, 0xEF	; 239
     b56:	9f 4f       	sbci	r25, 0xFF	; 255
     b58:	a1 01       	movw	r20, r2
     b5a:	0e 94 bc 00 	call	0x178	; 0x178 <FT800memWrite16>

unsigned int incCMDOffset(unsigned int currentOffset, unsigned char commandSize)
{
    unsigned int newOffset                  ;   //used to hold new offset

    newOffset = currentOffset + commandSize ;	//Calculate new offset
     b5e:	80 91 62 01 	lds	r24, 0x0162
     b62:	90 91 63 01 	lds	r25, 0x0163
     b66:	bc 01       	movw	r22, r24
     b68:	6e 5f       	subi	r22, 0xFE	; 254
     b6a:	7f 4f       	sbci	r23, 0xFF	; 255

    if(newOffset > 4095)			            //If new offset past boundary...
     b6c:	40 e1       	ldi	r20, 0x10	; 16
     b6e:	60 30       	cpi	r22, 0x00	; 0
     b70:	74 07       	cpc	r23, r20
     b72:	18 f0       	brcs	.+6      	; 0xb7a <Clock_CMD+0x1fa>
    {
        newOffset = (newOffset - 4096)      ;	//... roll over pointer
     b74:	bc 01       	movw	r22, r24
     b76:	6e 5f       	subi	r22, 0xFE	; 254
     b78:	7f 40       	sbci	r23, 0x0F	; 15

    FT800memWrite16(RAM_CMD + cmdOffset,radius)                         ; //---Sent data Radius for Clock (pixel)
    cmdOffset = incCMDOffset(cmdOffset,2)                               ; //Update Offset pointer Ram-CMD 2 byte for Next Data

    FT800memWrite16(RAM_CMD + cmdOffset,opt)                            ; //---Sent datat Option Clock Drawn 3D	
    cmdOffset = incCMDOffset(cmdOffset,2)                               ; //Update Offset pointer Ram-CMD 2 byte for Next Data
     b7a:	70 93 63 01 	sts	0x0163, r23
     b7e:	60 93 62 01 	sts	0x0162, r22

    FT800memWrite16(RAM_CMD + cmdOffset,hour)                           ; //---Sent data Time Houre(hh:0-23)
     b82:	80 e0       	ldi	r24, 0x00	; 0
     b84:	90 e0       	ldi	r25, 0x00	; 0
     b86:	60 50       	subi	r22, 0x00	; 0
     b88:	70 48       	sbci	r23, 0x80	; 128
     b8a:	8f 4e       	sbci	r24, 0xEF	; 239
     b8c:	9f 4f       	sbci	r25, 0xFF	; 255
     b8e:	a8 01       	movw	r20, r16
     b90:	0e 94 bc 00 	call	0x178	; 0x178 <FT800memWrite16>

unsigned int incCMDOffset(unsigned int currentOffset, unsigned char commandSize)
{
    unsigned int newOffset                  ;   //used to hold new offset

    newOffset = currentOffset + commandSize ;	//Calculate new offset
     b94:	80 91 62 01 	lds	r24, 0x0162
     b98:	90 91 63 01 	lds	r25, 0x0163
     b9c:	bc 01       	movw	r22, r24
     b9e:	6e 5f       	subi	r22, 0xFE	; 254
     ba0:	7f 4f       	sbci	r23, 0xFF	; 255

    if(newOffset > 4095)			            //If new offset past boundary...
     ba2:	20 e1       	ldi	r18, 0x10	; 16
     ba4:	60 30       	cpi	r22, 0x00	; 0
     ba6:	72 07       	cpc	r23, r18
     ba8:	18 f0       	brcs	.+6      	; 0xbb0 <Clock_CMD+0x230>
    {
        newOffset = (newOffset - 4096)      ;	//... roll over pointer
     baa:	bc 01       	movw	r22, r24
     bac:	6e 5f       	subi	r22, 0xFE	; 254
     bae:	7f 40       	sbci	r23, 0x0F	; 15

    FT800memWrite16(RAM_CMD + cmdOffset,opt)                            ; //---Sent datat Option Clock Drawn 3D	
    cmdOffset = incCMDOffset(cmdOffset,2)                               ; //Update Offset pointer Ram-CMD 2 byte for Next Data

    FT800memWrite16(RAM_CMD + cmdOffset,hour)                           ; //---Sent data Time Houre(hh:0-23)
    cmdOffset = incCMDOffset(cmdOffset,2)                               ; //Update Offset pointer Ram-CMD 2 byte for Next Data 
     bb0:	70 93 63 01 	sts	0x0163, r23
     bb4:	60 93 62 01 	sts	0x0162, r22

    FT800memWrite16(RAM_CMD + cmdOffset,minute)                         ; //---Sent data Time Minute(mm:0-59)
     bb8:	80 e0       	ldi	r24, 0x00	; 0
     bba:	90 e0       	ldi	r25, 0x00	; 0
     bbc:	60 50       	subi	r22, 0x00	; 0
     bbe:	70 48       	sbci	r23, 0x80	; 128
     bc0:	8f 4e       	sbci	r24, 0xEF	; 239
     bc2:	9f 4f       	sbci	r25, 0xFF	; 255
     bc4:	a7 01       	movw	r20, r14
     bc6:	0e 94 bc 00 	call	0x178	; 0x178 <FT800memWrite16>

unsigned int incCMDOffset(unsigned int currentOffset, unsigned char commandSize)
{
    unsigned int newOffset                  ;   //used to hold new offset

    newOffset = currentOffset + commandSize ;	//Calculate new offset
     bca:	80 91 62 01 	lds	r24, 0x0162
     bce:	90 91 63 01 	lds	r25, 0x0163
     bd2:	bc 01       	movw	r22, r24
     bd4:	6e 5f       	subi	r22, 0xFE	; 254
     bd6:	7f 4f       	sbci	r23, 0xFF	; 255

    if(newOffset > 4095)			            //If new offset past boundary...
     bd8:	40 e1       	ldi	r20, 0x10	; 16
     bda:	60 30       	cpi	r22, 0x00	; 0
     bdc:	74 07       	cpc	r23, r20
     bde:	18 f0       	brcs	.+6      	; 0xbe6 <Clock_CMD+0x266>
    {
        newOffset = (newOffset - 4096)      ;	//... roll over pointer
     be0:	bc 01       	movw	r22, r24
     be2:	6e 5f       	subi	r22, 0xFE	; 254
     be4:	7f 40       	sbci	r23, 0x0F	; 15

    FT800memWrite16(RAM_CMD + cmdOffset,hour)                           ; //---Sent data Time Houre(hh:0-23)
    cmdOffset = incCMDOffset(cmdOffset,2)                               ; //Update Offset pointer Ram-CMD 2 byte for Next Data 

    FT800memWrite16(RAM_CMD + cmdOffset,minute)                         ; //---Sent data Time Minute(mm:0-59)
    cmdOffset = incCMDOffset(cmdOffset,2)                               ; //Update Offset pointer Ram-CMD 2 byte for Next Data
     be6:	70 93 63 01 	sts	0x0163, r23
     bea:	60 93 62 01 	sts	0x0162, r22

    FT800memWrite16(RAM_CMD + cmdOffset,second)                         ; //---Sent data Time Secound (ss:0-59)
     bee:	80 e0       	ldi	r24, 0x00	; 0
     bf0:	90 e0       	ldi	r25, 0x00	; 0
     bf2:	60 50       	subi	r22, 0x00	; 0
     bf4:	70 48       	sbci	r23, 0x80	; 128
     bf6:	8f 4e       	sbci	r24, 0xEF	; 239
     bf8:	9f 4f       	sbci	r25, 0xFF	; 255
     bfa:	a6 01       	movw	r20, r12
     bfc:	0e 94 bc 00 	call	0x178	; 0x178 <FT800memWrite16>

unsigned int incCMDOffset(unsigned int currentOffset, unsigned char commandSize)
{
    unsigned int newOffset                  ;   //used to hold new offset

    newOffset = currentOffset + commandSize ;	//Calculate new offset
     c00:	80 91 62 01 	lds	r24, 0x0162
     c04:	90 91 63 01 	lds	r25, 0x0163
     c08:	bc 01       	movw	r22, r24
     c0a:	6e 5f       	subi	r22, 0xFE	; 254
     c0c:	7f 4f       	sbci	r23, 0xFF	; 255

    if(newOffset > 4095)			            //If new offset past boundary...
     c0e:	20 e1       	ldi	r18, 0x10	; 16
     c10:	60 30       	cpi	r22, 0x00	; 0
     c12:	72 07       	cpc	r23, r18
     c14:	18 f0       	brcs	.+6      	; 0xc1c <Clock_CMD+0x29c>
    {
        newOffset = (newOffset - 4096)      ;	//... roll over pointer
     c16:	bc 01       	movw	r22, r24
     c18:	6e 5f       	subi	r22, 0xFE	; 254
     c1a:	7f 40       	sbci	r23, 0x0F	; 15

    FT800memWrite16(RAM_CMD + cmdOffset,minute)                         ; //---Sent data Time Minute(mm:0-59)
    cmdOffset = incCMDOffset(cmdOffset,2)                               ; //Update Offset pointer Ram-CMD 2 byte for Next Data

    FT800memWrite16(RAM_CMD + cmdOffset,second)                         ; //---Sent data Time Secound (ss:0-59)
    cmdOffset = incCMDOffset(cmdOffset,2)                               ; //Update Offset pointer Ram-CMD 2 byte for Next Data
     c1c:	70 93 63 01 	sts	0x0163, r23
     c20:	60 93 62 01 	sts	0x0162, r22

    FT800memWrite16(RAM_CMD + cmdOffset,ms)                             ; //---Sent Time ms (ms:0-1000)
     c24:	80 e0       	ldi	r24, 0x00	; 0
     c26:	90 e0       	ldi	r25, 0x00	; 0
     c28:	60 50       	subi	r22, 0x00	; 0
     c2a:	70 48       	sbci	r23, 0x80	; 128
     c2c:	8f 4e       	sbci	r24, 0xEF	; 239
     c2e:	9f 4f       	sbci	r25, 0xFF	; 255
     c30:	a5 01       	movw	r20, r10
     c32:	0e 94 bc 00 	call	0x178	; 0x178 <FT800memWrite16>

unsigned int End_incCMDOffset(unsigned int currentOffset, unsigned char commandSize)
{
  unsigned int newOffset                   ;  //used to hold new offset

   newOffset = currentOffset + commandSize ;  //Calculate new offset
     c36:	20 91 62 01 	lds	r18, 0x0162
     c3a:	30 91 63 01 	lds	r19, 0x0163
     c3e:	c9 01       	movw	r24, r18
     c40:	02 96       	adiw	r24, 0x02	; 2

   if(newOffset > 4095)	             	  	  //If new offset past boundary...
     c42:	40 e1       	ldi	r20, 0x10	; 16
     c44:	80 30       	cpi	r24, 0x00	; 0
     c46:	94 07       	cpc	r25, r20
     c48:	18 f0       	brcs	.+6      	; 0xc50 <Clock_CMD+0x2d0>
    {
        newOffset = (newOffset - 4096)     ;  //... roll over pointer
     c4a:	c9 01       	movw	r24, r18
     c4c:	8e 5f       	subi	r24, 0xFE	; 254
     c4e:	9f 40       	sbci	r25, 0x0F	; 15
    }
   

  //increment the length and align it by 4 bytes//

   newOffset = (newOffset+3) & 4092        ;
     c50:	03 96       	adiw	r24, 0x03	; 3

    FT800memWrite16(RAM_CMD + cmdOffset,second)                         ; //---Sent data Time Secound (ss:0-59)
    cmdOffset = incCMDOffset(cmdOffset,2)                               ; //Update Offset pointer Ram-CMD 2 byte for Next Data

    FT800memWrite16(RAM_CMD + cmdOffset,ms)                             ; //---Sent Time ms (ms:0-1000)
    cmdOffset = End_incCMDOffset(cmdOffset,2)                           ; //Update Offset pointer Ram-CMD for End CMD-Clock
     c52:	8c 7f       	andi	r24, 0xFC	; 252
     c54:	9f 70       	andi	r25, 0x0F	; 15
     c56:	90 93 63 01 	sts	0x0163, r25
     c5a:	80 93 62 01 	sts	0x0162, r24

  }
     c5e:	cf 91       	pop	r28
     c60:	df 91       	pop	r29
     c62:	1f 91       	pop	r17
     c64:	0f 91       	pop	r16
     c66:	ff 90       	pop	r15
     c68:	ef 90       	pop	r14
     c6a:	df 90       	pop	r13
     c6c:	cf 90       	pop	r12
     c6e:	bf 90       	pop	r11
     c70:	af 90       	pop	r10
     c72:	9f 90       	pop	r9
     c74:	8f 90       	pop	r8
     c76:	7f 90       	pop	r7
     c78:	6f 90       	pop	r6
     c7a:	5f 90       	pop	r5
     c7c:	4f 90       	pop	r4
     c7e:	3f 90       	pop	r3
     c80:	2f 90       	pop	r2
     c82:	08 95       	ret

00000c84 <Text_CMD>:
  ++                                                                              ++
  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/


void Text_CMD(char *str,int x,int y,int font,int opt,long tx_color)
 {
     c84:	6f 92       	push	r6
     c86:	7f 92       	push	r7
     c88:	8f 92       	push	r8
     c8a:	9f 92       	push	r9
     c8c:	af 92       	push	r10
     c8e:	bf 92       	push	r11
     c90:	cf 92       	push	r12
     c92:	df 92       	push	r13
     c94:	ef 92       	push	r14
     c96:	ff 92       	push	r15
     c98:	0f 93       	push	r16
     c9a:	1f 93       	push	r17
     c9c:	cf 93       	push	r28
     c9e:	df 93       	push	r29
     ca0:	3c 01       	movw	r6, r24
     ca2:	eb 01       	movw	r28, r22
     ca4:	5a 01       	movw	r10, r20
     ca6:	49 01       	movw	r8, r18
     ca8:	a7 01       	movw	r20, r14
     caa:	96 01       	movw	r18, r12

    // Set Attribute Clock //

    FT800memWrite32(RAM_CMD + cmdOffset,(DL_COLOR_RGB | tx_color))    ; //***Sent DL-CMD Set Color Text-White  
     cac:	60 91 62 01 	lds	r22, 0x0162
     cb0:	70 91 63 01 	lds	r23, 0x0163
     cb4:	80 e0       	ldi	r24, 0x00	; 0
     cb6:	90 e0       	ldi	r25, 0x00	; 0
     cb8:	60 50       	subi	r22, 0x00	; 0
     cba:	70 48       	sbci	r23, 0x80	; 128
     cbc:	8f 4e       	sbci	r24, 0xEF	; 239
     cbe:	9f 4f       	sbci	r25, 0xFF	; 255
     cc0:	54 60       	ori	r21, 0x04	; 4
     cc2:	0e 94 e3 00 	call	0x1c6	; 0x1c6 <FT800memWrite32>

unsigned int incCMDOffset(unsigned int currentOffset, unsigned char commandSize)
{
    unsigned int newOffset                  ;   //used to hold new offset

    newOffset = currentOffset + commandSize ;	//Calculate new offset
     cc6:	80 91 62 01 	lds	r24, 0x0162
     cca:	90 91 63 01 	lds	r25, 0x0163
     cce:	bc 01       	movw	r22, r24
     cd0:	6c 5f       	subi	r22, 0xFC	; 252
     cd2:	7f 4f       	sbci	r23, 0xFF	; 255

    if(newOffset > 4095)			            //If new offset past boundary...
     cd4:	20 e1       	ldi	r18, 0x10	; 16
     cd6:	60 30       	cpi	r22, 0x00	; 0
     cd8:	72 07       	cpc	r23, r18
     cda:	18 f0       	brcs	.+6      	; 0xce2 <Text_CMD+0x5e>
    {
        newOffset = (newOffset - 4096)      ;	//... roll over pointer
     cdc:	bc 01       	movw	r22, r24
     cde:	6c 5f       	subi	r22, 0xFC	; 252
     ce0:	7f 40       	sbci	r23, 0x0F	; 15
 {

    // Set Attribute Clock //

    FT800memWrite32(RAM_CMD + cmdOffset,(DL_COLOR_RGB | tx_color))    ; //***Sent DL-CMD Set Color Text-White  
    cmdOffset = incCMDOffset(cmdOffset,4)                             ; //Update Offset pointer Ram-CMD 4 byte for Next CMD
     ce2:	70 93 63 01 	sts	0x0163, r23
     ce6:	60 93 62 01 	sts	0x0162, r22

	
	//Start Draw Text//	 

    FT800memWrite32(RAM_CMD + cmdOffset,CMD_TEXT)                     ; //***Sent Co-CMD Draw TEXT
     cea:	80 e0       	ldi	r24, 0x00	; 0
     cec:	90 e0       	ldi	r25, 0x00	; 0
     cee:	60 50       	subi	r22, 0x00	; 0
     cf0:	70 48       	sbci	r23, 0x80	; 128
     cf2:	8f 4e       	sbci	r24, 0xEF	; 239
     cf4:	9f 4f       	sbci	r25, 0xFF	; 255
     cf6:	2c e0       	ldi	r18, 0x0C	; 12
     cf8:	3f ef       	ldi	r19, 0xFF	; 255
     cfa:	4f ef       	ldi	r20, 0xFF	; 255
     cfc:	5f ef       	ldi	r21, 0xFF	; 255
     cfe:	0e 94 e3 00 	call	0x1c6	; 0x1c6 <FT800memWrite32>

unsigned int incCMDOffset(unsigned int currentOffset, unsigned char commandSize)
{
    unsigned int newOffset                  ;   //used to hold new offset

    newOffset = currentOffset + commandSize ;	//Calculate new offset
     d02:	80 91 62 01 	lds	r24, 0x0162
     d06:	90 91 63 01 	lds	r25, 0x0163
     d0a:	bc 01       	movw	r22, r24
     d0c:	6c 5f       	subi	r22, 0xFC	; 252
     d0e:	7f 4f       	sbci	r23, 0xFF	; 255

    if(newOffset > 4095)			            //If new offset past boundary...
     d10:	20 e1       	ldi	r18, 0x10	; 16
     d12:	60 30       	cpi	r22, 0x00	; 0
     d14:	72 07       	cpc	r23, r18
     d16:	18 f0       	brcs	.+6      	; 0xd1e <Text_CMD+0x9a>
    {
        newOffset = (newOffset - 4096)      ;	//... roll over pointer
     d18:	bc 01       	movw	r22, r24
     d1a:	6c 5f       	subi	r22, 0xFC	; 252
     d1c:	7f 40       	sbci	r23, 0x0F	; 15

	
	//Start Draw Text//	 

    FT800memWrite32(RAM_CMD + cmdOffset,CMD_TEXT)                     ; //***Sent Co-CMD Draw TEXT
    cmdOffset = incCMDOffset(cmdOffset,4)                             ; //Update Offset pointer Ram-CMD 4 byte for Next data
     d1e:	70 93 63 01 	sts	0x0163, r23
     d22:	60 93 62 01 	sts	0x0162, r22

    FT800memWrite16(RAM_CMD + cmdOffset,x)                            ; //---Sent data X-Point top-left (Pixel) 
     d26:	80 e0       	ldi	r24, 0x00	; 0
     d28:	90 e0       	ldi	r25, 0x00	; 0
     d2a:	60 50       	subi	r22, 0x00	; 0
     d2c:	70 48       	sbci	r23, 0x80	; 128
     d2e:	8f 4e       	sbci	r24, 0xEF	; 239
     d30:	9f 4f       	sbci	r25, 0xFF	; 255
     d32:	ae 01       	movw	r20, r28
     d34:	0e 94 bc 00 	call	0x178	; 0x178 <FT800memWrite16>

unsigned int incCMDOffset(unsigned int currentOffset, unsigned char commandSize)
{
    unsigned int newOffset                  ;   //used to hold new offset

    newOffset = currentOffset + commandSize ;	//Calculate new offset
     d38:	80 91 62 01 	lds	r24, 0x0162
     d3c:	90 91 63 01 	lds	r25, 0x0163
     d40:	bc 01       	movw	r22, r24
     d42:	6e 5f       	subi	r22, 0xFE	; 254
     d44:	7f 4f       	sbci	r23, 0xFF	; 255

    if(newOffset > 4095)			            //If new offset past boundary...
     d46:	20 e1       	ldi	r18, 0x10	; 16
     d48:	60 30       	cpi	r22, 0x00	; 0
     d4a:	72 07       	cpc	r23, r18
     d4c:	18 f0       	brcs	.+6      	; 0xd54 <Text_CMD+0xd0>
    {
        newOffset = (newOffset - 4096)      ;	//... roll over pointer
     d4e:	bc 01       	movw	r22, r24
     d50:	6e 5f       	subi	r22, 0xFE	; 254
     d52:	7f 40       	sbci	r23, 0x0F	; 15

    FT800memWrite32(RAM_CMD + cmdOffset,CMD_TEXT)                     ; //***Sent Co-CMD Draw TEXT
    cmdOffset = incCMDOffset(cmdOffset,4)                             ; //Update Offset pointer Ram-CMD 4 byte for Next data

    FT800memWrite16(RAM_CMD + cmdOffset,x)                            ; //---Sent data X-Point top-left (Pixel) 
    cmdOffset = incCMDOffset(cmdOffset,2)                             ; //Update Offset pointer Ram-CMD 2 byte for Next data
     d54:	70 93 63 01 	sts	0x0163, r23
     d58:	60 93 62 01 	sts	0x0162, r22

    FT800memWrite16(RAM_CMD + cmdOffset,y)                            ; //---Sent data Y-Point top-left (Pixel) 
     d5c:	80 e0       	ldi	r24, 0x00	; 0
     d5e:	90 e0       	ldi	r25, 0x00	; 0
     d60:	60 50       	subi	r22, 0x00	; 0
     d62:	70 48       	sbci	r23, 0x80	; 128
     d64:	8f 4e       	sbci	r24, 0xEF	; 239
     d66:	9f 4f       	sbci	r25, 0xFF	; 255
     d68:	a5 01       	movw	r20, r10
     d6a:	0e 94 bc 00 	call	0x178	; 0x178 <FT800memWrite16>

unsigned int incCMDOffset(unsigned int currentOffset, unsigned char commandSize)
{
    unsigned int newOffset                  ;   //used to hold new offset

    newOffset = currentOffset + commandSize ;	//Calculate new offset
     d6e:	80 91 62 01 	lds	r24, 0x0162
     d72:	90 91 63 01 	lds	r25, 0x0163
     d76:	bc 01       	movw	r22, r24
     d78:	6e 5f       	subi	r22, 0xFE	; 254
     d7a:	7f 4f       	sbci	r23, 0xFF	; 255

    if(newOffset > 4095)			            //If new offset past boundary...
     d7c:	20 e1       	ldi	r18, 0x10	; 16
     d7e:	60 30       	cpi	r22, 0x00	; 0
     d80:	72 07       	cpc	r23, r18
     d82:	18 f0       	brcs	.+6      	; 0xd8a <Text_CMD+0x106>
    {
        newOffset = (newOffset - 4096)      ;	//... roll over pointer
     d84:	bc 01       	movw	r22, r24
     d86:	6e 5f       	subi	r22, 0xFE	; 254
     d88:	7f 40       	sbci	r23, 0x0F	; 15

    FT800memWrite16(RAM_CMD + cmdOffset,x)                            ; //---Sent data X-Point top-left (Pixel) 
    cmdOffset = incCMDOffset(cmdOffset,2)                             ; //Update Offset pointer Ram-CMD 2 byte for Next data

    FT800memWrite16(RAM_CMD + cmdOffset,y)                            ; //---Sent data Y-Point top-left (Pixel) 
    cmdOffset = incCMDOffset(cmdOffset,2)                             ; //Update Offset pointer Ram-CMD 2 byte for Next data
     d8a:	70 93 63 01 	sts	0x0163, r23
     d8e:	60 93 62 01 	sts	0x0162, r22
  
    FT800memWrite16(RAM_CMD + cmdOffset,font)                         ; //---Sent data Set format font(16,18,20,21,22,23,24...)					                              	     
     d92:	80 e0       	ldi	r24, 0x00	; 0
     d94:	90 e0       	ldi	r25, 0x00	; 0
     d96:	60 50       	subi	r22, 0x00	; 0
     d98:	70 48       	sbci	r23, 0x80	; 128
     d9a:	8f 4e       	sbci	r24, 0xEF	; 239
     d9c:	9f 4f       	sbci	r25, 0xFF	; 255
     d9e:	a4 01       	movw	r20, r8
     da0:	0e 94 bc 00 	call	0x178	; 0x178 <FT800memWrite16>

unsigned int incCMDOffset(unsigned int currentOffset, unsigned char commandSize)
{
    unsigned int newOffset                  ;   //used to hold new offset

    newOffset = currentOffset + commandSize ;	//Calculate new offset
     da4:	80 91 62 01 	lds	r24, 0x0162
     da8:	90 91 63 01 	lds	r25, 0x0163
     dac:	bc 01       	movw	r22, r24
     dae:	6e 5f       	subi	r22, 0xFE	; 254
     db0:	7f 4f       	sbci	r23, 0xFF	; 255

    if(newOffset > 4095)			            //If new offset past boundary...
     db2:	20 e1       	ldi	r18, 0x10	; 16
     db4:	60 30       	cpi	r22, 0x00	; 0
     db6:	72 07       	cpc	r23, r18
     db8:	18 f0       	brcs	.+6      	; 0xdc0 <Text_CMD+0x13c>
    {
        newOffset = (newOffset - 4096)      ;	//... roll over pointer
     dba:	bc 01       	movw	r22, r24
     dbc:	6e 5f       	subi	r22, 0xFE	; 254
     dbe:	7f 40       	sbci	r23, 0x0F	; 15

    FT800memWrite16(RAM_CMD + cmdOffset,y)                            ; //---Sent data Y-Point top-left (Pixel) 
    cmdOffset = incCMDOffset(cmdOffset,2)                             ; //Update Offset pointer Ram-CMD 2 byte for Next data
  
    FT800memWrite16(RAM_CMD + cmdOffset,font)                         ; //---Sent data Set format font(16,18,20,21,22,23,24...)					                              	     
    cmdOffset = incCMDOffset(cmdOffset,2)                             ; //Update Offset pointer Ram-CMD 2 byte for Next data
     dc0:	70 93 63 01 	sts	0x0163, r23
     dc4:	60 93 62 01 	sts	0x0162, r22

    FT800memWrite16(RAM_CMD + cmdOffset,opt)                          ; //---Sent data Option : Position Draw  Text					                              	     
     dc8:	80 e0       	ldi	r24, 0x00	; 0
     dca:	90 e0       	ldi	r25, 0x00	; 0
     dcc:	60 50       	subi	r22, 0x00	; 0
     dce:	70 48       	sbci	r23, 0x80	; 128
     dd0:	8f 4e       	sbci	r24, 0xEF	; 239
     dd2:	9f 4f       	sbci	r25, 0xFF	; 255
     dd4:	a8 01       	movw	r20, r16
     dd6:	0e 94 bc 00 	call	0x178	; 0x178 <FT800memWrite16>

unsigned int incCMDOffset(unsigned int currentOffset, unsigned char commandSize)
{
    unsigned int newOffset                  ;   //used to hold new offset

    newOffset = currentOffset + commandSize ;	//Calculate new offset
     dda:	80 91 62 01 	lds	r24, 0x0162
     dde:	90 91 63 01 	lds	r25, 0x0163
     de2:	bc 01       	movw	r22, r24
     de4:	6e 5f       	subi	r22, 0xFE	; 254
     de6:	7f 4f       	sbci	r23, 0xFF	; 255

    if(newOffset > 4095)			            //If new offset past boundary...
     de8:	20 e1       	ldi	r18, 0x10	; 16
     dea:	60 30       	cpi	r22, 0x00	; 0
     dec:	72 07       	cpc	r23, r18
     dee:	18 f0       	brcs	.+6      	; 0xdf6 <Text_CMD+0x172>
    {
        newOffset = (newOffset - 4096)      ;	//... roll over pointer
     df0:	bc 01       	movw	r22, r24
     df2:	6e 5f       	subi	r22, 0xFE	; 254
     df4:	7f 40       	sbci	r23, 0x0F	; 15
  
    FT800memWrite16(RAM_CMD + cmdOffset,font)                         ; //---Sent data Set format font(16,18,20,21,22,23,24...)					                              	     
    cmdOffset = incCMDOffset(cmdOffset,2)                             ; //Update Offset pointer Ram-CMD 2 byte for Next data

    FT800memWrite16(RAM_CMD + cmdOffset,opt)                          ; //---Sent data Option : Position Draw  Text					                              	     
    cmdOffset = incCMDOffset(cmdOffset,2)                             ; //Update Offset pointer Ram-CMD 2 byte for Next data
     df6:	70 93 63 01 	sts	0x0163, r23
     dfa:	60 93 62 01 	sts	0x0162, r22

    FT800memWriteStr(RAM_CMD + cmdOffset,str)                         ; //---Sent data Text	String		
     dfe:	80 e0       	ldi	r24, 0x00	; 0
     e00:	90 e0       	ldi	r25, 0x00	; 0
     e02:	60 50       	subi	r22, 0x00	; 0
     e04:	70 48       	sbci	r23, 0x80	; 128
     e06:	8f 4e       	sbci	r24, 0xEF	; 239
     e08:	9f 4f       	sbci	r25, 0xFF	; 255
     e0a:	a3 01       	movw	r20, r6
     e0c:	0e 94 1d 01 	call	0x23a	; 0x23a <FT800memWriteStr>

unsigned int End_incCMDOffset(unsigned int currentOffset, unsigned char commandSize)
{
  unsigned int newOffset                   ;  //used to hold new offset

   newOffset = currentOffset + commandSize ;  //Calculate new offset
     e10:	80 91 6e 01 	lds	r24, 0x016E
     e14:	20 91 62 01 	lds	r18, 0x0162
     e18:	30 91 63 01 	lds	r19, 0x0163
     e1c:	28 0f       	add	r18, r24
     e1e:	31 1d       	adc	r19, r1

   if(newOffset > 4095)	             	  	  //If new offset past boundary...
     e20:	80 e1       	ldi	r24, 0x10	; 16
     e22:	20 30       	cpi	r18, 0x00	; 0
     e24:	38 07       	cpc	r19, r24
     e26:	10 f0       	brcs	.+4      	; 0xe2c <Text_CMD+0x1a8>
    {
        newOffset = (newOffset - 4096)     ;  //... roll over pointer
     e28:	20 50       	subi	r18, 0x00	; 0
     e2a:	30 41       	sbci	r19, 0x10	; 16
    }
   

  //increment the length and align it by 4 bytes//

   newOffset = (newOffset+3) & 4092        ;
     e2c:	2d 5f       	subi	r18, 0xFD	; 253
     e2e:	3f 4f       	sbci	r19, 0xFF	; 255

    FT800memWrite16(RAM_CMD + cmdOffset,opt)                          ; //---Sent data Option : Position Draw  Text					                              	     
    cmdOffset = incCMDOffset(cmdOffset,2)                             ; //Update Offset pointer Ram-CMD 2 byte for Next data

    FT800memWriteStr(RAM_CMD + cmdOffset,str)                         ; //---Sent data Text	String		
    cmdOffset = End_incCMDOffset(cmdOffset,num_cha)                   ; //Update Offset pointer Ram-CMD for End CMD-Text
     e30:	2c 7f       	andi	r18, 0xFC	; 252
     e32:	3f 70       	andi	r19, 0x0F	; 15
     e34:	30 93 63 01 	sts	0x0163, r19
     e38:	20 93 62 01 	sts	0x0162, r18
  
  }
     e3c:	df 91       	pop	r29
     e3e:	cf 91       	pop	r28
     e40:	1f 91       	pop	r17
     e42:	0f 91       	pop	r16
     e44:	ff 90       	pop	r15
     e46:	ef 90       	pop	r14
     e48:	df 90       	pop	r13
     e4a:	cf 90       	pop	r12
     e4c:	bf 90       	pop	r11
     e4e:	af 90       	pop	r10
     e50:	9f 90       	pop	r9
     e52:	8f 90       	pop	r8
     e54:	7f 90       	pop	r7
     e56:	6f 90       	pop	r6
     e58:	08 95       	ret

00000e5a <Touch_Calibrate>:
  ++                6.3) Function-Calibrate Touch Screen                  ++
  ++                                                                      ++
  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/

void Touch_Calibrate(void)
 {
     e5a:	cf 92       	push	r12
     e5c:	df 92       	push	r13
     e5e:	ef 92       	push	r14
     e60:	ff 92       	push	r15
     e62:	0f 93       	push	r16
     e64:	1f 93       	push	r17

    // Calibrate Touch Screen //

    //--- 1.Start Display List ---
	Start_CMDList(Black)    ;
     e66:	60 e0       	ldi	r22, 0x00	; 0
     e68:	70 e0       	ldi	r23, 0x00	; 0
     e6a:	80 e0       	ldi	r24, 0x00	; 0
     e6c:	90 e0       	ldi	r25, 0x00	; 0
     e6e:	0e 94 93 02 	call	0x526	; 0x526 <Start_CMDList>
    
    //--- 2.1 Co-Processor Draw Text-CMD --- 

	Text_CMD("Please tap on a dot",240,139,26,OPT_CENTER,White)    ;
     e72:	80 e0       	ldi	r24, 0x00	; 0
     e74:	91 e0       	ldi	r25, 0x01	; 1
     e76:	60 ef       	ldi	r22, 0xF0	; 240
     e78:	70 e0       	ldi	r23, 0x00	; 0
     e7a:	4b e8       	ldi	r20, 0x8B	; 139
     e7c:	50 e0       	ldi	r21, 0x00	; 0
     e7e:	2a e1       	ldi	r18, 0x1A	; 26
     e80:	30 e0       	ldi	r19, 0x00	; 0
     e82:	00 e0       	ldi	r16, 0x00	; 0
     e84:	16 e0       	ldi	r17, 0x06	; 6
     e86:	ff ef       	ldi	r31, 0xFF	; 255
     e88:	cf 2e       	mov	r12, r31
     e8a:	ff ef       	ldi	r31, 0xFF	; 255
     e8c:	df 2e       	mov	r13, r31
     e8e:	ff ef       	ldi	r31, 0xFF	; 255
     e90:	ef 2e       	mov	r14, r31
     e92:	f1 2c       	mov	r15, r1
     e94:	0e 94 42 06 	call	0xc84	; 0xc84 <Text_CMD>

   //--- 2.2 Co-Processor Calibrate CMD --- 

    FT800memWrite32(RAM_CMD + cmdOffset,CMD_CALIBRATE)             ; //***Sent Co-CMD for Calibrate Touch Screen
     e98:	60 91 62 01 	lds	r22, 0x0162
     e9c:	70 91 63 01 	lds	r23, 0x0163
     ea0:	80 e0       	ldi	r24, 0x00	; 0
     ea2:	90 e0       	ldi	r25, 0x00	; 0
     ea4:	60 50       	subi	r22, 0x00	; 0
     ea6:	70 48       	sbci	r23, 0x80	; 128
     ea8:	8f 4e       	sbci	r24, 0xEF	; 239
     eaa:	9f 4f       	sbci	r25, 0xFF	; 255
     eac:	25 e1       	ldi	r18, 0x15	; 21
     eae:	3f ef       	ldi	r19, 0xFF	; 255
     eb0:	4f ef       	ldi	r20, 0xFF	; 255
     eb2:	5f ef       	ldi	r21, 0xFF	; 255
     eb4:	0e 94 e3 00 	call	0x1c6	; 0x1c6 <FT800memWrite32>

unsigned int incCMDOffset(unsigned int currentOffset, unsigned char commandSize)
{
    unsigned int newOffset                  ;   //used to hold new offset

    newOffset = currentOffset + commandSize ;	//Calculate new offset
     eb8:	20 91 62 01 	lds	r18, 0x0162
     ebc:	30 91 63 01 	lds	r19, 0x0163
     ec0:	c9 01       	movw	r24, r18
     ec2:	04 96       	adiw	r24, 0x04	; 4

    if(newOffset > 4095)			            //If new offset past boundary...
     ec4:	40 e1       	ldi	r20, 0x10	; 16
     ec6:	80 30       	cpi	r24, 0x00	; 0
     ec8:	94 07       	cpc	r25, r20
     eca:	18 f0       	brcs	.+6      	; 0xed2 <Touch_Calibrate+0x78>
    {
        newOffset = (newOffset - 4096)      ;	//... roll over pointer
     ecc:	c9 01       	movw	r24, r18
     ece:	8c 5f       	subi	r24, 0xFC	; 252
     ed0:	9f 40       	sbci	r25, 0x0F	; 15
	Text_CMD("Please tap on a dot",240,139,26,OPT_CENTER,White)    ;

   //--- 2.2 Co-Processor Calibrate CMD --- 

    FT800memWrite32(RAM_CMD + cmdOffset,CMD_CALIBRATE)             ; //***Sent Co-CMD for Calibrate Touch Screen
    cmdOffset = incCMDOffset(cmdOffset,4)                          ; //Update Offset pointer Ram-CMD 4 byte for Next data
     ed2:	90 93 63 01 	sts	0x0163, r25
     ed6:	80 93 62 01 	sts	0x0162, r24


   //--- 3.End Display List and Update Execute ----

    End_CMDList();
     eda:	0e 94 03 03 	call	0x606	; 0x606 <End_CMDList>

    Start_CMDOffset()                                              ; //Wait Calibrate Execute  
     ede:	0e 94 15 02 	call	0x42a	; 0x42a <Start_CMDOffset>


}
     ee2:	1f 91       	pop	r17
     ee4:	0f 91       	pop	r16
     ee6:	ff 90       	pop	r15
     ee8:	ef 90       	pop	r14
     eea:	df 90       	pop	r13
     eec:	cf 90       	pop	r12
     eee:	08 95       	ret

00000ef0 <FT800_Initial>:
  ++                                                                   ++                                       
  +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/


void FT800_Initial(void)         
 {
     ef0:	1f 93       	push	r17
     ef2:	cf 93       	push	r28
     ef4:	df 93       	push	r29
}


void FT800_PD_lo(void)
{
    cbi(PORTB,4)       ;   //PB4=0:Enable Power-Down FT800
     ef6:	c4 98       	cbi	0x18, 4	; 24
     ef8:	84 e1       	ldi	r24, 0x14	; 20
     efa:	90 e0       	ldi	r25, 0x00	; 0
     efc:	20 ea       	ldi	r18, 0xA0	; 160
     efe:	3f e0       	ldi	r19, 0x0F	; 15
     f00:	f9 01       	movw	r30, r18
     f02:	31 97       	sbiw	r30, 0x01	; 1
     f04:	f1 f7       	brne	.-4      	; 0xf02 <FT800_Initial+0x12>
 ++                                                ++
 +++++++++++++++++++++++++++++++++++++++++++++++++++*/

 void delay_ms(unsigned int cnt)
  {
    for(;cnt>0;cnt--)
     f06:	01 97       	sbiw	r24, 0x01	; 1
     f08:	d9 f7       	brne	.-10     	; 0xf00 <FT800_Initial+0x10>
  ++                                                                         ++
  +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/

void FT800_PD_hi(void)
{
	sbi(PORTB,4)       ;   //PB4=1:Disable Power-Down FT800
     f0a:	c4 9a       	sbi	0x18, 4	; 24
     f0c:	24 e1       	ldi	r18, 0x14	; 20
     f0e:	30 e0       	ldi	r19, 0x00	; 0
     f10:	40 ea       	ldi	r20, 0xA0	; 160
     f12:	5f e0       	ldi	r21, 0x0F	; 15
     f14:	c0 ea       	ldi	r28, 0xA0	; 160
     f16:	df e0       	ldi	r29, 0x0F	; 15
     f18:	ca 01       	movw	r24, r20
     f1a:	01 97       	sbiw	r24, 0x01	; 1
     f1c:	f1 f7       	brne	.-4      	; 0xf1a <FT800_Initial+0x2a>
 ++                                                ++
 +++++++++++++++++++++++++++++++++++++++++++++++++++*/

 void delay_ms(unsigned int cnt)
  {
    for(;cnt>0;cnt--)
     f1e:	21 50       	subi	r18, 0x01	; 1
     f20:	30 40       	sbci	r19, 0x00	; 0
     f22:	c1 f7       	brne	.-16     	; 0xf14 <FT800_Initial+0x24>
	 
   FT800_PD_hi()                            ;  //Power-Up FT800  
   delay_ms(20)                             ;  //delay 20 ms


   FT800_HostCmdWrite(FT800_ACTIVE)         ;  //***Sent Host-CMD Start FT800
     f24:	80 e0       	ldi	r24, 0x00	; 0
     f26:	0e 94 5a 01 	call	0x2b4	; 0x2b4 <FT800_HostCmdWrite>
     f2a:	ce 01       	movw	r24, r28
     f2c:	01 97       	sbiw	r24, 0x01	; 1
     f2e:	f1 f7       	brne	.-4      	; 0xf2c <FT800_Initial+0x3c>
     f30:	ce 01       	movw	r24, r28
     f32:	01 97       	sbiw	r24, 0x01	; 1
     f34:	f1 f7       	brne	.-4      	; 0xf32 <FT800_Initial+0x42>
     f36:	ce 01       	movw	r24, r28
     f38:	01 97       	sbiw	r24, 0x01	; 1
     f3a:	f1 f7       	brne	.-4      	; 0xf38 <FT800_Initial+0x48>
     f3c:	ce 01       	movw	r24, r28
     f3e:	01 97       	sbiw	r24, 0x01	; 1
     f40:	f1 f7       	brne	.-4      	; 0xf3e <FT800_Initial+0x4e>
     f42:	ce 01       	movw	r24, r28
     f44:	01 97       	sbiw	r24, 0x01	; 1
     f46:	f1 f7       	brne	.-4      	; 0xf44 <FT800_Initial+0x54>
   delay_ms(5);					               //Give some time to process

   FT800_HostCmdWrite(FT800_CLKEXT)         ;  //***Sent Host-CMD Set FT800 for external clock
     f48:	84 e4       	ldi	r24, 0x44	; 68
     f4a:	0e 94 5a 01 	call	0x2b4	; 0x2b4 <FT800_HostCmdWrite>
     f4e:	ce 01       	movw	r24, r28
     f50:	01 97       	sbiw	r24, 0x01	; 1
     f52:	f1 f7       	brne	.-4      	; 0xf50 <FT800_Initial+0x60>
     f54:	ce 01       	movw	r24, r28
     f56:	01 97       	sbiw	r24, 0x01	; 1
     f58:	f1 f7       	brne	.-4      	; 0xf56 <FT800_Initial+0x66>
     f5a:	ce 01       	movw	r24, r28
     f5c:	01 97       	sbiw	r24, 0x01	; 1
     f5e:	f1 f7       	brne	.-4      	; 0xf5c <FT800_Initial+0x6c>
     f60:	ce 01       	movw	r24, r28
     f62:	01 97       	sbiw	r24, 0x01	; 1
     f64:	f1 f7       	brne	.-4      	; 0xf62 <FT800_Initial+0x72>
     f66:	ce 01       	movw	r24, r28
     f68:	01 97       	sbiw	r24, 0x01	; 1
     f6a:	f1 f7       	brne	.-4      	; 0xf68 <FT800_Initial+0x78>
   delay_ms(5);					               //Give some time to process

   FT800_HostCmdWrite(FT800_CLK48M)         ;  //***Sent Host-CMD Set FT800 for 48MHz PLL
     f6c:	82 e6       	ldi	r24, 0x62	; 98
     f6e:	0e 94 5a 01 	call	0x2b4	; 0x2b4 <FT800_HostCmdWrite>
     f72:	ce 01       	movw	r24, r28
     f74:	01 97       	sbiw	r24, 0x01	; 1
     f76:	f1 f7       	brne	.-4      	; 0xf74 <FT800_Initial+0x84>
     f78:	ce 01       	movw	r24, r28
     f7a:	01 97       	sbiw	r24, 0x01	; 1
     f7c:	f1 f7       	brne	.-4      	; 0xf7a <FT800_Initial+0x8a>
     f7e:	ce 01       	movw	r24, r28
     f80:	01 97       	sbiw	r24, 0x01	; 1
     f82:	f1 f7       	brne	.-4      	; 0xf80 <FT800_Initial+0x90>
     f84:	ce 01       	movw	r24, r28
     f86:	01 97       	sbiw	r24, 0x01	; 1
     f88:	f1 f7       	brne	.-4      	; 0xf86 <FT800_Initial+0x96>
     f8a:	ce 01       	movw	r24, r28
     f8c:	01 97       	sbiw	r24, 0x01	; 1
     f8e:	f1 f7       	brne	.-4      	; 0xf8c <FT800_Initial+0x9c>
   delay_ms(5)                              ;  //Give some time to process
  					  	                       //Now FT800 can accept commands at up to 30MHz clock on SPI bus
  						                       //This application leaves the SPI bus at 4MHz

  if(FT800memRead8(REG_ID) != 0x7C)	    	   //***Read ID register - is it 0x7C?
     f90:	60 e0       	ldi	r22, 0x00	; 0
     f92:	74 e2       	ldi	r23, 0x24	; 36
     f94:	80 e1       	ldi	r24, 0x10	; 16
     f96:	90 e0       	ldi	r25, 0x00	; 0
     f98:	0e 94 65 01 	call	0x2ca	; 0x2ca <FT800memRead8>
     f9c:	8c 37       	cpi	r24, 0x7C	; 124
     f9e:	09 f0       	breq	.+2      	; 0xfa2 <FT800_Initial+0xb2>
     fa0:	ff cf       	rjmp	.-2      	; 0xfa0 <FT800_Initial+0xb0>
   {
   
     while(1);				              	   //If we don't get 0x7C, the ineface isn't working - halt with infinite loop
   }  
  
   FT800memWrite8(REG_PCLK,ZERO)           ;   //***Write data zero to Reg.PCLK  for don't clock the LCD until later
     fa2:	6c e6       	ldi	r22, 0x6C	; 108
     fa4:	74 e2       	ldi	r23, 0x24	; 36
     fa6:	80 e1       	ldi	r24, 0x10	; 16
     fa8:	90 e0       	ldi	r25, 0x00	; 0
     faa:	40 e0       	ldi	r20, 0x00	; 0
     fac:	0e 94 9a 00 	call	0x134	; 0x134 <FT800memWrite8>
   FT800memWrite8(REG_PWM_DUTY,ZERO)       ;   //***Write data zero to Reg.PWM_Duty for Turn off backlight
     fb0:	64 ec       	ldi	r22, 0xC4	; 196
     fb2:	74 e2       	ldi	r23, 0x24	; 36
     fb4:	80 e1       	ldi	r24, 0x10	; 16
     fb6:	90 e0       	ldi	r25, 0x00	; 0
     fb8:	40 e0       	ldi	r20, 0x00	; 0
     fba:	0e 94 9a 00 	call	0x134	; 0x134 <FT800memWrite8>
  


 //-------------------- 2.Configure Display ------------------------

  FT800memWrite16(REG_HSIZE,480)           ;  //***Write data to Reg : Active display width =480 Pixel
     fbe:	60 e3       	ldi	r22, 0x30	; 48
     fc0:	74 e2       	ldi	r23, 0x24	; 36
     fc2:	80 e1       	ldi	r24, 0x10	; 16
     fc4:	90 e0       	ldi	r25, 0x00	; 0
     fc6:	40 ee       	ldi	r20, 0xE0	; 224
     fc8:	51 e0       	ldi	r21, 0x01	; 1
     fca:	0e 94 bc 00 	call	0x178	; 0x178 <FT800memWrite16>
  FT800memWrite16(REG_HCYCLE,548)          ;  //***Write data to Reg : Total number of clocks per line, incl front/back porch
     fce:	68 e2       	ldi	r22, 0x28	; 40
     fd0:	74 e2       	ldi	r23, 0x24	; 36
     fd2:	80 e1       	ldi	r24, 0x10	; 16
     fd4:	90 e0       	ldi	r25, 0x00	; 0
     fd6:	44 e2       	ldi	r20, 0x24	; 36
     fd8:	52 e0       	ldi	r21, 0x02	; 2
     fda:	0e 94 bc 00 	call	0x178	; 0x178 <FT800memWrite16>
  FT800memWrite16(REG_HOFFSET,43)          ;  //***Write data to Reg : start of active line
     fde:	6c e2       	ldi	r22, 0x2C	; 44
     fe0:	74 e2       	ldi	r23, 0x24	; 36
     fe2:	80 e1       	ldi	r24, 0x10	; 16
     fe4:	90 e0       	ldi	r25, 0x00	; 0
     fe6:	4b e2       	ldi	r20, 0x2B	; 43
     fe8:	50 e0       	ldi	r21, 0x00	; 0
     fea:	0e 94 bc 00 	call	0x178	; 0x178 <FT800memWrite16>
  FT800memWrite16(REG_HSYNC0,0)            ;  //***Write data to Reg : Start of horizontal sync pulse
     fee:	64 e3       	ldi	r22, 0x34	; 52
     ff0:	74 e2       	ldi	r23, 0x24	; 36
     ff2:	80 e1       	ldi	r24, 0x10	; 16
     ff4:	90 e0       	ldi	r25, 0x00	; 0
     ff6:	40 e0       	ldi	r20, 0x00	; 0
     ff8:	50 e0       	ldi	r21, 0x00	; 0
     ffa:	0e 94 bc 00 	call	0x178	; 0x178 <FT800memWrite16>
  FT800memWrite16(REG_HSYNC1,41)           ;  //***Write data to Reg : End of horizontal sync pulse
     ffe:	68 e3       	ldi	r22, 0x38	; 56
    1000:	74 e2       	ldi	r23, 0x24	; 36
    1002:	80 e1       	ldi	r24, 0x10	; 16
    1004:	90 e0       	ldi	r25, 0x00	; 0
    1006:	49 e2       	ldi	r20, 0x29	; 41
    1008:	50 e0       	ldi	r21, 0x00	; 0
    100a:	0e 94 bc 00 	call	0x178	; 0x178 <FT800memWrite16>
  
  FT800memWrite16(REG_VSIZE,272)           ;  //***Write data to Reg : Active display height =272 Pixel
    100e:	64 e4       	ldi	r22, 0x44	; 68
    1010:	74 e2       	ldi	r23, 0x24	; 36
    1012:	80 e1       	ldi	r24, 0x10	; 16
    1014:	90 e0       	ldi	r25, 0x00	; 0
    1016:	40 e1       	ldi	r20, 0x10	; 16
    1018:	51 e0       	ldi	r21, 0x01	; 1
    101a:	0e 94 bc 00 	call	0x178	; 0x178 <FT800memWrite16>
  FT800memWrite16(REG_VCYCLE,292)          ;  //***Write data to Reg : Total number of lines per screen, incl pre/post
    101e:	6c e3       	ldi	r22, 0x3C	; 60
    1020:	74 e2       	ldi	r23, 0x24	; 36
    1022:	80 e1       	ldi	r24, 0x10	; 16
    1024:	90 e0       	ldi	r25, 0x00	; 0
    1026:	44 e2       	ldi	r20, 0x24	; 36
    1028:	51 e0       	ldi	r21, 0x01	; 1
    102a:	0e 94 bc 00 	call	0x178	; 0x178 <FT800memWrite16>
  FT800memWrite16(REG_VOFFSET,12)          ;  //***Write data to Reg : Start of active screen
    102e:	60 e4       	ldi	r22, 0x40	; 64
    1030:	74 e2       	ldi	r23, 0x24	; 36
    1032:	80 e1       	ldi	r24, 0x10	; 16
    1034:	90 e0       	ldi	r25, 0x00	; 0
    1036:	4c e0       	ldi	r20, 0x0C	; 12
    1038:	50 e0       	ldi	r21, 0x00	; 0
    103a:	0e 94 bc 00 	call	0x178	; 0x178 <FT800memWrite16>
  FT800memWrite16(REG_VSYNC0,0)            ;  //***Write data to Reg : Start of vertical sync pulse
    103e:	68 e4       	ldi	r22, 0x48	; 72
    1040:	74 e2       	ldi	r23, 0x24	; 36
    1042:	80 e1       	ldi	r24, 0x10	; 16
    1044:	90 e0       	ldi	r25, 0x00	; 0
    1046:	40 e0       	ldi	r20, 0x00	; 0
    1048:	50 e0       	ldi	r21, 0x00	; 0
    104a:	0e 94 bc 00 	call	0x178	; 0x178 <FT800memWrite16>
  FT800memWrite16(REG_VSYNC1,10)           ;  //***Write data to Reg : End of vertical sync pulse
    104e:	6c e4       	ldi	r22, 0x4C	; 76
    1050:	74 e2       	ldi	r23, 0x24	; 36
    1052:	80 e1       	ldi	r24, 0x10	; 16
    1054:	90 e0       	ldi	r25, 0x00	; 0
    1056:	4a e0       	ldi	r20, 0x0A	; 10
    1058:	50 e0       	ldi	r21, 0x00	; 0
    105a:	0e 94 bc 00 	call	0x178	; 0x178 <FT800memWrite16>
  
  FT800memWrite8(REG_SWIZZLE,0)            ;  //***Write data to Reg : FT800 output to LCD - pin order
    105e:	60 e6       	ldi	r22, 0x60	; 96
    1060:	74 e2       	ldi	r23, 0x24	; 36
    1062:	80 e1       	ldi	r24, 0x10	; 16
    1064:	90 e0       	ldi	r25, 0x00	; 0
    1066:	40 e0       	ldi	r20, 0x00	; 0
    1068:	0e 94 9a 00 	call	0x134	; 0x134 <FT800memWrite8>
  FT800memWrite8(REG_PCLK_POL,1)           ;  //***Write data to Reg : LCD data is clocked in on this PCLK edge
    106c:	68 e6       	ldi	r22, 0x68	; 104
    106e:	74 e2       	ldi	r23, 0x24	; 36
    1070:	80 e1       	ldi	r24, 0x10	; 16
    1072:	90 e0       	ldi	r25, 0x00	; 0
    1074:	41 e0       	ldi	r20, 0x01	; 1
    1076:	0e 94 9a 00 	call	0x134	; 0x134 <FT800memWrite8>
						                      //***Write data to Reg : Don't set PCLK yet - wait for just after the first display list


 //------------------- 3.Configure Touch -----------------
  
  FT800memWrite8(REG_TOUCH_MODE,0x03)      ;  //***Write data to Reg : Touch Mode Continuous
    107a:	60 ef       	ldi	r22, 0xF0	; 240
    107c:	74 e2       	ldi	r23, 0x24	; 36
    107e:	80 e1       	ldi	r24, 0x10	; 16
    1080:	90 e0       	ldi	r25, 0x00	; 0
    1082:	43 e0       	ldi	r20, 0x03	; 3
    1084:	0e 94 9a 00 	call	0x134	; 0x134 <FT800memWrite8>
  FT800memWrite16(REG_TOUCH_RZTHRESH,1200) ;  //***Write data to Reg : Eliminate any false touches
    1088:	64 e0       	ldi	r22, 0x04	; 4
    108a:	75 e2       	ldi	r23, 0x25	; 37
    108c:	80 e1       	ldi	r24, 0x10	; 16
    108e:	90 e0       	ldi	r25, 0x00	; 0
    1090:	40 eb       	ldi	r20, 0xB0	; 176
    1092:	54 e0       	ldi	r21, 0x04	; 4
    1094:	0e 94 bc 00 	call	0x178	; 0x178 <FT800memWrite16>
  

//-------------------- 4. Configure Audio ----------------


  FT800memWrite8(REG_GPIO_DIR,0x82)        ;   //***Write Data to Reg :  Set Direction  GPIO 7,1 = Output
    1098:	6c e8       	ldi	r22, 0x8C	; 140
    109a:	74 e2       	ldi	r23, 0x24	; 36
    109c:	80 e1       	ldi	r24, 0x10	; 16
    109e:	90 e0       	ldi	r25, 0x00	; 0
    10a0:	42 e8       	ldi	r20, 0x82	; 130
    10a2:	0e 94 9a 00 	call	0x134	; 0x134 <FT800memWrite8>

  ft800Gpio = FT800memRead8(REG_GPIO)      ;   //***Read the FT800 GPIO register for a read/modify/write operation
    10a6:	60 e9       	ldi	r22, 0x90	; 144
    10a8:	74 e2       	ldi	r23, 0x24	; 36
    10aa:	80 e1       	ldi	r24, 0x10	; 16
    10ac:	90 e0       	ldi	r25, 0x00	; 0
    10ae:	0e 94 65 01 	call	0x2ca	; 0x2ca <FT800memRead8>
  ft800Gpio = ft800Gpio | 0x02             ;   //set bit 1 of FT800 GPIO register (Audio) - others are inputs
    10b2:	48 2f       	mov	r20, r24
    10b4:	42 60       	ori	r20, 0x02	; 2
    10b6:	40 93 6d 01 	sts	0x016D, r20

  FT800memWrite8(REG_GPIO,ft800Gpio)       ;   //***Write Data to Reg : Enable(1) the Audio Amp
    10ba:	60 e9       	ldi	r22, 0x90	; 144
    10bc:	74 e2       	ldi	r23, 0x24	; 36
    10be:	80 e1       	ldi	r24, 0x10	; 16
    10c0:	90 e0       	ldi	r25, 0x00	; 0
    10c2:	0e 94 9a 00 	call	0x134	; 0x134 <FT800memWrite8>
  
  FT800memWrite8(REG_VOL_PB,ZERO)          ;  //***Write data to Reg : Turn recorded audio volume 
    10c6:	6c e7       	ldi	r22, 0x7C	; 124
    10c8:	74 e2       	ldi	r23, 0x24	; 36
    10ca:	80 e1       	ldi	r24, 0x10	; 16
    10cc:	90 e0       	ldi	r25, 0x00	; 0
    10ce:	40 e0       	ldi	r20, 0x00	; 0
    10d0:	0e 94 9a 00 	call	0x134	; 0x134 <FT800memWrite8>
  FT800memWrite8(REG_VOL_SOUND,0x80)       ;  //***Write data to Reg : Turn synthesizer volume 50%(100%=0xFF)  
    10d4:	60 e8       	ldi	r22, 0x80	; 128
    10d6:	74 e2       	ldi	r23, 0x24	; 36
    10d8:	80 e1       	ldi	r24, 0x10	; 16
    10da:	90 e0       	ldi	r25, 0x00	; 0
    10dc:	40 e8       	ldi	r20, 0x80	; 128
    10de:	0e 94 9a 00 	call	0x134	; 0x134 <FT800memWrite8>
 
  FT800memWrite16(REG_SOUND,0x0000)        ;  //***Write data to Reg : Select Sound Effect = Silence(No Sound) 
    10e2:	64 e8       	ldi	r22, 0x84	; 132
    10e4:	74 e2       	ldi	r23, 0x24	; 36
    10e6:	80 e1       	ldi	r24, 0x10	; 16
    10e8:	90 e0       	ldi	r25, 0x00	; 0
    10ea:	40 e0       	ldi	r20, 0x00	; 0
    10ec:	50 e0       	ldi	r21, 0x00	; 0
    10ee:	0e 94 bc 00 	call	0x178	; 0x178 <FT800memWrite16>
  FT800memWrite8(REG_PLAY,0x01)            ;  //***Write data to Reg : Play Sound Effect
    10f2:	68 e8       	ldi	r22, 0x88	; 136
    10f4:	74 e2       	ldi	r23, 0x24	; 36
    10f6:	80 e1       	ldi	r24, 0x10	; 16
    10f8:	90 e0       	ldi	r25, 0x00	; 0
    10fa:	41 e0       	ldi	r20, 0x01	; 1
    10fc:	0e 94 9a 00 	call	0x134	; 0x134 <FT800memWrite8>

 //------------------ 5.Write Initial Display List & Enable Display -----------------


  FT800memWrite32(RAM_DL+DL_Offset,DL_CLEAR_RGB)  ;   //***Sent DL-CMD Clear color BackGround to Black (default)
    1100:	60 91 60 01 	lds	r22, 0x0160
    1104:	70 91 61 01 	lds	r23, 0x0161
    1108:	80 e0       	ldi	r24, 0x00	; 0
    110a:	90 e0       	ldi	r25, 0x00	; 0
    110c:	60 50       	subi	r22, 0x00	; 0
    110e:	70 40       	sbci	r23, 0x00	; 0
    1110:	80 4f       	sbci	r24, 0xF0	; 240
    1112:	9f 4f       	sbci	r25, 0xFF	; 255
    1114:	20 e0       	ldi	r18, 0x00	; 0
    1116:	30 e0       	ldi	r19, 0x00	; 0
    1118:	40 e0       	ldi	r20, 0x00	; 0
    111a:	52 e0       	ldi	r21, 0x02	; 2
    111c:	0e 94 e3 00 	call	0x1c6	; 0x1c6 <FT800memWrite32>
  DL_Offset += 4                                  ;	  //Update Offset pointer Ram-DL 4 byte for Next DL-CMD
    1120:	60 91 60 01 	lds	r22, 0x0160
    1124:	70 91 61 01 	lds	r23, 0x0161
    1128:	6c 5f       	subi	r22, 0xFC	; 252
    112a:	7f 4f       	sbci	r23, 0xFF	; 255
    112c:	70 93 61 01 	sts	0x0161, r23
    1130:	60 93 60 01 	sts	0x0160, r22

  FT800memWrite32(RAM_DL+DL_Offset,(DL_CLEAR | CLR_COL | CLR_STN | CLR_TAG));	//***Sent DL-CMD Clear C/S/T define which parameters to clear
    1134:	80 e0       	ldi	r24, 0x00	; 0
    1136:	90 e0       	ldi	r25, 0x00	; 0
    1138:	60 50       	subi	r22, 0x00	; 0
    113a:	70 40       	sbci	r23, 0x00	; 0
    113c:	80 4f       	sbci	r24, 0xF0	; 240
    113e:	9f 4f       	sbci	r25, 0xFF	; 255
    1140:	27 e0       	ldi	r18, 0x07	; 7
    1142:	30 e0       	ldi	r19, 0x00	; 0
    1144:	40 e0       	ldi	r20, 0x00	; 0
    1146:	56 e2       	ldi	r21, 0x26	; 38
    1148:	0e 94 e3 00 	call	0x1c6	; 0x1c6 <FT800memWrite32>
  DL_Offset += 4                                  ;	  //Update Offset pointer Ram-DL 4 byte for Next DL-CMD
    114c:	60 91 60 01 	lds	r22, 0x0160
    1150:	70 91 61 01 	lds	r23, 0x0161
    1154:	6c 5f       	subi	r22, 0xFC	; 252
    1156:	7f 4f       	sbci	r23, 0xFF	; 255
    1158:	70 93 61 01 	sts	0x0161, r23
    115c:	60 93 60 01 	sts	0x0160, r22

  FT800memWrite32(RAM_DL+DL_Offset,DL_DISPLAY)    ;   //***Sent DL-CMD for end of display list
    1160:	80 e0       	ldi	r24, 0x00	; 0
    1162:	90 e0       	ldi	r25, 0x00	; 0
    1164:	60 50       	subi	r22, 0x00	; 0
    1166:	70 40       	sbci	r23, 0x00	; 0
    1168:	80 4f       	sbci	r24, 0xF0	; 240
    116a:	9f 4f       	sbci	r25, 0xFF	; 255
    116c:	20 e0       	ldi	r18, 0x00	; 0
    116e:	30 e0       	ldi	r19, 0x00	; 0
    1170:	40 e0       	ldi	r20, 0x00	; 0
    1172:	50 e0       	ldi	r21, 0x00	; 0
    1174:	0e 94 e3 00 	call	0x1c6	; 0x1c6 <FT800memWrite32>

  FT800memWrite32(REG_DLSWAP,DLSWAP_FRAME )       ;	  //***Write data(0x02) to Reg : Display List Execute
    1178:	60 e5       	ldi	r22, 0x50	; 80
    117a:	74 e2       	ldi	r23, 0x24	; 36
    117c:	80 e1       	ldi	r24, 0x10	; 16
    117e:	90 e0       	ldi	r25, 0x00	; 0
    1180:	22 e0       	ldi	r18, 0x02	; 2
    1182:	30 e0       	ldi	r19, 0x00	; 0
    1184:	40 e0       	ldi	r20, 0x00	; 0
    1186:	50 e0       	ldi	r21, 0x00	; 0
    1188:	0e 94 e3 00 	call	0x1c6	; 0x1c6 <FT800memWrite32>
						                              
  DL_Offset = 0                                   ;   //Reset Display List offset pointer=0 for new Display list
    118c:	10 92 61 01 	sts	0x0161, r1
    1190:	10 92 60 01 	sts	0x0160, r1
  
  ft800Gpio = FT800memRead8(REG_GPIO)             ;	  //***Read the FT800 GPIO register for a read/modify/write operation
    1194:	60 e9       	ldi	r22, 0x90	; 144
    1196:	74 e2       	ldi	r23, 0x24	; 36
    1198:	80 e1       	ldi	r24, 0x10	; 16
    119a:	90 e0       	ldi	r25, 0x00	; 0
    119c:	0e 94 65 01 	call	0x2ca	; 0x2ca <FT800memRead8>
  ft800Gpio = ft800Gpio | 0x80                    ;   //set bit 7 of FT800 GPIO register (DISP) - others are inputs
    11a0:	48 2f       	mov	r20, r24
    11a2:	40 68       	ori	r20, 0x80	; 128
    11a4:	40 93 6d 01 	sts	0x016D, r20

  FT800memWrite8(REG_GPIO,ft800Gpio)              ;   //***Write Data to Reg : Enable the DISP signal to the LCD panel
    11a8:	60 e9       	ldi	r22, 0x90	; 144
    11aa:	74 e2       	ldi	r23, 0x24	; 36
    11ac:	80 e1       	ldi	r24, 0x10	; 16
    11ae:	90 e0       	ldi	r25, 0x00	; 0
    11b0:	0e 94 9a 00 	call	0x134	; 0x134 <FT800memWrite8>
  FT800memWrite8(REG_PCLK,5)                      ;   //***Write Data to Reg : Now start clocking data to the LCD panel
    11b4:	6c e6       	ldi	r22, 0x6C	; 108
    11b6:	74 e2       	ldi	r23, 0x24	; 36
    11b8:	80 e1       	ldi	r24, 0x10	; 16
    11ba:	90 e0       	ldi	r25, 0x00	; 0
    11bc:	45 e0       	ldi	r20, 0x05	; 5
    11be:	0e 94 9a 00 	call	0x134	; 0x134 <FT800memWrite8>
    11c2:	10 e0       	ldi	r17, 0x00	; 0
    11c4:	c0 ea       	ldi	r28, 0xA0	; 160
    11c6:	df e0       	ldi	r29, 0x0F	; 15
 
  for(duty = 0; duty <= 128; duty++)
   {
     FT800memWrite8(REG_PWM_DUTY, duty);		      //***Write Data to Reg : Turn on backlight - ramp up slowly to full brighness
    11c8:	64 ec       	ldi	r22, 0xC4	; 196
    11ca:	74 e2       	ldi	r23, 0x24	; 36
    11cc:	80 e1       	ldi	r24, 0x10	; 16
    11ce:	90 e0       	ldi	r25, 0x00	; 0
    11d0:	41 2f       	mov	r20, r17
    11d2:	0e 94 9a 00 	call	0x134	; 0x134 <FT800memWrite8>
    11d6:	8a e0       	ldi	r24, 0x0A	; 10
    11d8:	90 e0       	ldi	r25, 0x00	; 0
    11da:	fe 01       	movw	r30, r28
    11dc:	31 97       	sbiw	r30, 0x01	; 1
    11de:	f1 f7       	brne	.-4      	; 0x11dc <__stack+0xdd>
 ++                                                ++
 +++++++++++++++++++++++++++++++++++++++++++++++++++*/

 void delay_ms(unsigned int cnt)
  {
    for(;cnt>0;cnt--)
    11e0:	01 97       	sbiw	r24, 0x01	; 1
    11e2:	d9 f7       	brne	.-10     	; 0x11da <__stack+0xdb>
    11e4:	1f 5f       	subi	r17, 0xFF	; 255
  ft800Gpio = ft800Gpio | 0x80                    ;   //set bit 7 of FT800 GPIO register (DISP) - others are inputs

  FT800memWrite8(REG_GPIO,ft800Gpio)              ;   //***Write Data to Reg : Enable the DISP signal to the LCD panel
  FT800memWrite8(REG_PCLK,5)                      ;   //***Write Data to Reg : Now start clocking data to the LCD panel
 
  for(duty = 0; duty <= 128; duty++)
    11e6:	11 38       	cpi	r17, 0x81	; 129
    11e8:	79 f7       	brne	.-34     	; 0x11c8 <__stack+0xc9>
    11ea:	8a e0       	ldi	r24, 0x0A	; 10
    11ec:	90 e0       	ldi	r25, 0x00	; 0
    11ee:	20 ea       	ldi	r18, 0xA0	; 160
    11f0:	3f e0       	ldi	r19, 0x0F	; 15
    11f2:	f9 01       	movw	r30, r18
    11f4:	31 97       	sbiw	r30, 0x01	; 1
    11f6:	f1 f7       	brne	.-4      	; 0x11f4 <__stack+0xf5>
 ++                                                ++
 +++++++++++++++++++++++++++++++++++++++++++++++++++*/

 void delay_ms(unsigned int cnt)
  {
    for(;cnt>0;cnt--)
    11f8:	01 97       	sbiw	r24, 0x01	; 1
    11fa:	d9 f7       	brne	.-10     	; 0x11f2 <__stack+0xf3>
     FT800memWrite8(REG_PWM_DUTY, duty);		      //***Write Data to Reg : Turn on backlight - ramp up slowly to full brighness
     delay_ms(10);
   }
  delay_ms(10);

 }
    11fc:	df 91       	pop	r29
    11fe:	cf 91       	pop	r28
    1200:	1f 91       	pop	r17
    1202:	08 95       	ret

00001204 <Update_Screen>:
  ++          btdown_color = Set Color Button "-"                                 ++
  ++                                                                              ++
  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/

  void Update_Screen(long btset_color,long tx_color,long bt_color,long btup_color,long btdown_color)
   {
    1204:	4f 92       	push	r4
    1206:	5f 92       	push	r5
    1208:	6f 92       	push	r6
    120a:	7f 92       	push	r7
    120c:	8f 92       	push	r8
    120e:	9f 92       	push	r9
    1210:	af 92       	push	r10
    1212:	bf 92       	push	r11
    1214:	cf 92       	push	r12
    1216:	df 92       	push	r13
    1218:	ef 92       	push	r14
    121a:	ff 92       	push	r15
    121c:	0f 93       	push	r16
    121e:	1f 93       	push	r17
    1220:	df 93       	push	r29
    1222:	cf 93       	push	r28
    1224:	cd b7       	in	r28, 0x3d	; 61
    1226:	de b7       	in	r29, 0x3e	; 62
    1228:	2c 97       	sbiw	r28, 0x0c	; 12
    122a:	0f b6       	in	r0, 0x3f	; 63
    122c:	f8 94       	cli
    122e:	de bf       	out	0x3e, r29	; 62
    1230:	0f be       	out	0x3f, r0	; 63
    1232:	cd bf       	out	0x3d, r28	; 61
    1234:	69 83       	std	Y+1, r22	; 0x01
    1236:	7a 83       	std	Y+2, r23	; 0x02
    1238:	8b 83       	std	Y+3, r24	; 0x03
    123a:	9c 83       	std	Y+4, r25	; 0x04
    123c:	29 01       	movw	r4, r18
    123e:	3a 01       	movw	r6, r20
    1240:	ed 82       	std	Y+5, r14	; 0x05
    1242:	fe 82       	std	Y+6, r15	; 0x06
    1244:	0f 83       	std	Y+7, r16	; 0x07
    1246:	18 87       	std	Y+8, r17	; 0x08
    1248:	a9 86       	std	Y+9, r10	; 0x09
    124a:	ba 86       	std	Y+10, r11	; 0x0a
    124c:	cb 86       	std	Y+11, r12	; 0x0b
    124e:	dc 86       	std	Y+12, r13	; 0x0c

    //----------------- 1.Start Display List ------------------------
      
     Start_CMDList(Black)   ;
    1250:	60 e0       	ldi	r22, 0x00	; 0
    1252:	70 e0       	ldi	r23, 0x00	; 0
    1254:	80 e0       	ldi	r24, 0x00	; 0
    1256:	90 e0       	ldi	r25, 0x00	; 0
    1258:	0e 94 93 02 	call	0x526	; 0x526 <Start_CMDList>

  
   //------------------ 2.User Program ------------------------- 
  
    
    Text_CMD("ET-DEMO CLOCK",250,30,24,0,Yellow)                        ;  //Display Text "ET-DEMO CLOCK"
    125c:	84 e1       	ldi	r24, 0x14	; 20
    125e:	91 e0       	ldi	r25, 0x01	; 1
    1260:	6a ef       	ldi	r22, 0xFA	; 250
    1262:	70 e0       	ldi	r23, 0x00	; 0
    1264:	4e e1       	ldi	r20, 0x1E	; 30
    1266:	50 e0       	ldi	r21, 0x00	; 0
    1268:	28 e1       	ldi	r18, 0x18	; 24
    126a:	30 e0       	ldi	r19, 0x00	; 0
    126c:	00 e0       	ldi	r16, 0x00	; 0
    126e:	10 e0       	ldi	r17, 0x00	; 0
    1270:	c1 2c       	mov	r12, r1
    1272:	bf ef       	ldi	r27, 0xFF	; 255
    1274:	db 2e       	mov	r13, r27
    1276:	bf ef       	ldi	r27, 0xFF	; 255
    1278:	eb 2e       	mov	r14, r27
    127a:	f1 2c       	mov	r15, r1
    127c:	0e 94 42 06 	call	0xc84	; 0xc84 <Text_CMD>
   
    Button_CMD("Color",330,100,50,25,27,0,tx_color,bt_color)            ;  //Draw Button"Color"
    1280:	00 d0       	rcall	.+0      	; 0x1282 <Update_Screen+0x7e>
    1282:	00 d0       	rcall	.+0      	; 0x1284 <Update_Screen+0x80>
    1284:	8d 81       	ldd	r24, Y+5	; 0x05
    1286:	9e 81       	ldd	r25, Y+6	; 0x06
    1288:	af 81       	ldd	r26, Y+7	; 0x07
    128a:	b8 85       	ldd	r27, Y+8	; 0x08
    128c:	ed b7       	in	r30, 0x3d	; 61
    128e:	fe b7       	in	r31, 0x3e	; 62
    1290:	81 83       	std	Z+1, r24	; 0x01
    1292:	92 83       	std	Z+2, r25	; 0x02
    1294:	a3 83       	std	Z+3, r26	; 0x03
    1296:	b4 83       	std	Z+4, r27	; 0x04
    1298:	82 e2       	ldi	r24, 0x22	; 34
    129a:	91 e0       	ldi	r25, 0x01	; 1
    129c:	6a e4       	ldi	r22, 0x4A	; 74
    129e:	71 e0       	ldi	r23, 0x01	; 1
    12a0:	44 e6       	ldi	r20, 0x64	; 100
    12a2:	50 e0       	ldi	r21, 0x00	; 0
    12a4:	22 e3       	ldi	r18, 0x32	; 50
    12a6:	30 e0       	ldi	r19, 0x00	; 0
    12a8:	09 e1       	ldi	r16, 0x19	; 25
    12aa:	10 e0       	ldi	r17, 0x00	; 0
    12ac:	ab e1       	ldi	r26, 0x1B	; 27
    12ae:	ea 2e       	mov	r14, r26
    12b0:	f1 2c       	mov	r15, r1
    12b2:	cc 24       	eor	r12, r12
    12b4:	dd 24       	eor	r13, r13
    12b6:	53 01       	movw	r10, r6
    12b8:	42 01       	movw	r8, r4
    12ba:	0e 94 54 03 	call	0x6a8	; 0x6a8 <Button_CMD>

    Clock_CMD(120,136,100,0,hh,mm,ss,0,tx_color,bt_color)               ;  //Draw Clock   
    12be:	00 d0       	rcall	.+0      	; 0x12c0 <Update_Screen+0xbc>
    12c0:	00 d0       	rcall	.+0      	; 0x12c2 <Update_Screen+0xbe>
    12c2:	00 91 36 01 	lds	r16, 0x0136
    12c6:	10 91 37 01 	lds	r17, 0x0137
    12ca:	e0 90 68 01 	lds	r14, 0x0168
    12ce:	f0 90 69 01 	lds	r15, 0x0169
    12d2:	c0 90 6a 01 	lds	r12, 0x016A
    12d6:	d0 90 6b 01 	lds	r13, 0x016B
    12da:	ad b7       	in	r26, 0x3d	; 61
    12dc:	be b7       	in	r27, 0x3e	; 62
    12de:	11 96       	adiw	r26, 0x01	; 1
    12e0:	4d 92       	st	X+, r4
    12e2:	5d 92       	st	X+, r5
    12e4:	6d 92       	st	X+, r6
    12e6:	7c 92       	st	X, r7
    12e8:	14 97       	sbiw	r26, 0x04	; 4
    12ea:	8d 81       	ldd	r24, Y+5	; 0x05
    12ec:	9e 81       	ldd	r25, Y+6	; 0x06
    12ee:	af 81       	ldd	r26, Y+7	; 0x07
    12f0:	b8 85       	ldd	r27, Y+8	; 0x08
    12f2:	ed b7       	in	r30, 0x3d	; 61
    12f4:	fe b7       	in	r31, 0x3e	; 62
    12f6:	85 83       	std	Z+5, r24	; 0x05
    12f8:	96 83       	std	Z+6, r25	; 0x06
    12fa:	a7 83       	std	Z+7, r26	; 0x07
    12fc:	b0 87       	std	Z+8, r27	; 0x08
    12fe:	88 e7       	ldi	r24, 0x78	; 120
    1300:	90 e0       	ldi	r25, 0x00	; 0
    1302:	68 e8       	ldi	r22, 0x88	; 136
    1304:	70 e0       	ldi	r23, 0x00	; 0
    1306:	44 e6       	ldi	r20, 0x64	; 100
    1308:	50 e0       	ldi	r21, 0x00	; 0
    130a:	20 e0       	ldi	r18, 0x00	; 0
    130c:	30 e0       	ldi	r19, 0x00	; 0
    130e:	aa 24       	eor	r10, r10
    1310:	bb 24       	eor	r11, r11
    1312:	0e 94 c0 04 	call	0x980	; 0x980 <Clock_CMD>

    Button_CMD("+",405,130,25,25,23,0,White,btup_color)                 ;  //Draw Button"+"
    1316:	0f 90       	pop	r0
    1318:	0f 90       	pop	r0
    131a:	0f 90       	pop	r0
    131c:	0f 90       	pop	r0
    131e:	89 85       	ldd	r24, Y+9	; 0x09
    1320:	9a 85       	ldd	r25, Y+10	; 0x0a
    1322:	ab 85       	ldd	r26, Y+11	; 0x0b
    1324:	bc 85       	ldd	r27, Y+12	; 0x0c
    1326:	ed b7       	in	r30, 0x3d	; 61
    1328:	fe b7       	in	r31, 0x3e	; 62
    132a:	81 83       	std	Z+1, r24	; 0x01
    132c:	92 83       	std	Z+2, r25	; 0x02
    132e:	a3 83       	std	Z+3, r26	; 0x03
    1330:	b4 83       	std	Z+4, r27	; 0x04
    1332:	88 e2       	ldi	r24, 0x28	; 40
    1334:	91 e0       	ldi	r25, 0x01	; 1
    1336:	65 e9       	ldi	r22, 0x95	; 149
    1338:	71 e0       	ldi	r23, 0x01	; 1
    133a:	42 e8       	ldi	r20, 0x82	; 130
    133c:	50 e0       	ldi	r21, 0x00	; 0
    133e:	29 e1       	ldi	r18, 0x19	; 25
    1340:	30 e0       	ldi	r19, 0x00	; 0
    1342:	09 e1       	ldi	r16, 0x19	; 25
    1344:	10 e0       	ldi	r17, 0x00	; 0
    1346:	f7 e1       	ldi	r31, 0x17	; 23
    1348:	ef 2e       	mov	r14, r31
    134a:	f1 2c       	mov	r15, r1
    134c:	cc 24       	eor	r12, r12
    134e:	dd 24       	eor	r13, r13
    1350:	ef ef       	ldi	r30, 0xFF	; 255
    1352:	8e 2e       	mov	r8, r30
    1354:	ef ef       	ldi	r30, 0xFF	; 255
    1356:	9e 2e       	mov	r9, r30
    1358:	ef ef       	ldi	r30, 0xFF	; 255
    135a:	ae 2e       	mov	r10, r30
    135c:	b1 2c       	mov	r11, r1
    135e:	0e 94 54 03 	call	0x6a8	; 0x6a8 <Button_CMD>
    Button_CMD("-",280,130,25,25,23,0,White,btdown_color)               ;  //Draw Button"-"
    1362:	8f 8d       	ldd	r24, Y+31	; 0x1f
    1364:	98 a1       	ldd	r25, Y+32	; 0x20
    1366:	a9 a1       	ldd	r26, Y+33	; 0x21
    1368:	ba a1       	ldd	r27, Y+34	; 0x22
    136a:	ed b7       	in	r30, 0x3d	; 61
    136c:	fe b7       	in	r31, 0x3e	; 62
    136e:	81 83       	std	Z+1, r24	; 0x01
    1370:	92 83       	std	Z+2, r25	; 0x02
    1372:	a3 83       	std	Z+3, r26	; 0x03
    1374:	b4 83       	std	Z+4, r27	; 0x04
    1376:	8a e2       	ldi	r24, 0x2A	; 42
    1378:	91 e0       	ldi	r25, 0x01	; 1
    137a:	68 e1       	ldi	r22, 0x18	; 24
    137c:	71 e0       	ldi	r23, 0x01	; 1
    137e:	42 e8       	ldi	r20, 0x82	; 130
    1380:	50 e0       	ldi	r21, 0x00	; 0
    1382:	29 e1       	ldi	r18, 0x19	; 25
    1384:	30 e0       	ldi	r19, 0x00	; 0
    1386:	0e 94 54 03 	call	0x6a8	; 0x6a8 <Button_CMD>
   


    switch(mode)
    138a:	0f 90       	pop	r0
    138c:	0f 90       	pop	r0
    138e:	0f 90       	pop	r0
    1390:	0f 90       	pop	r0
    1392:	80 91 6c 01 	lds	r24, 0x016C
    1396:	81 30       	cpi	r24, 0x01	; 1
    1398:	a9 f0       	breq	.+42     	; 0x13c4 <Update_Screen+0x1c0>
    139a:	81 30       	cpi	r24, 0x01	; 1
    139c:	20 f0       	brcs	.+8      	; 0x13a6 <Update_Screen+0x1a2>
    139e:	82 30       	cpi	r24, 0x02	; 2
    13a0:	09 f0       	breq	.+2      	; 0x13a4 <Update_Screen+0x1a0>
    13a2:	47 c0       	rjmp	.+142    	; 0x1432 <Update_Screen+0x22e>
    13a4:	1e c0       	rjmp	.+60     	; 0x13e2 <Update_Screen+0x1de>
	 {
	 
	   case 0 :	
  	           Button_CMD("SET",330,160,50,25,27,0,White,btset_color)                  ;  //Draw Button"Set" 
    13a6:	00 d0       	rcall	.+0      	; 0x13a8 <Update_Screen+0x1a4>
    13a8:	00 d0       	rcall	.+0      	; 0x13aa <Update_Screen+0x1a6>
    13aa:	89 81       	ldd	r24, Y+1	; 0x01
    13ac:	9a 81       	ldd	r25, Y+2	; 0x02
    13ae:	ab 81       	ldd	r26, Y+3	; 0x03
    13b0:	bc 81       	ldd	r27, Y+4	; 0x04
    13b2:	ed b7       	in	r30, 0x3d	; 61
    13b4:	fe b7       	in	r31, 0x3e	; 62
    13b6:	81 83       	std	Z+1, r24	; 0x01
    13b8:	92 83       	std	Z+2, r25	; 0x02
    13ba:	a3 83       	std	Z+3, r26	; 0x03
    13bc:	b4 83       	std	Z+4, r27	; 0x04
    13be:	8c e2       	ldi	r24, 0x2C	; 44
    13c0:	91 e0       	ldi	r25, 0x01	; 1
    13c2:	1d c0       	rjmp	.+58     	; 0x13fe <Update_Screen+0x1fa>
           
		   break;

       case 1 :	
  	           Button_CMD("HH",330,160,50,25,27,0,White,btset_color)                  ;  //Draw Button"HH" 
    13c4:	00 d0       	rcall	.+0      	; 0x13c6 <Update_Screen+0x1c2>
    13c6:	00 d0       	rcall	.+0      	; 0x13c8 <Update_Screen+0x1c4>
    13c8:	89 81       	ldd	r24, Y+1	; 0x01
    13ca:	9a 81       	ldd	r25, Y+2	; 0x02
    13cc:	ab 81       	ldd	r26, Y+3	; 0x03
    13ce:	bc 81       	ldd	r27, Y+4	; 0x04
    13d0:	ed b7       	in	r30, 0x3d	; 61
    13d2:	fe b7       	in	r31, 0x3e	; 62
    13d4:	81 83       	std	Z+1, r24	; 0x01
    13d6:	92 83       	std	Z+2, r25	; 0x02
    13d8:	a3 83       	std	Z+3, r26	; 0x03
    13da:	b4 83       	std	Z+4, r27	; 0x04
    13dc:	80 e3       	ldi	r24, 0x30	; 48
    13de:	91 e0       	ldi	r25, 0x01	; 1
    13e0:	0e c0       	rjmp	.+28     	; 0x13fe <Update_Screen+0x1fa>
           
		   break;

       case 2 :	
   	           Button_CMD("MM",330,160,50,25,27,0,White,btset_color)                  ;  //Draw Button"MM" 
    13e2:	00 d0       	rcall	.+0      	; 0x13e4 <Update_Screen+0x1e0>
    13e4:	00 d0       	rcall	.+0      	; 0x13e6 <Update_Screen+0x1e2>
    13e6:	89 81       	ldd	r24, Y+1	; 0x01
    13e8:	9a 81       	ldd	r25, Y+2	; 0x02
    13ea:	ab 81       	ldd	r26, Y+3	; 0x03
    13ec:	bc 81       	ldd	r27, Y+4	; 0x04
    13ee:	ed b7       	in	r30, 0x3d	; 61
    13f0:	fe b7       	in	r31, 0x3e	; 62
    13f2:	81 83       	std	Z+1, r24	; 0x01
    13f4:	92 83       	std	Z+2, r25	; 0x02
    13f6:	a3 83       	std	Z+3, r26	; 0x03
    13f8:	b4 83       	std	Z+4, r27	; 0x04
    13fa:	83 e3       	ldi	r24, 0x33	; 51
    13fc:	91 e0       	ldi	r25, 0x01	; 1
    13fe:	6a e4       	ldi	r22, 0x4A	; 74
    1400:	71 e0       	ldi	r23, 0x01	; 1
    1402:	40 ea       	ldi	r20, 0xA0	; 160
    1404:	50 e0       	ldi	r21, 0x00	; 0
    1406:	22 e3       	ldi	r18, 0x32	; 50
    1408:	30 e0       	ldi	r19, 0x00	; 0
    140a:	09 e1       	ldi	r16, 0x19	; 25
    140c:	10 e0       	ldi	r17, 0x00	; 0
    140e:	bb e1       	ldi	r27, 0x1B	; 27
    1410:	eb 2e       	mov	r14, r27
    1412:	f1 2c       	mov	r15, r1
    1414:	cc 24       	eor	r12, r12
    1416:	dd 24       	eor	r13, r13
    1418:	af ef       	ldi	r26, 0xFF	; 255
    141a:	8a 2e       	mov	r8, r26
    141c:	af ef       	ldi	r26, 0xFF	; 255
    141e:	9a 2e       	mov	r9, r26
    1420:	af ef       	ldi	r26, 0xFF	; 255
    1422:	aa 2e       	mov	r10, r26
    1424:	b1 2c       	mov	r11, r1
    1426:	0e 94 54 03 	call	0x6a8	; 0x6a8 <Button_CMD>
    142a:	0f 90       	pop	r0
    142c:	0f 90       	pop	r0
    142e:	0f 90       	pop	r0
    1430:	0f 90       	pop	r0


    //----------------- 3.End Display List and Update Execute -------------


	End_CMDList();
    1432:	0e 94 03 03 	call	0x606	; 0x606 <End_CMDList>



   }
    1436:	2c 96       	adiw	r28, 0x0c	; 12
    1438:	0f b6       	in	r0, 0x3f	; 63
    143a:	f8 94       	cli
    143c:	de bf       	out	0x3e, r29	; 62
    143e:	0f be       	out	0x3f, r0	; 63
    1440:	cd bf       	out	0x3d, r28	; 61
    1442:	cf 91       	pop	r28
    1444:	df 91       	pop	r29
    1446:	1f 91       	pop	r17
    1448:	0f 91       	pop	r16
    144a:	ff 90       	pop	r15
    144c:	ef 90       	pop	r14
    144e:	df 90       	pop	r13
    1450:	cf 90       	pop	r12
    1452:	bf 90       	pop	r11
    1454:	af 90       	pop	r10
    1456:	9f 90       	pop	r9
    1458:	8f 90       	pop	r8
    145a:	7f 90       	pop	r7
    145c:	6f 90       	pop	r6
    145e:	5f 90       	pop	r5
    1460:	4f 90       	pop	r4
    1462:	08 95       	ret

00001464 <User_App>:
  ++                                                                              ++
  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/


 void User_App(void)
  {
    1464:	2f 92       	push	r2
    1466:	3f 92       	push	r3
    1468:	4f 92       	push	r4
    146a:	5f 92       	push	r5
    146c:	6f 92       	push	r6
    146e:	7f 92       	push	r7
    1470:	8f 92       	push	r8
    1472:	9f 92       	push	r9
    1474:	af 92       	push	r10
    1476:	bf 92       	push	r11
    1478:	cf 92       	push	r12
    147a:	df 92       	push	r13
    147c:	ef 92       	push	r14
    147e:	ff 92       	push	r15
    1480:	0f 93       	push	r16
    1482:	1f 93       	push	r17
    1484:	df 93       	push	r29
    1486:	cf 93       	push	r28
    1488:	cd b7       	in	r28, 0x3d	; 61
    148a:	de b7       	in	r29, 0x3e	; 62
    148c:	ac 97       	sbiw	r28, 0x2c	; 44
    148e:	0f b6       	in	r0, 0x3f	; 63
    1490:	f8 94       	cli
    1492:	de bf       	out	0x3e, r29	; 62
    1494:	0f be       	out	0x3f, r0	; 63
    1496:	cd bf       	out	0x3d, r28	; 61
   signed int    tm = 0      ;
   unsigned char cb = 0      ;
   char fag_bt = 0           ;


   long bt_color[5] = {Blue,Red,Green,Magenta,Yellow}           ;   //Color Background Clock
    1498:	de 01       	movw	r26, r28
    149a:	11 96       	adiw	r26, 0x01	; 1
    149c:	ec e4       	ldi	r30, 0x4C	; 76
    149e:	f1 e0       	ldi	r31, 0x01	; 1
    14a0:	84 e1       	ldi	r24, 0x14	; 20
    14a2:	01 90       	ld	r0, Z+
    14a4:	0d 92       	st	X+, r0
    14a6:	81 50       	subi	r24, 0x01	; 1
    14a8:	e1 f7       	brne	.-8      	; 0x14a2 <User_App+0x3e>
   long tx_color[5] = {White,Black,NavyBlue,LimeGreen,Brown}    ;   //Color  Pin Clock
    14aa:	de 01       	movw	r26, r28
    14ac:	55 96       	adiw	r26, 0x15	; 21
    14ae:	e8 e3       	ldi	r30, 0x38	; 56
    14b0:	f1 e0       	ldi	r31, 0x01	; 1
    14b2:	84 e1       	ldi	r24, 0x14	; 20
    14b4:	01 90       	ld	r0, Z+
    14b6:	0d 92       	st	X+, r0
    14b8:	81 50       	subi	r24, 0x01	; 1
    14ba:	e1 f7       	brne	.-8      	; 0x14b4 <User_App+0x50>
   
   
   Update_Screen(MediumBlue,tx_color[cb],bt_color[cb],Red,Red)  ;
    14bc:	00 d0       	rcall	.+0      	; 0x14be <User_App+0x5a>
    14be:	00 d0       	rcall	.+0      	; 0x14c0 <User_App+0x5c>
    14c0:	2d 89       	ldd	r18, Y+21	; 0x15
    14c2:	3e 89       	ldd	r19, Y+22	; 0x16
    14c4:	4f 89       	ldd	r20, Y+23	; 0x17
    14c6:	58 8d       	ldd	r21, Y+24	; 0x18
    14c8:	e9 80       	ldd	r14, Y+1	; 0x01
    14ca:	fa 80       	ldd	r15, Y+2	; 0x02
    14cc:	0b 81       	ldd	r16, Y+3	; 0x03
    14ce:	1c 81       	ldd	r17, Y+4	; 0x04
    14d0:	80 e0       	ldi	r24, 0x00	; 0
    14d2:	90 e0       	ldi	r25, 0x00	; 0
    14d4:	af ef       	ldi	r26, 0xFF	; 255
    14d6:	b0 e0       	ldi	r27, 0x00	; 0
    14d8:	ed b7       	in	r30, 0x3d	; 61
    14da:	fe b7       	in	r31, 0x3e	; 62
    14dc:	81 83       	std	Z+1, r24	; 0x01
    14de:	92 83       	std	Z+2, r25	; 0x02
    14e0:	a3 83       	std	Z+3, r26	; 0x03
    14e2:	b4 83       	std	Z+4, r27	; 0x04
    14e4:	6d ec       	ldi	r22, 0xCD	; 205
    14e6:	70 e0       	ldi	r23, 0x00	; 0
    14e8:	80 e0       	ldi	r24, 0x00	; 0
    14ea:	90 e0       	ldi	r25, 0x00	; 0
    14ec:	a1 2c       	mov	r10, r1
    14ee:	b1 2c       	mov	r11, r1
    14f0:	ef ef       	ldi	r30, 0xFF	; 255
    14f2:	ce 2e       	mov	r12, r30
    14f4:	d1 2c       	mov	r13, r1
    14f6:	0e 94 02 09 	call	0x1204	; 0x1204 <Update_Screen>
    14fa:	1c a6       	std	Y+44, r1	; 0x2c
    14fc:	1b a6       	std	Y+43, r1	; 0x2b
    14fe:	1a a6       	std	Y+42, r1	; 0x2a
    1500:	19 a6       	std	Y+41, r1	; 0x29
    1502:	0f 90       	pop	r0
    1504:	0f 90       	pop	r0
    1506:	0f 90       	pop	r0
    1508:	0f 90       	pop	r0
   while(1)
    { 

     //-------- Check Statust Touch Screen ---------
	 	  
     if(Touch_Detect())                       //if Touch =1 
    150a:	0e 94 50 02 	call	0x4a0	; 0x4a0 <Touch_Detect>
    150e:	88 23       	and	r24, r24
    1510:	11 f4       	brne	.+4      	; 0x1516 <User_App+0xb2>
    1512:	19 a6       	std	Y+41, r1	; 0x29
    1514:	06 c2       	rjmp	.+1036   	; 0x1922 <User_App+0x4be>
      {
        Touch_Read_XY()                  ;    //Read Position Touch Screen XY
    1516:	0e 94 5d 02 	call	0x4ba	; 0x4ba <Touch_Read_XY>

        //------Check Button"Color,Set"------//

           //X-Touch Button "Color,Set"

	    if((tc_x>330) & (tc_x <380))          //Check Position Touch X-axis for Button"Color,Set"
    151a:	80 91 6f 01 	lds	r24, 0x016F
    151e:	90 91 70 01 	lds	r25, 0x0170
    1522:	8b 54       	subi	r24, 0x4B	; 75
    1524:	91 40       	sbci	r25, 0x01	; 1
    1526:	c1 97       	sbiw	r24, 0x31	; 49
    1528:	08 f0       	brcs	.+2      	; 0x152c <User_App+0xc8>
    152a:	be c0       	rjmp	.+380    	; 0x16a8 <User_App+0x244>
         { 
		    //Y-Touch Button"Color"//
           if((tc_y>100)&(tc_y<125))          //Check Position Touch Y-axis for  Button"Color"
    152c:	80 91 71 01 	lds	r24, 0x0171
    1530:	90 91 72 01 	lds	r25, 0x0172
    1534:	85 56       	subi	r24, 0x65	; 101
    1536:	90 40       	sbci	r25, 0x00	; 0
    1538:	48 97       	sbiw	r24, 0x18	; 24
    153a:	08 f0       	brcs	.+2      	; 0x153e <User_App+0xda>
    153c:	45 c0       	rjmp	.+138    	; 0x15c8 <User_App+0x164>
		    {
			  if(fag_bt == 0)                  
    153e:	f9 a5       	ldd	r31, Y+41	; 0x29
    1540:	ff 23       	and	r31, r31
    1542:	19 f0       	breq	.+6      	; 0x154a <User_App+0xe6>
    1544:	21 e0       	ldi	r18, 0x01	; 1
    1546:	29 a7       	std	Y+41, r18	; 0x29
    1548:	3f c0       	rjmp	.+126    	; 0x15c8 <User_App+0x164>
			    { 
			      cb = cb+1                 ;   //Increment Pointer array for color
    154a:	8a a5       	ldd	r24, Y+42	; 0x2a
    154c:	8f 5f       	subi	r24, 0xFF	; 255
    154e:	8a a7       	std	Y+42, r24	; 0x2a

			      if(cb == 5)
    1550:	85 30       	cpi	r24, 0x05	; 5
    1552:	09 f4       	brne	.+2      	; 0x1556 <User_App+0xf2>
    1554:	1a a6       	std	Y+42, r1	; 0x2a
				     cb = 0                 ;   
				  
			      Sound_Effect(100,C7,Switch) ; //Set Sound Press Button
    1556:	84 e6       	ldi	r24, 0x64	; 100
    1558:	60 e6       	ldi	r22, 0x60	; 96
    155a:	70 e0       	ldi	r23, 0x00	; 0
    155c:	41 e5       	ldi	r20, 0x51	; 81
    155e:	50 e0       	ldi	r21, 0x00	; 0
    1560:	0e 94 71 02 	call	0x4e2	; 0x4e2 <Sound_Effect>
			
			      Update_Screen(MediumBlue,tx_color[cb],bt_color[cb],Red,Red)  ;
    1564:	9a a5       	ldd	r25, Y+42	; 0x2a
    1566:	e9 2f       	mov	r30, r25
    1568:	f0 e0       	ldi	r31, 0x00	; 0
    156a:	00 d0       	rcall	.+0      	; 0x156c <User_App+0x108>
    156c:	00 d0       	rcall	.+0      	; 0x156e <User_App+0x10a>
    156e:	ee 0f       	add	r30, r30
    1570:	ff 1f       	adc	r31, r31
    1572:	ee 0f       	add	r30, r30
    1574:	ff 1f       	adc	r31, r31
    1576:	a1 e0       	ldi	r26, 0x01	; 1
    1578:	b0 e0       	ldi	r27, 0x00	; 0
    157a:	ac 0f       	add	r26, r28
    157c:	bd 1f       	adc	r27, r29
    157e:	ea 0f       	add	r30, r26
    1580:	fb 1f       	adc	r31, r27
    1582:	24 89       	ldd	r18, Z+20	; 0x14
    1584:	35 89       	ldd	r19, Z+21	; 0x15
    1586:	46 89       	ldd	r20, Z+22	; 0x16
    1588:	57 89       	ldd	r21, Z+23	; 0x17
    158a:	e0 80       	ld	r14, Z
    158c:	f1 80       	ldd	r15, Z+1	; 0x01
    158e:	02 81       	ldd	r16, Z+2	; 0x02
    1590:	13 81       	ldd	r17, Z+3	; 0x03
    1592:	80 e0       	ldi	r24, 0x00	; 0
    1594:	90 e0       	ldi	r25, 0x00	; 0
    1596:	af ef       	ldi	r26, 0xFF	; 255
    1598:	b0 e0       	ldi	r27, 0x00	; 0
    159a:	ed b7       	in	r30, 0x3d	; 61
    159c:	fe b7       	in	r31, 0x3e	; 62
    159e:	81 83       	std	Z+1, r24	; 0x01
    15a0:	92 83       	std	Z+2, r25	; 0x02
    15a2:	a3 83       	std	Z+3, r26	; 0x03
    15a4:	b4 83       	std	Z+4, r27	; 0x04
    15a6:	6d ec       	ldi	r22, 0xCD	; 205
    15a8:	70 e0       	ldi	r23, 0x00	; 0
    15aa:	80 e0       	ldi	r24, 0x00	; 0
    15ac:	90 e0       	ldi	r25, 0x00	; 0
    15ae:	a1 2c       	mov	r10, r1
    15b0:	b1 2c       	mov	r11, r1
    15b2:	bf ef       	ldi	r27, 0xFF	; 255
    15b4:	cb 2e       	mov	r12, r27
    15b6:	d1 2c       	mov	r13, r1
    15b8:	0e 94 02 09 	call	0x1204	; 0x1204 <Update_Screen>
    15bc:	f1 e0       	ldi	r31, 0x01	; 1
    15be:	f9 a7       	std	Y+41, r31	; 0x29
    15c0:	0f 90       	pop	r0
    15c2:	0f 90       	pop	r0
    15c4:	0f 90       	pop	r0
    15c6:	0f 90       	pop	r0

			} 

             //Y-Touch Button"Set"//

           if((tc_y>160)&(tc_y<185))           //Check Position Touch Y-axis for Button"Color"
    15c8:	80 91 71 01 	lds	r24, 0x0171
    15cc:	90 91 72 01 	lds	r25, 0x0172
    15d0:	81 5a       	subi	r24, 0xA1	; 161
    15d2:	90 40       	sbci	r25, 0x00	; 0
    15d4:	48 97       	sbiw	r24, 0x18	; 24
    15d6:	08 f0       	brcs	.+2      	; 0x15da <User_App+0x176>
    15d8:	67 c0       	rjmp	.+206    	; 0x16a8 <User_App+0x244>
		    {
                 mode = mode+1             ;   //Chang Text on Button Set
    15da:	80 91 6c 01 	lds	r24, 0x016C
    15de:	8f 5f       	subi	r24, 0xFF	; 255
    15e0:	80 93 6c 01 	sts	0x016C, r24
			     if(mode ==3)
    15e4:	83 30       	cpi	r24, 0x03	; 3
    15e6:	11 f4       	brne	.+4      	; 0x15ec <User_App+0x188>
			       mode=0                  ;
    15e8:	10 92 6c 01 	sts	0x016C, r1
			  
			     Sound_Effect(100,C7,Switch) ; //Set Sound Press Button
    15ec:	84 e6       	ldi	r24, 0x64	; 100
    15ee:	60 e6       	ldi	r22, 0x60	; 96
    15f0:	70 e0       	ldi	r23, 0x00	; 0
    15f2:	41 e5       	ldi	r20, 0x51	; 81
    15f4:	50 e0       	ldi	r21, 0x00	; 0
    15f6:	0e 94 71 02 	call	0x4e2	; 0x4e2 <Sound_Effect>
            
			     Update_Screen(LightBlue,tx_color[cb],bt_color[cb],Red,Red)  ; 
    15fa:	2a a5       	ldd	r18, Y+42	; 0x2a
    15fc:	e2 2f       	mov	r30, r18
    15fe:	f0 e0       	ldi	r31, 0x00	; 0
    1600:	ee 0f       	add	r30, r30
    1602:	ff 1f       	adc	r31, r31
    1604:	ee 0f       	add	r30, r30
    1606:	ff 1f       	adc	r31, r31
    1608:	81 e0       	ldi	r24, 0x01	; 1
    160a:	90 e0       	ldi	r25, 0x00	; 0
    160c:	8c 0f       	add	r24, r28
    160e:	9d 1f       	adc	r25, r29
    1610:	e8 0f       	add	r30, r24
    1612:	f9 1f       	adc	r31, r25
    1614:	24 88       	ldd	r2, Z+20	; 0x14
    1616:	35 88       	ldd	r3, Z+21	; 0x15
    1618:	46 88       	ldd	r4, Z+22	; 0x16
    161a:	57 88       	ldd	r5, Z+23	; 0x17
    161c:	60 80       	ld	r6, Z
    161e:	71 80       	ldd	r7, Z+1	; 0x01
    1620:	82 80       	ldd	r8, Z+2	; 0x02
    1622:	93 80       	ldd	r9, Z+3	; 0x03
    1624:	00 d0       	rcall	.+0      	; 0x1626 <User_App+0x1c2>
    1626:	00 d0       	rcall	.+0      	; 0x1628 <User_App+0x1c4>
    1628:	80 e0       	ldi	r24, 0x00	; 0
    162a:	90 e0       	ldi	r25, 0x00	; 0
    162c:	af ef       	ldi	r26, 0xFF	; 255
    162e:	b0 e0       	ldi	r27, 0x00	; 0
    1630:	ed b7       	in	r30, 0x3d	; 61
    1632:	fe b7       	in	r31, 0x3e	; 62
    1634:	81 83       	std	Z+1, r24	; 0x01
    1636:	92 83       	std	Z+2, r25	; 0x02
    1638:	a3 83       	std	Z+3, r26	; 0x03
    163a:	b4 83       	std	Z+4, r27	; 0x04
    163c:	66 ee       	ldi	r22, 0xE6	; 230
    163e:	78 ed       	ldi	r23, 0xD8	; 216
    1640:	8d ea       	ldi	r24, 0xAD	; 173
    1642:	90 e0       	ldi	r25, 0x00	; 0
    1644:	a2 01       	movw	r20, r4
    1646:	91 01       	movw	r18, r2
    1648:	84 01       	movw	r16, r8
    164a:	73 01       	movw	r14, r6
    164c:	a1 2c       	mov	r10, r1
    164e:	b1 2c       	mov	r11, r1
    1650:	ef ef       	ldi	r30, 0xFF	; 255
    1652:	ce 2e       	mov	r12, r30
    1654:	d1 2c       	mov	r13, r1
    1656:	0e 94 02 09 	call	0x1204	; 0x1204 <Update_Screen>
    165a:	0f 90       	pop	r0
    165c:	0f 90       	pop	r0
    165e:	0f 90       	pop	r0
    1660:	0f 90       	pop	r0

				 while(Touch_Detect()){;}   ;  // Wait Release Button "+"
    1662:	0e 94 50 02 	call	0x4a0	; 0x4a0 <Touch_Detect>
    1666:	88 23       	and	r24, r24
    1668:	e1 f7       	brne	.-8      	; 0x1662 <User_App+0x1fe>

			     Update_Screen(MediumBlue,tx_color[cb],bt_color[cb],Red,Red) ;  //Return Color Button "SET-->HH-->MM"
    166a:	00 d0       	rcall	.+0      	; 0x166c <User_App+0x208>
    166c:	00 d0       	rcall	.+0      	; 0x166e <User_App+0x20a>
    166e:	80 e0       	ldi	r24, 0x00	; 0
    1670:	90 e0       	ldi	r25, 0x00	; 0
    1672:	af ef       	ldi	r26, 0xFF	; 255
    1674:	b0 e0       	ldi	r27, 0x00	; 0
    1676:	ed b7       	in	r30, 0x3d	; 61
    1678:	fe b7       	in	r31, 0x3e	; 62
    167a:	81 83       	std	Z+1, r24	; 0x01
    167c:	92 83       	std	Z+2, r25	; 0x02
    167e:	a3 83       	std	Z+3, r26	; 0x03
    1680:	b4 83       	std	Z+4, r27	; 0x04
    1682:	6d ec       	ldi	r22, 0xCD	; 205
    1684:	70 e0       	ldi	r23, 0x00	; 0
    1686:	80 e0       	ldi	r24, 0x00	; 0
    1688:	90 e0       	ldi	r25, 0x00	; 0
    168a:	a2 01       	movw	r20, r4
    168c:	91 01       	movw	r18, r2
    168e:	84 01       	movw	r16, r8
    1690:	73 01       	movw	r14, r6
    1692:	a1 2c       	mov	r10, r1
    1694:	b1 2c       	mov	r11, r1
    1696:	bf ef       	ldi	r27, 0xFF	; 255
    1698:	cb 2e       	mov	r12, r27
    169a:	d1 2c       	mov	r13, r1
    169c:	0e 94 02 09 	call	0x1204	; 0x1204 <Update_Screen>
    16a0:	0f 90       	pop	r0
    16a2:	0f 90       	pop	r0
    16a4:	0f 90       	pop	r0
    16a6:	0f 90       	pop	r0
         //-------- Check Button "-,+"---------//
		   
		   //Y-Touch Button"-,+"


        if(mode >0) //Enable button "+,-"
    16a8:	20 91 6c 01 	lds	r18, 0x016C
    16ac:	22 23       	and	r18, r18
    16ae:	09 f4       	brne	.+2      	; 0x16b2 <User_App+0x24e>
    16b0:	38 c1       	rjmp	.+624    	; 0x1922 <User_App+0x4be>
	     {

	      if((tc_y>130) & (tc_y <155))         //Check Position Touch Y-axis for Button"-,+"
    16b2:	80 91 71 01 	lds	r24, 0x0171
    16b6:	90 91 72 01 	lds	r25, 0x0172
    16ba:	83 58       	subi	r24, 0x83	; 131
    16bc:	90 40       	sbci	r25, 0x00	; 0
    16be:	48 97       	sbiw	r24, 0x18	; 24
    16c0:	08 f0       	brcs	.+2      	; 0x16c4 <User_App+0x260>
    16c2:	2f c1       	rjmp	.+606    	; 0x1922 <User_App+0x4be>
           { 
		     //X-Touch Button"-"//

             if((tc_x>280)&(tc_x<305))         //Check Position Touch X-axis for Button"-"
    16c4:	80 91 6f 01 	lds	r24, 0x016F
    16c8:	90 91 70 01 	lds	r25, 0x0170
    16cc:	89 51       	subi	r24, 0x19	; 25
    16ce:	91 40       	sbci	r25, 0x01	; 1
    16d0:	48 97       	sbiw	r24, 0x18	; 24
    16d2:	08 f0       	brcs	.+2      	; 0x16d6 <User_App+0x272>
    16d4:	85 c0       	rjmp	.+266    	; 0x17e0 <User_App+0x37c>
		      {
			      if(mode==1)                  //Set Down-- Hour :12-1
    16d6:	21 30       	cpi	r18, 0x01	; 1
    16d8:	a1 f0       	breq	.+40     	; 0x1702 <User_App+0x29e>

				     if(hh==0)                 //Check Hour if=0 give hh=12
				       hh=12         ;           
				   }

			      if(mode==2)                  //Set Down-- Minute :59-0
    16da:	22 30       	cpi	r18, 0x02	; 2
    16dc:	19 f5       	brne	.+70     	; 0x1724 <User_App+0x2c0>
			       {
                     mm = mm-1       ;         //Set Decrease minute step 1 minute 
    16de:	80 91 68 01 	lds	r24, 0x0168
    16e2:	90 91 69 01 	lds	r25, 0x0169
    16e6:	01 97       	sbiw	r24, 0x01	; 1
    16e8:	90 93 69 01 	sts	0x0169, r25
    16ec:	80 93 68 01 	sts	0x0168, r24

				     if(mm == -1)              //Check minute if= -1 give mm= 59
    16f0:	8f 5f       	subi	r24, 0xFF	; 255
    16f2:	9f 4f       	sbci	r25, 0xFF	; 255
    16f4:	b9 f4       	brne	.+46     	; 0x1724 <User_App+0x2c0>
				      {
				        mm = 59      ;
    16f6:	eb e3       	ldi	r30, 0x3B	; 59
    16f8:	f0 e0       	ldi	r31, 0x00	; 0
    16fa:	f0 93 69 01 	sts	0x0169, r31
    16fe:	e0 93 68 01 	sts	0x0168, r30
                   
				        hh = hh-1    ;
    1702:	80 91 36 01 	lds	r24, 0x0136
    1706:	90 91 37 01 	lds	r25, 0x0137
    170a:	01 97       	sbiw	r24, 0x01	; 1
    170c:	90 93 37 01 	sts	0x0137, r25
    1710:	80 93 36 01 	sts	0x0136, r24
				        if(hh==0)               //Check Hour if=0 give hh=12
    1714:	89 2b       	or	r24, r25
    1716:	31 f4       	brne	.+12     	; 0x1724 <User_App+0x2c0>
				          hh=12      ;       
    1718:	8c e0       	ldi	r24, 0x0C	; 12
    171a:	90 e0       	ldi	r25, 0x00	; 0
    171c:	90 93 37 01 	sts	0x0137, r25
    1720:	80 93 36 01 	sts	0x0136, r24
				      }
				    }

                  Sound_Effect(100,C7,Switch) ; //Set Sound Press Button
    1724:	84 e6       	ldi	r24, 0x64	; 100
    1726:	60 e6       	ldi	r22, 0x60	; 96
    1728:	70 e0       	ldi	r23, 0x00	; 0
    172a:	41 e5       	ldi	r20, 0x51	; 81
    172c:	50 e0       	ldi	r21, 0x00	; 0
    172e:	0e 94 71 02 	call	0x4e2	; 0x4e2 <Sound_Effect>
			      Update_Screen(MediumBlue,tx_color[cb],bt_color[cb],Red,MistyRose)  ;
    1732:	9a a5       	ldd	r25, Y+42	; 0x2a
    1734:	e9 2f       	mov	r30, r25
    1736:	f0 e0       	ldi	r31, 0x00	; 0
    1738:	ee 0f       	add	r30, r30
    173a:	ff 1f       	adc	r31, r31
    173c:	ee 0f       	add	r30, r30
    173e:	ff 1f       	adc	r31, r31
    1740:	a1 e0       	ldi	r26, 0x01	; 1
    1742:	b0 e0       	ldi	r27, 0x00	; 0
    1744:	ac 0f       	add	r26, r28
    1746:	bd 1f       	adc	r27, r29
    1748:	ea 0f       	add	r30, r26
    174a:	fb 1f       	adc	r31, r27
    174c:	24 88       	ldd	r2, Z+20	; 0x14
    174e:	35 88       	ldd	r3, Z+21	; 0x15
    1750:	46 88       	ldd	r4, Z+22	; 0x16
    1752:	57 88       	ldd	r5, Z+23	; 0x17
    1754:	60 80       	ld	r6, Z
    1756:	71 80       	ldd	r7, Z+1	; 0x01
    1758:	82 80       	ldd	r8, Z+2	; 0x02
    175a:	93 80       	ldd	r9, Z+3	; 0x03
    175c:	00 d0       	rcall	.+0      	; 0x175e <User_App+0x2fa>
    175e:	00 d0       	rcall	.+0      	; 0x1760 <User_App+0x2fc>
    1760:	81 ee       	ldi	r24, 0xE1	; 225
    1762:	94 ee       	ldi	r25, 0xE4	; 228
    1764:	af ef       	ldi	r26, 0xFF	; 255
    1766:	b0 e0       	ldi	r27, 0x00	; 0
    1768:	ed b7       	in	r30, 0x3d	; 61
    176a:	fe b7       	in	r31, 0x3e	; 62
    176c:	81 83       	std	Z+1, r24	; 0x01
    176e:	92 83       	std	Z+2, r25	; 0x02
    1770:	a3 83       	std	Z+3, r26	; 0x03
    1772:	b4 83       	std	Z+4, r27	; 0x04
    1774:	6d ec       	ldi	r22, 0xCD	; 205
    1776:	70 e0       	ldi	r23, 0x00	; 0
    1778:	80 e0       	ldi	r24, 0x00	; 0
    177a:	90 e0       	ldi	r25, 0x00	; 0
    177c:	a2 01       	movw	r20, r4
    177e:	91 01       	movw	r18, r2
    1780:	84 01       	movw	r16, r8
    1782:	73 01       	movw	r14, r6
    1784:	a1 2c       	mov	r10, r1
    1786:	b1 2c       	mov	r11, r1
    1788:	ef ef       	ldi	r30, 0xFF	; 255
    178a:	ce 2e       	mov	r12, r30
    178c:	d1 2c       	mov	r13, r1
    178e:	0e 94 02 09 	call	0x1204	; 0x1204 <Update_Screen>
    1792:	0f 90       	pop	r0
    1794:	0f 90       	pop	r0
    1796:	0f 90       	pop	r0
    1798:	0f 90       	pop	r0

				  while(Touch_Detect()){;}    ;  // Wait Release Button "+"
    179a:	0e 94 50 02 	call	0x4a0	; 0x4a0 <Touch_Detect>
    179e:	88 23       	and	r24, r24
    17a0:	e1 f7       	brne	.-8      	; 0x179a <User_App+0x336>

			      Update_Screen(MediumBlue,tx_color[cb],bt_color[cb],Red,Red)  ;     //Return Color Button "-"
    17a2:	00 d0       	rcall	.+0      	; 0x17a4 <User_App+0x340>
    17a4:	00 d0       	rcall	.+0      	; 0x17a6 <User_App+0x342>
    17a6:	80 e0       	ldi	r24, 0x00	; 0
    17a8:	90 e0       	ldi	r25, 0x00	; 0
    17aa:	af ef       	ldi	r26, 0xFF	; 255
    17ac:	b0 e0       	ldi	r27, 0x00	; 0
    17ae:	ed b7       	in	r30, 0x3d	; 61
    17b0:	fe b7       	in	r31, 0x3e	; 62
    17b2:	81 83       	std	Z+1, r24	; 0x01
    17b4:	92 83       	std	Z+2, r25	; 0x02
    17b6:	a3 83       	std	Z+3, r26	; 0x03
    17b8:	b4 83       	std	Z+4, r27	; 0x04
    17ba:	6d ec       	ldi	r22, 0xCD	; 205
    17bc:	70 e0       	ldi	r23, 0x00	; 0
    17be:	80 e0       	ldi	r24, 0x00	; 0
    17c0:	90 e0       	ldi	r25, 0x00	; 0
    17c2:	a2 01       	movw	r20, r4
    17c4:	91 01       	movw	r18, r2
    17c6:	84 01       	movw	r16, r8
    17c8:	73 01       	movw	r14, r6
    17ca:	a1 2c       	mov	r10, r1
    17cc:	b1 2c       	mov	r11, r1
    17ce:	bf ef       	ldi	r27, 0xFF	; 255
    17d0:	cb 2e       	mov	r12, r27
    17d2:	d1 2c       	mov	r13, r1
    17d4:	0e 94 02 09 	call	0x1204	; 0x1204 <Update_Screen>
    17d8:	0f 90       	pop	r0
    17da:	0f 90       	pop	r0
    17dc:	0f 90       	pop	r0
    17de:	0f 90       	pop	r0

		 	   } //if tc_x

               //X-Touch Button"+"//

              if((tc_x>405)&(tc_x<430))          //Check Position Touch X-axis for Button"+"
    17e0:	80 91 6f 01 	lds	r24, 0x016F
    17e4:	90 91 70 01 	lds	r25, 0x0170
    17e8:	86 59       	subi	r24, 0x96	; 150
    17ea:	91 40       	sbci	r25, 0x01	; 1
    17ec:	48 97       	sbiw	r24, 0x18	; 24
    17ee:	08 f0       	brcs	.+2      	; 0x17f2 <User_App+0x38e>
    17f0:	98 c0       	rjmp	.+304    	; 0x1922 <User_App+0x4be>
		       {
			       if(mode==1)                   //Set Up++ Hour :1-12
    17f2:	80 91 6c 01 	lds	r24, 0x016C
    17f6:	81 30       	cpi	r24, 0x01	; 1
    17f8:	91 f4       	brne	.+36     	; 0x181e <User_App+0x3ba>
			        {
				      hh = hh+1               ;  //Set Increase Hour step 1 hour 
    17fa:	80 91 36 01 	lds	r24, 0x0136
    17fe:	90 91 37 01 	lds	r25, 0x0137
    1802:	01 96       	adiw	r24, 0x01	; 1
    1804:	90 93 37 01 	sts	0x0137, r25
    1808:	80 93 36 01 	sts	0x0136, r24
 
				      if(hh==13)                 //Check Hour if=13 give hh=1
    180c:	0d 97       	sbiw	r24, 0x0d	; 13
    180e:	49 f5       	brne	.+82     	; 0x1862 <User_App+0x3fe>
				        hh = 1                ;
    1810:	81 e0       	ldi	r24, 0x01	; 1
    1812:	90 e0       	ldi	r25, 0x00	; 0
    1814:	90 93 37 01 	sts	0x0137, r25
    1818:	80 93 36 01 	sts	0x0136, r24
    181c:	22 c0       	rjmp	.+68     	; 0x1862 <User_App+0x3fe>
				
			        }
			       if(mode==2)                   //Set Up++ Minute :0-59
    181e:	82 30       	cpi	r24, 0x02	; 2
    1820:	01 f5       	brne	.+64     	; 0x1862 <User_App+0x3fe>
			        {
                      mm = mm+1               ;  //Set Increase Minute step 1 minute 
    1822:	80 91 68 01 	lds	r24, 0x0168
    1826:	90 91 69 01 	lds	r25, 0x0169
    182a:	01 96       	adiw	r24, 0x01	; 1
    182c:	90 93 69 01 	sts	0x0169, r25
    1830:	80 93 68 01 	sts	0x0168, r24

				      if(mm==60)                 //Check Minute if=60 give minute=0
    1834:	cc 97       	sbiw	r24, 0x3c	; 60
    1836:	a9 f4       	brne	.+42     	; 0x1862 <User_App+0x3fe>
				       {
				         mm = 0               ;
    1838:	10 92 69 01 	sts	0x0169, r1
    183c:	10 92 68 01 	sts	0x0168, r1

                         hh = hh+1            ;
    1840:	80 91 36 01 	lds	r24, 0x0136
    1844:	90 91 37 01 	lds	r25, 0x0137
    1848:	01 96       	adiw	r24, 0x01	; 1
    184a:	90 93 37 01 	sts	0x0137, r25
    184e:	80 93 36 01 	sts	0x0136, r24
				         if(hh==13)               //Check Hour if=13 give hh=1
    1852:	0d 97       	sbiw	r24, 0x0d	; 13
    1854:	31 f4       	brne	.+12     	; 0x1862 <User_App+0x3fe>
				           hh = 1             ;	   
    1856:	a1 e0       	ldi	r26, 0x01	; 1
    1858:	b0 e0       	ldi	r27, 0x00	; 0
    185a:	b0 93 37 01 	sts	0x0137, r27
    185e:	a0 93 36 01 	sts	0x0136, r26
				       }  
			         }

                    Sound_Effect(100,C7,Switch);  //Set Sound Press Button
    1862:	84 e6       	ldi	r24, 0x64	; 100
    1864:	60 e6       	ldi	r22, 0x60	; 96
    1866:	70 e0       	ldi	r23, 0x00	; 0
    1868:	41 e5       	ldi	r20, 0x51	; 81
    186a:	50 e0       	ldi	r21, 0x00	; 0
    186c:	0e 94 71 02 	call	0x4e2	; 0x4e2 <Sound_Effect>
			        Update_Screen(MediumBlue,tx_color[cb],bt_color[cb],MistyRose,Red)  ;
    1870:	ba a5       	ldd	r27, Y+42	; 0x2a
    1872:	eb 2f       	mov	r30, r27
    1874:	f0 e0       	ldi	r31, 0x00	; 0
    1876:	ee 0f       	add	r30, r30
    1878:	ff 1f       	adc	r31, r31
    187a:	ee 0f       	add	r30, r30
    187c:	ff 1f       	adc	r31, r31
    187e:	81 e0       	ldi	r24, 0x01	; 1
    1880:	90 e0       	ldi	r25, 0x00	; 0
    1882:	8c 0f       	add	r24, r28
    1884:	9d 1f       	adc	r25, r29
    1886:	e8 0f       	add	r30, r24
    1888:	f9 1f       	adc	r31, r25
    188a:	24 88       	ldd	r2, Z+20	; 0x14
    188c:	35 88       	ldd	r3, Z+21	; 0x15
    188e:	46 88       	ldd	r4, Z+22	; 0x16
    1890:	57 88       	ldd	r5, Z+23	; 0x17
    1892:	60 80       	ld	r6, Z
    1894:	71 80       	ldd	r7, Z+1	; 0x01
    1896:	82 80       	ldd	r8, Z+2	; 0x02
    1898:	93 80       	ldd	r9, Z+3	; 0x03
    189a:	00 d0       	rcall	.+0      	; 0x189c <User_App+0x438>
    189c:	00 d0       	rcall	.+0      	; 0x189e <User_App+0x43a>
    189e:	80 e0       	ldi	r24, 0x00	; 0
    18a0:	90 e0       	ldi	r25, 0x00	; 0
    18a2:	af ef       	ldi	r26, 0xFF	; 255
    18a4:	b0 e0       	ldi	r27, 0x00	; 0
    18a6:	ed b7       	in	r30, 0x3d	; 61
    18a8:	fe b7       	in	r31, 0x3e	; 62
    18aa:	81 83       	std	Z+1, r24	; 0x01
    18ac:	92 83       	std	Z+2, r25	; 0x02
    18ae:	a3 83       	std	Z+3, r26	; 0x03
    18b0:	b4 83       	std	Z+4, r27	; 0x04
    18b2:	6d ec       	ldi	r22, 0xCD	; 205
    18b4:	70 e0       	ldi	r23, 0x00	; 0
    18b6:	80 e0       	ldi	r24, 0x00	; 0
    18b8:	90 e0       	ldi	r25, 0x00	; 0
    18ba:	a2 01       	movw	r20, r4
    18bc:	91 01       	movw	r18, r2
    18be:	84 01       	movw	r16, r8
    18c0:	73 01       	movw	r14, r6
    18c2:	e1 ee       	ldi	r30, 0xE1	; 225
    18c4:	ae 2e       	mov	r10, r30
    18c6:	e4 ee       	ldi	r30, 0xE4	; 228
    18c8:	be 2e       	mov	r11, r30
    18ca:	ef ef       	ldi	r30, 0xFF	; 255
    18cc:	ce 2e       	mov	r12, r30
    18ce:	d1 2c       	mov	r13, r1
    18d0:	0e 94 02 09 	call	0x1204	; 0x1204 <Update_Screen>
    18d4:	0f 90       	pop	r0
    18d6:	0f 90       	pop	r0
    18d8:	0f 90       	pop	r0
    18da:	0f 90       	pop	r0

				    while(Touch_Detect()){;}   ;  // Wait Release Button "+"
    18dc:	0e 94 50 02 	call	0x4a0	; 0x4a0 <Touch_Detect>
    18e0:	88 23       	and	r24, r24
    18e2:	e1 f7       	brne	.-8      	; 0x18dc <User_App+0x478>
		   
			        Update_Screen(MediumBlue,tx_color[cb],bt_color[cb],Red,Red)  ;   //Return Color Button "+"
    18e4:	00 d0       	rcall	.+0      	; 0x18e6 <User_App+0x482>
    18e6:	00 d0       	rcall	.+0      	; 0x18e8 <User_App+0x484>
    18e8:	80 e0       	ldi	r24, 0x00	; 0
    18ea:	90 e0       	ldi	r25, 0x00	; 0
    18ec:	af ef       	ldi	r26, 0xFF	; 255
    18ee:	b0 e0       	ldi	r27, 0x00	; 0
    18f0:	ed b7       	in	r30, 0x3d	; 61
    18f2:	fe b7       	in	r31, 0x3e	; 62
    18f4:	81 83       	std	Z+1, r24	; 0x01
    18f6:	92 83       	std	Z+2, r25	; 0x02
    18f8:	a3 83       	std	Z+3, r26	; 0x03
    18fa:	b4 83       	std	Z+4, r27	; 0x04
    18fc:	6d ec       	ldi	r22, 0xCD	; 205
    18fe:	70 e0       	ldi	r23, 0x00	; 0
    1900:	80 e0       	ldi	r24, 0x00	; 0
    1902:	90 e0       	ldi	r25, 0x00	; 0
    1904:	a2 01       	movw	r20, r4
    1906:	91 01       	movw	r18, r2
    1908:	84 01       	movw	r16, r8
    190a:	73 01       	movw	r14, r6
    190c:	a1 2c       	mov	r10, r1
    190e:	b1 2c       	mov	r11, r1
    1910:	bf ef       	ldi	r27, 0xFF	; 255
    1912:	cb 2e       	mov	r12, r27
    1914:	d1 2c       	mov	r13, r1
    1916:	0e 94 02 09 	call	0x1204	; 0x1204 <Update_Screen>
    191a:	0f 90       	pop	r0
    191c:	0f 90       	pop	r0
    191e:	0f 90       	pop	r0
    1920:	0f 90       	pop	r0


     
    //-----------------  Update Time  --------------

    if(mode==0)                          //Update Time When Button = Set
    1922:	80 91 6c 01 	lds	r24, 0x016C
    1926:	88 23       	and	r24, r24
    1928:	09 f0       	breq	.+2      	; 0x192c <User_App+0x4c8>
    192a:	ef cd       	rjmp	.-1058   	; 0x150a <User_App+0xa6>
    192c:	8a e0       	ldi	r24, 0x0A	; 10
    192e:	90 e0       	ldi	r25, 0x00	; 0
    1930:	e0 ea       	ldi	r30, 0xA0	; 160
    1932:	ff e0       	ldi	r31, 0x0F	; 15
    1934:	31 97       	sbiw	r30, 0x01	; 1
    1936:	f1 f7       	brne	.-4      	; 0x1934 <User_App+0x4d0>
 ++                                                ++
 +++++++++++++++++++++++++++++++++++++++++++++++++++*/

 void delay_ms(unsigned int cnt)
  {
    for(;cnt>0;cnt--)
    1938:	01 97       	sbiw	r24, 0x01	; 1
    193a:	d1 f7       	brne	.-12     	; 0x1930 <User_App+0x4cc>

    if(mode==0)                          //Update Time When Button = Set
	  {
       delay_ms(10)                  ;

	   tm += 10                      ;
    193c:	8b a5       	ldd	r24, Y+43	; 0x2b
    193e:	9c a5       	ldd	r25, Y+44	; 0x2c
    1940:	0a 96       	adiw	r24, 0x0a	; 10
    1942:	9c a7       	std	Y+44, r25	; 0x2c
    1944:	8b a7       	std	Y+43, r24	; 0x2b

	   if(tm >1000)                      //check  1000 ms = 1s
    1946:	89 5e       	subi	r24, 0xE9	; 233
    1948:	93 40       	sbci	r25, 0x03	; 3
    194a:	0c f4       	brge	.+2      	; 0x194e <User_App+0x4ea>
    194c:	de cd       	rjmp	.-1092   	; 0x150a <User_App+0xa6>
	    {
	
		  tm =0                      ;
	      ss = ss+1                  ;  //Update ss
    194e:	80 91 6a 01 	lds	r24, 0x016A
    1952:	90 91 6b 01 	lds	r25, 0x016B
    1956:	01 96       	adiw	r24, 0x01	; 1
    1958:	90 93 6b 01 	sts	0x016B, r25
    195c:	80 93 6a 01 	sts	0x016A, r24
		  Sound_Effect(100,G_5,Click);  //Sound effect Pin-Second
    1960:	84 e6       	ldi	r24, 0x64	; 100
    1962:	60 e5       	ldi	r22, 0x50	; 80
    1964:	70 e0       	ldi	r23, 0x00	; 0
    1966:	40 e5       	ldi	r20, 0x50	; 80
    1968:	50 e0       	ldi	r21, 0x00	; 0
    196a:	0e 94 71 02 	call	0x4e2	; 0x4e2 <Sound_Effect>
		 	  
	   
	      if(ss == 60)                  //Check SS=60
    196e:	80 91 6a 01 	lds	r24, 0x016A
    1972:	90 91 6b 01 	lds	r25, 0x016B
    1976:	cc 97       	sbiw	r24, 0x3c	; 60
    1978:	11 f5       	brne	.+68     	; 0x19be <User_App+0x55a>
	       {
		     ss =0                   ;
    197a:	10 92 6b 01 	sts	0x016B, r1
    197e:	10 92 6a 01 	sts	0x016A, r1
		     mm = mm+1               ;  //Update mm
    1982:	80 91 68 01 	lds	r24, 0x0168
    1986:	90 91 69 01 	lds	r25, 0x0169
    198a:	01 96       	adiw	r24, 0x01	; 1
    198c:	90 93 69 01 	sts	0x0169, r25
    1990:	80 93 68 01 	sts	0x0168, r24

		    if(mm==60)                  //Check mm=60
    1994:	cc 97       	sbiw	r24, 0x3c	; 60
    1996:	99 f4       	brne	.+38     	; 0x19be <User_App+0x55a>
		     {
               mm=0                  ;
    1998:	10 92 69 01 	sts	0x0169, r1
    199c:	10 92 68 01 	sts	0x0168, r1
			   hh= hh+1              ;  //Update hh
    19a0:	80 91 36 01 	lds	r24, 0x0136
    19a4:	90 91 37 01 	lds	r25, 0x0137
    19a8:	01 96       	adiw	r24, 0x01	; 1
    19aa:	90 93 37 01 	sts	0x0137, r25
    19ae:	80 93 36 01 	sts	0x0136, r24
			 
			   if(hh==24)
    19b2:	48 97       	sbiw	r24, 0x18	; 24
    19b4:	21 f4       	brne	.+8      	; 0x19be <User_App+0x55a>
			     hh = 0              ;  //Clear hh
    19b6:	10 92 37 01 	sts	0x0137, r1
    19ba:	10 92 36 01 	sts	0x0136, r1
			 }

		   } // if ss

		   Update_Screen(MediumBlue,tx_color[cb],bt_color[cb],Red,Red)  ;
    19be:	ba a5       	ldd	r27, Y+42	; 0x2a
    19c0:	eb 2f       	mov	r30, r27
    19c2:	f0 e0       	ldi	r31, 0x00	; 0
    19c4:	00 d0       	rcall	.+0      	; 0x19c6 <User_App+0x562>
    19c6:	00 d0       	rcall	.+0      	; 0x19c8 <User_App+0x564>
    19c8:	ee 0f       	add	r30, r30
    19ca:	ff 1f       	adc	r31, r31
    19cc:	ee 0f       	add	r30, r30
    19ce:	ff 1f       	adc	r31, r31
    19d0:	81 e0       	ldi	r24, 0x01	; 1
    19d2:	90 e0       	ldi	r25, 0x00	; 0
    19d4:	8c 0f       	add	r24, r28
    19d6:	9d 1f       	adc	r25, r29
    19d8:	e8 0f       	add	r30, r24
    19da:	f9 1f       	adc	r31, r25
    19dc:	24 89       	ldd	r18, Z+20	; 0x14
    19de:	35 89       	ldd	r19, Z+21	; 0x15
    19e0:	46 89       	ldd	r20, Z+22	; 0x16
    19e2:	57 89       	ldd	r21, Z+23	; 0x17
    19e4:	e0 80       	ld	r14, Z
    19e6:	f1 80       	ldd	r15, Z+1	; 0x01
    19e8:	02 81       	ldd	r16, Z+2	; 0x02
    19ea:	13 81       	ldd	r17, Z+3	; 0x03
    19ec:	80 e0       	ldi	r24, 0x00	; 0
    19ee:	90 e0       	ldi	r25, 0x00	; 0
    19f0:	af ef       	ldi	r26, 0xFF	; 255
    19f2:	b0 e0       	ldi	r27, 0x00	; 0
    19f4:	ed b7       	in	r30, 0x3d	; 61
    19f6:	fe b7       	in	r31, 0x3e	; 62
    19f8:	81 83       	std	Z+1, r24	; 0x01
    19fa:	92 83       	std	Z+2, r25	; 0x02
    19fc:	a3 83       	std	Z+3, r26	; 0x03
    19fe:	b4 83       	std	Z+4, r27	; 0x04
    1a00:	6d ec       	ldi	r22, 0xCD	; 205
    1a02:	70 e0       	ldi	r23, 0x00	; 0
    1a04:	80 e0       	ldi	r24, 0x00	; 0
    1a06:	90 e0       	ldi	r25, 0x00	; 0
    1a08:	a1 2c       	mov	r10, r1
    1a0a:	b1 2c       	mov	r11, r1
    1a0c:	ef ef       	ldi	r30, 0xFF	; 255
    1a0e:	ce 2e       	mov	r12, r30
    1a10:	d1 2c       	mov	r13, r1
    1a12:	0e 94 02 09 	call	0x1204	; 0x1204 <Update_Screen>
    1a16:	1c a6       	std	Y+44, r1	; 0x2c
    1a18:	1b a6       	std	Y+43, r1	; 0x2b
    1a1a:	73 cd       	rjmp	.-1306   	; 0x1502 <User_App+0x9e>

00001a1c <main>:
  +++++++++++++++++++++++++++++++++++++++++++++++++++*/

 void init_port(void)
  {

   DDRB  = 0x5E     ;        //Set PB1[MOSI],PB2[SCK],PB3[CS],PB4[PD#],PB6[SD_CS] = Output ; PB0[MISO],PB5(INT)=Input
    1a1c:	8e e5       	ldi	r24, 0x5E	; 94
    1a1e:	87 bb       	out	0x17, r24	; 23
   
   //------ Set Value Default Port ------ 
         
   PORTB = 0x7B     ;       //Set Default Port PB0(MISO),PB5(INT) = 1(Pull Up) ,PB4(PD)=1(Disable Power down),PB3(CS)=1, 
    1a20:	8b e7       	ldi	r24, 0x7B	; 123
    1a22:	88 bb       	out	0x18, r24	; 24

int main(void)
 {
  
   init_port()	     ;
   FT800_Initial()   ;
    1a24:	0e 94 78 07 	call	0xef0	; 0xef0 <FT800_Initial>
   Touch_Calibrate() ;
    1a28:	0e 94 2d 07 	call	0xe5a	; 0xe5a <Touch_Calibrate>
   User_App()        ;
    1a2c:	0e 94 32 0a 	call	0x1464	; 0x1464 <User_App>

}
    1a30:	80 e0       	ldi	r24, 0x00	; 0
    1a32:	90 e0       	ldi	r25, 0x00	; 0
    1a34:	08 95       	ret

00001a36 <_exit>:
    1a36:	f8 94       	cli

00001a38 <__stop_program>:
    1a38:	ff cf       	rjmp	.-2      	; 0x1a38 <__stop_program>
