CCS PCH C Compiler, Version 5.048, 26145               24-Mar-23 09:31

               Filename:   C:\Users\soac-gj2\Desktop\Embedded C\project 4\proteus\PIC18F2525_1\Debug.lst

               ROM used:   1888 bytes (4%)
                           Largest free fragment is 47260
               RAM used:   35 (1%) at main() level
                           47 (1%) worst case
               Stack used: 6 locations (5 in main + 1 for interrupts)
               Stack size: 31

*
0000:  GOTO   0698
*
0008:  MOVWF  04
000A:  MOVFF  FD8,05
000E:  MOVFF  FE0,06
0012:  MOVLB  0
0014:  MOVFF  FE9,0C
0018:  MOVFF  FEA,07
001C:  MOVFF  FE1,08
0020:  MOVFF  FE2,09
0024:  MOVFF  FD9,0A
0028:  MOVFF  FDA,0B
002C:  MOVFF  FF3,12
0030:  MOVFF  FF4,13
0034:  MOVFF  FFA,14
0038:  MOVFF  FF5,15
003C:  MOVFF  FF6,16
0040:  MOVFF  FF7,17
0044:  MOVFF  00,0E
0048:  MOVFF  01,0F
004C:  MOVFF  02,10
0050:  MOVFF  03,11
0054:  BTFSS  F9D.1
0056:  GOTO   0060
005A:  BTFSC  F9E.1
005C:  GOTO   00AE
0060:  MOVFF  0E,00
0064:  MOVFF  0F,01
0068:  MOVFF  10,02
006C:  MOVFF  11,03
0070:  MOVFF  0C,FE9
0074:  MOVFF  07,FEA
0078:  BSF    07.7
007A:  MOVFF  08,FE1
007E:  MOVFF  09,FE2
0082:  MOVFF  0A,FD9
0086:  MOVFF  0B,FDA
008A:  MOVFF  12,FF3
008E:  MOVFF  13,FF4
0092:  MOVFF  14,FFA
0096:  MOVFF  15,FF5
009A:  MOVFF  16,FF6
009E:  MOVFF  17,FF7
00A2:  MOVF   04,W
00A4:  MOVFF  06,FE0
00A8:  MOVFF  05,FD8
00AC:  RETFIE 0
.................... #import(file="main.o") 
....................  
.................... #include <main.h> 
.................... #include <18F2525.h> 
.................... //////////// Standard Header file for the PIC18F2525 device //////////////// 
.................... /////////////////////////////////////////////////////////////////////////// 
.................... ////        (C) Copyright 1996, 2014 Custom Computer Services          //// 
.................... //// This source code may only be used by licensed users of the CCS C  //// 
.................... //// compiler.  This source code may only be distributed to other      //// 
.................... //// licensed users of the CCS C compiler.  No other use, reproduction //// 
.................... //// or distribution is permitted without written permission.          //// 
.................... //// Derivative programs created using this software in object code    //// 
.................... //// form are not restricted in any way.                               //// 
.................... /////////////////////////////////////////////////////////////////////////// 
.................... #device PIC18F2525 
*
00BE:  DATA 0C,20
00C0:  DATA 64,69
00C2:  DATA 73,70
00C4:  DATA 65,6E
00C6:  DATA 73,69
00C8:  DATA 6E,67
00CA:  DATA 00,00
00CC:  DATA 54,61
00CE:  DATA 6B,65
00D0:  DATA 20,79
00D2:  DATA 6F,75
00D4:  DATA 72,20
00D6:  DATA 64,72
00D8:  DATA 69,6E
00DA:  DATA 6B,00
00DC:  DATA 0C,20
00DE:  DATA 20,54
00E0:  DATA 65,61
00E2:  DATA 00,00
00E4:  DATA 0C,20
00E6:  DATA 20,43
00E8:  DATA 6F,66
00EA:  DATA 66,65
00EC:  DATA 65,00
00EE:  DATA 0C,20
00F0:  DATA 20,43
00F2:  DATA 68,6F
00F4:  DATA 63,6F
00F6:  DATA 6C,61
00F8:  DATA 74,65
00FA:  DATA 00,00
00FC:  DATA 20,20
00FE:  DATA 31,20
0100:  DATA 53,75
0102:  DATA 67,61
0104:  DATA 72,00
0106:  DATA 20,20
0108:  DATA 32,20
010A:  DATA 53,75
010C:  DATA 67,61
010E:  DATA 72,73
0110:  DATA 00,00
0112:  DATA 20,20
0114:  DATA 6E,6F
0116:  DATA 20,53
0118:  DATA 75,67
011A:  DATA 61,72
011C:  DATA 00,00
011E:  DATA 20,20
0120:  DATA 4D,69
0122:  DATA 6C,6B
0124:  DATA 00,00
0126:  DATA 20,20
0128:  DATA 4E,6F
012A:  DATA 20,4D
012C:  DATA 69,6C
012E:  DATA 6B,00
0130:  DATA 31,20
0132:  DATA 63,6F
0134:  DATA 6E,66
0136:  DATA 69,72
0138:  DATA 6D,20
013A:  DATA 32,20
013C:  DATA 63,61
013E:  DATA 6E,63
0140:  DATA 65,6C
0142:  DATA 00,00
0144:  DATA 0C,31
0146:  DATA 2E,2E
0148:  DATA 20,59
014A:  DATA 45,53
014C:  DATA 00,00
014E:  DATA 33,2E
0150:  DATA 2E,20
0152:  DATA 4E,4F
0154:  DATA 20,00
0156:  DATA 4D,49
0158:  DATA 4C,4B
015A:  DATA 20,50
015C:  DATA 4C,45
015E:  DATA 41,53
0160:  DATA 45,20
0162:  DATA 53,45
0164:  DATA 4C,45
0166:  DATA 43,54
0168:  DATA 00,00
016A:  DATA 0C,31
016C:  DATA 2E,2E
016E:  DATA 20,31
0170:  DATA 20,73
0172:  DATA 75,67
0174:  DATA 61,72
0176:  DATA 00,00
0178:  DATA 32,2E
017A:  DATA 2E,20
017C:  DATA 32,20
017E:  DATA 73,75
0180:  DATA 67,61
0182:  DATA 72,73
0184:  DATA 00,00
0186:  DATA 33,2E
0188:  DATA 2E,20
018A:  DATA 6E,6F
018C:  DATA 20,73
018E:  DATA 75,67
0190:  DATA 61,72
0192:  DATA 00,00
0194:  DATA 50,4C
0196:  DATA 45,41
0198:  DATA 53,45
019A:  DATA 20,53
019C:  DATA 45,4C
019E:  DATA 45,43
01A0:  DATA 54,00
01A2:  DATA 0C,31
01A4:  DATA 2E,2E
01A6:  DATA 20,54
01A8:  DATA 65,61
01AA:  DATA 00,00
01AC:  DATA 32,2E
01AE:  DATA 2E,20
01B0:  DATA 43,6F
01B2:  DATA 66,66
01B4:  DATA 65,65
01B6:  DATA 00,00
01B8:  DATA 33,2E
01BA:  DATA 2E,20
01BC:  DATA 42,6F
01BE:  DATA 76,72
01C0:  DATA 69,6C
01C2:  DATA 00,00
01C4:  DATA 50,4C
01C6:  DATA 45,41
01C8:  DATA 53,45
01CA:  DATA 20,53
01CC:  DATA 45,4C
01CE:  DATA 45,43
01D0:  DATA 54,00
*
0412:  TBLRD*+
0414:  MOVF   FF5,F
0416:  BZ    0430
0418:  MOVFF  FF6,22
041C:  MOVFF  FF7,23
0420:  MOVFF  FF5,24
0424:  RCALL  03C2
0426:  MOVFF  22,FF6
042A:  MOVFF  23,FF7
042E:  BRA    0412
0430:  RETURN 0
....................  
.................... #list 
....................  
.................... #device ADC=8 
....................  
.................... #FUSES FCMEN                 	//Fail-safe clock monitor enabled 
.................... #FUSES IESO                  	//Internal External Switch Over mode enabled 
.................... #FUSES PUT                   	//Power Up Timer 
.................... #FUSES BROWNOUT              	//Reset when brownout detected 
.................... #FUSES BORV21                	//Brownout reset at 2.1V 
.................... #FUSES NOPBADEN              	//PORTB pins are configured as digital I/O on RESET 
.................... #FUSES LPT1OSC               	//Timer1 configured for low-power operation 
.................... #FUSES NOMCLR                	//Master Clear pin used for I/O 
.................... #FUSES STVREN                	//Stack full/underflow will cause reset 
.................... #FUSES NOLVP                 	//No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O 
.................... #FUSES NOXINST               	//Extended set extension and Indexed Addressing mode disabled (Legacy mode) 
.................... #FUSES NOPROTECT             	//Code not protected from reading 
.................... #FUSES NOCPB                 	//No Boot Block code protection 
.................... #FUSES NOCPD                 	//No EE protection 
.................... #FUSES NOWRT                 	//Program memory not write protected 
.................... #FUSES NOWRTC                	//Configuration registers not write protected 
.................... #FUSES NOWRTB                	//Boot block not write protected 
.................... #FUSES NOWRTD                	//Data EEPROM not write protected 
.................... #FUSES NOEBTR                	//Memory not protected from table reads 
.................... #FUSES NOEBTRB               	//Boot block not protected from table reads 
....................  
.................... #use delay(internal=16MHz) 
*
01D2:  CLRF   FEA
01D4:  MOVLW  27
01D6:  MOVWF  FE9
01D8:  MOVF   FEF,W
01DA:  BZ    01F8
01DC:  MOVLW  05
01DE:  MOVWF  01
01E0:  CLRF   00
01E2:  DECFSZ 00,F
01E4:  BRA    01E2
01E6:  DECFSZ 01,F
01E8:  BRA    01E0
01EA:  MOVLW  2E
01EC:  MOVWF  00
01EE:  DECFSZ 00,F
01F0:  BRA    01EE
01F2:  BRA    01F4
01F4:  DECFSZ FEF,F
01F6:  BRA    01DC
01F8:  RETURN 0
.................... #use rs232(baud=9600,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8,stream=PORT1,errors) 
....................  
.................... #define LED PIN_A4 
.................... #define DELAY 500 
....................  
....................  
....................  
....................  
....................  
.................... unsigned int a=10;					//define variables. 
.................... unsigned int flag=0; 
.................... unsigned int selection=0; 
.................... unsigned int sugar=0; 
.................... unsigned int milk=0; 
.................... 									//define variables end 
....................  
.................... #INT_TIMER2 
.................... void  TIMER2_isr(void)  
.................... { 
....................     a--;												// increment a in the interrupt routine half second 
*
00AE:  DECF   1A,F
.................... 	if(!a)	flag+=0x01; 
00B0:  MOVF   1A,F
00B2:  BNZ   00B8
00B4:  MOVLW  01
00B6:  ADDWF  1B,F
....................  
....................  
.................... } 
.................... #define m_tea	PIN_C0 
.................... #define m_cof	Pin_C1 
.................... #define m_choc	PIN_C2 
.................... #define m_milk  Pin_C3 
.................... #define m_sug	Pin_C4 
00B8:  BCF    F9E.1
00BA:  GOTO   0060
.................... #define m_water PIN_C5 
.................... 									// prototypes for our functions 
.................... void func1();						// display menu 
.................... unsigned int func2(unsigned int);	// allow button selection --  pass in mask and return button value 
.................... void func3();						// ask for sugar input 
.................... void func4();						// ask for milk input 
.................... void func5();						// display selections 
.................... void func6();						// dispanse the beverage 1sec for tea/choc/coffee 1 sec per sugar, 1 sec for milk and 10secs for water 
....................  
.................... 									// prototypes for our functions end 
.................... #define LCD_ENABLE_PIN PIN_B2 
.................... #define LCD_RS_PIN PIN_B0 
.................... #define LCD_RW_PIN PIN_B1 
.................... #define LCD_DATA4 PIN_B4 
.................... #define LCD_DATA5 PIN_B5 
.................... #define LCD_DATA6 PIN_B6 
.................... #define LCD_DATA7 PIN_B7 
....................  
....................  
....................  
.................... #include <lcd.c> 
.................... /////////////////////////////////////////////////////////////////////////////// 
.................... ////                             LCD.C                                     //// 
.................... ////                 Driver for common LCD modules                         //// 
.................... ////                                                                       //// 
.................... ////  lcd_init()   Must be called before any other function.               //// 
.................... ////                                                                       //// 
.................... ////  lcd_putc(c)  Will display c on the next position of the LCD.         //// 
.................... ////                 \a  Set cursor position to upper left                 //// 
.................... ////                 \f  Clear display, set cursor to upper left           //// 
.................... ////                 \n  Go to start of second line                        //// 
.................... ////                 \b  Move back one position                            //// 
.................... ////              If LCD_EXTENDED_NEWLINE is defined, the \n character     //// 
.................... ////              will erase all remanining characters on the current      //// 
.................... ////              line, and move the cursor to the beginning of the next   //// 
.................... ////              line.                                                    //// 
.................... ////              If LCD_EXTENDED_NEWLINE is defined, the \r character     //// 
.................... ////              will move the cursor to the start of the current         //// 
.................... ////              line.                                                    //// 
.................... ////                                                                       //// 
.................... ////  lcd_gotoxy(x,y) Set write position on LCD (upper left is 1,1)        //// 
.................... ////                                                                       //// 
.................... ////  lcd_getc(x,y)   Returns character at position x,y on LCD             //// 
.................... ////                                                                       //// 
.................... ////  lcd_cursor_on(int1 on)   Turn the cursor on (on=TRUE) or off         //// 
.................... ////              (on=FALSE).                                              //// 
.................... ////                                                                       //// 
.................... ////  lcd_set_cgram_char(w, *p)   Write a custom character to the CGRAM.   //// 
.................... ////                                                                       //// 
.................... ////                                                                       //// 
.................... ////  CONFIGURATION                                                        //// 
.................... ////  The LCD can be configured in one of two ways: a.) port access or     //// 
.................... ////  b.) pin access.  Port access requires the entire 7 bit interface     //// 
.................... ////  connected to one GPIO port, and the data bits (D4:D7 of the LCD)     //// 
.................... ////  connected to sequential pins on the GPIO.  Pin access                //// 
.................... ////  has no requirements, all 7 bits of the control interface can         //// 
.................... ////  can be connected to any GPIO using several ports.                    //// 
.................... ////                                                                       //// 
.................... ////  To use port access, #define LCD_DATA_PORT to the SFR location of     //// 
.................... ////  of the GPIO port that holds the interface, -AND- edit LCD_PIN_MAP    //// 
.................... ////  of this file to configure the pin order.  If you are using a         //// 
.................... ////  baseline PIC (PCB), then LCD_OUTPUT_MAP and LCD_INPUT_MAP also must  //// 
.................... ////  be defined.                                                          //// 
.................... ////                                                                       //// 
.................... ////  Example of port access:                                              //// 
.................... ////     #define LCD_DATA_PORT getenv("SFR:PORTD")                         //// 
.................... ////                                                                       //// 
.................... ////  To use pin access, the following pins must be defined:               //// 
.................... ////     LCD_ENABLE_PIN                                                    //// 
.................... ////     LCD_RS_PIN                                                        //// 
.................... ////     LCD_RW_PIN                                                        //// 
.................... ////     LCD_DATA4                                                         //// 
.................... ////     LCD_DATA5                                                         //// 
.................... ////     LCD_DATA6                                                         //// 
.................... ////     LCD_DATA7                                                         //// 
.................... ////                                                                       //// 
.................... ////  Example of pin access:                                               //// 
.................... ////     #define LCD_ENABLE_PIN  PIN_E0                                    //// 
.................... ////     #define LCD_RS_PIN      PIN_E1                                    //// 
.................... ////     #define LCD_RW_PIN      PIN_E2                                    //// 
.................... ////     #define LCD_DATA4       PIN_D4                                    //// 
.................... ////     #define LCD_DATA5       PIN_D5                                    //// 
.................... ////     #define LCD_DATA6       PIN_D6                                    //// 
.................... ////     #define LCD_DATA7       PIN_D7                                    //// 
.................... ////                                                                       //// 
.................... /////////////////////////////////////////////////////////////////////////////// 
.................... ////        (C) Copyright 1996,2010 Custom Computer Services           //// 
.................... //// This source code may only be used by licensed users of the CCS C  //// 
.................... //// compiler.  This source code may only be distributed to other      //// 
.................... //// licensed users of the CCS C compiler.  No other use, reproduction //// 
.................... //// or distribution is permitted without written permission.          //// 
.................... //// Derivative programs created using this software in object code    //// 
.................... //// form are not restricted in any way.                               //// 
.................... /////////////////////////////////////////////////////////////////////////// 
....................  
.................... #ifndef __LCD_C__ 
.................... #define __LCD_C__ 
....................  
.................... // define the pinout. 
.................... // only required if port access is being used. 
.................... typedef struct   
.................... {                            // This structure is overlayed 
....................    int1 enable;           // on to an I/O port to gain 
....................    int1 rs;               // access to the LCD pins. 
....................    int1 rw;               // The bits are allocated from 
....................    int1 unused;           // low order up.  ENABLE will 
....................    unsigned int     data : 4;         // be LSB pin of that port. 
....................   #if defined(__PCD__)       // The port used will be LCD_DATA_PORT. 
....................    unsigned int    reserved: 8; 
....................   #endif 
.................... } LCD_PIN_MAP; 
....................  
.................... // this is to improve compatability with previous LCD drivers that accepted 
.................... // a define labeled 'use_portb_lcd' that configured the LCD onto port B. 
.................... #if ((defined(use_portb_lcd)) && (use_portb_lcd==TRUE)) 
....................  #define LCD_DATA_PORT getenv("SFR:PORTB") 
.................... #endif 
....................  
.................... #if defined(__PCB__) 
....................    // these definitions only need to be modified for baseline PICs. 
....................    // all other PICs use LCD_PIN_MAP or individual LCD_xxx pin definitions. 
.................... /*                                    EN, RS,   RW,   UNUSED,  DATA  */ 
....................  const LCD_PIN_MAP LCD_OUTPUT_MAP =  {0,  0,    0,    0,       0}; 
....................  const LCD_PIN_MAP LCD_INPUT_MAP =   {0,  0,    0,    0,       0xF}; 
.................... #endif 
....................  
.................... ////////////////////// END CONFIGURATION /////////////////////////////////// 
....................  
.................... #ifndef LCD_ENABLE_PIN 
....................    #define lcd_output_enable(x) lcdlat.enable=x 
....................    #define lcd_enable_tris()   lcdtris.enable=0 
.................... #else 
....................    #define lcd_output_enable(x) output_bit(LCD_ENABLE_PIN, x) 
....................    #define lcd_enable_tris()  output_drive(LCD_ENABLE_PIN) 
.................... #endif 
....................  
.................... #ifndef LCD_RS_PIN 
....................    #define lcd_output_rs(x) lcdlat.rs=x 
....................    #define lcd_rs_tris()   lcdtris.rs=0 
.................... #else 
....................    #define lcd_output_rs(x) output_bit(LCD_RS_PIN, x) 
....................    #define lcd_rs_tris()  output_drive(LCD_RS_PIN) 
.................... #endif 
....................  
.................... #ifndef LCD_RW_PIN 
....................    #define lcd_output_rw(x) lcdlat.rw=x 
....................    #define lcd_rw_tris()   lcdtris.rw=0 
.................... #else 
....................    #define lcd_output_rw(x) output_bit(LCD_RW_PIN, x) 
....................    #define lcd_rw_tris()  output_drive(LCD_RW_PIN) 
.................... #endif 
....................  
.................... // original version of this library incorrectly labeled LCD_DATA0 as LCD_DATA4, 
.................... // LCD_DATA1 as LCD_DATA5, and so on.  this block of code makes the driver 
.................... // compatible with any code written for the original library 
.................... #if (defined(LCD_DATA0) && defined(LCD_DATA1) && defined(LCD_DATA2) && defined(LCD_DATA3) && !defined(LCD_DATA4) && !defined(LCD_DATA5) && !defined(LCD_DATA6) && !defined(LCD_DATA7)) 
....................    #define  LCD_DATA4    LCD_DATA0 
....................    #define  LCD_DATA5    LCD_DATA1 
....................    #define  LCD_DATA6    LCD_DATA2 
....................    #define  LCD_DATA7    LCD_DATA3 
.................... #endif 
....................  
.................... #ifndef LCD_DATA4 
.................... #ifndef LCD_DATA_PORT 
....................    #if defined(__PCB__) 
....................       #define LCD_DATA_PORT      0x06     //portb 
....................       #define set_tris_lcd(x)   set_tris_b(x) 
....................    #else 
....................      #if defined(PIN_D0) 
....................       #define LCD_DATA_PORT      getenv("SFR:PORTD")     //portd 
....................      #else 
....................       #define LCD_DATA_PORT      getenv("SFR:PORTB")     //portb 
....................      #endif 
....................    #endif    
.................... #endif 
....................  
.................... #if defined(__PCB__) 
....................    LCD_PIN_MAP lcd, lcdlat; 
....................    #byte lcd = LCD_DATA_PORT 
....................    #byte lcdlat = LCD_DATA_PORT 
.................... #elif defined(__PCM__) 
....................    LCD_PIN_MAP lcd, lcdlat, lcdtris; 
....................    #byte lcd = LCD_DATA_PORT 
....................    #byte lcdlat = LCD_DATA_PORT 
....................    #byte lcdtris = LCD_DATA_PORT+0x80 
.................... #elif defined(__PCH__) 
....................    LCD_PIN_MAP lcd, lcdlat, lcdtris; 
....................    #byte lcd = LCD_DATA_PORT 
....................    #byte lcdlat = LCD_DATA_PORT+9 
....................    #byte lcdtris = LCD_DATA_PORT+0x12 
.................... #elif defined(__PCD__) 
....................    LCD_PIN_MAP lcd, lcdlat, lcdtris; 
....................    #word lcd = LCD_DATA_PORT 
....................    #word lcdlat = LCD_DATA_PORT+2 
....................    #word lcdtris = LCD_DATA_PORT-0x02 
.................... #endif 
.................... #endif   //LCD_DATA4 not defined 
....................  
.................... #ifndef LCD_TYPE 
....................    #define LCD_TYPE 2           // 0=5x7, 1=5x10, 2=2 lines 
.................... #endif 
....................  
.................... #ifndef LCD_LINE_TWO 
....................    #define LCD_LINE_TWO 0x40    // LCD RAM address for the second line 
.................... #endif 
....................  
.................... #ifndef LCD_LINE_LENGTH 
....................    #define LCD_LINE_LENGTH 20 
.................... #endif 
....................  
.................... unsigned int8 lcd_read_nibble(void); 
....................  
.................... unsigned int8 lcd_read_byte(void) 
.................... { 
....................    unsigned int8 low,high; 
....................  
....................  #if defined(__PCB__) 
....................    set_tris_lcd(LCD_INPUT_MAP); 
....................  #else 
....................   #if (defined(LCD_DATA4) && defined(LCD_DATA5) && defined(LCD_DATA6) && defined(LCD_DATA7)) 
....................    output_float(LCD_DATA4); 
*
0292:  BSF    F93.4
....................    output_float(LCD_DATA5); 
0294:  BSF    F93.5
....................    output_float(LCD_DATA6); 
0296:  BSF    F93.6
....................    output_float(LCD_DATA7); 
0298:  BSF    F93.7
....................   #else 
....................    lcdtris.data = 0xF; 
....................   #endif 
....................  #endif 
....................          
....................    lcd_output_rw(1); 
029A:  BSF    F8A.1
029C:  BCF    F93.1
....................    delay_cycles(1); 
029E:  NOP   
....................    lcd_output_enable(1); 
02A0:  BSF    F8A.2
02A2:  BCF    F93.2
....................    delay_cycles(1); 
02A4:  NOP   
....................    high = lcd_read_nibble(); 
02A6:  RCALL  0240
02A8:  MOVFF  01,2C
....................        
....................    lcd_output_enable(0); 
02AC:  BCF    F8A.2
02AE:  BCF    F93.2
....................    delay_cycles(1); 
02B0:  NOP   
....................    lcd_output_enable(1); 
02B2:  BSF    F8A.2
02B4:  BCF    F93.2
....................    delay_us(1); 
02B6:  BRA    02B8
02B8:  BRA    02BA
....................    low = lcd_read_nibble(); 
02BA:  RCALL  0240
02BC:  MOVFF  01,2B
....................        
....................    lcd_output_enable(0); 
02C0:  BCF    F8A.2
02C2:  BCF    F93.2
....................  
....................  #if defined(__PCB__) 
....................    set_tris_lcd(LCD_OUTPUT_MAP); 
....................  #else 
....................   #if (defined(LCD_DATA4) && defined(LCD_DATA5) && defined(LCD_DATA6) && defined(LCD_DATA7)) 
....................    output_drive(LCD_DATA4); 
02C4:  BCF    F93.4
....................    output_drive(LCD_DATA5); 
02C6:  BCF    F93.5
....................    output_drive(LCD_DATA6); 
02C8:  BCF    F93.6
....................    output_drive(LCD_DATA7); 
02CA:  BCF    F93.7
....................   #else 
....................    lcdtris.data = 0x0; 
....................   #endif 
....................  #endif 
....................  
....................    return( (high<<4) | low); 
02CC:  SWAPF  2C,W
02CE:  MOVWF  00
02D0:  MOVLW  F0
02D2:  ANDWF  00,F
02D4:  MOVF   00,W
02D6:  IORWF  2B,W
02D8:  MOVWF  01
02DA:  GOTO   02EA (RETURN)
.................... } 
....................  
.................... unsigned int8 lcd_read_nibble(void) 
.................... { 
....................   #if (defined(LCD_DATA4) && defined(LCD_DATA5) && defined(LCD_DATA6) && defined(LCD_DATA7)) 
*
0240:  CLRF   2D
....................    unsigned int8 n = 0x00; 
....................  
....................    /* Read the data port */ 
....................    n |= input(LCD_DATA4); 
0242:  BSF    F93.4
0244:  MOVLW  00
0246:  BTFSC  F81.4
0248:  MOVLW  01
024A:  IORWF  2D,F
....................    n |= input(LCD_DATA5) << 1; 
024C:  BSF    F93.5
024E:  MOVLW  00
0250:  BTFSC  F81.5
0252:  MOVLW  01
0254:  MOVWF  00
0256:  BCF    FD8.0
0258:  RLCF   00,F
025A:  MOVF   00,W
025C:  IORWF  2D,F
....................    n |= input(LCD_DATA6) << 2; 
025E:  BSF    F93.6
0260:  MOVLW  00
0262:  BTFSC  F81.6
0264:  MOVLW  01
0266:  MOVWF  00
0268:  RLCF   00,F
026A:  RLCF   00,F
026C:  MOVLW  FC
026E:  ANDWF  00,F
0270:  MOVF   00,W
0272:  IORWF  2D,F
....................    n |= input(LCD_DATA7) << 3; 
0274:  BSF    F93.7
0276:  MOVLW  00
0278:  BTFSC  F81.7
027A:  MOVLW  01
027C:  MOVWF  00
027E:  RLCF   00,F
0280:  RLCF   00,F
0282:  RLCF   00,F
0284:  MOVLW  F8
0286:  ANDWF  00,F
0288:  MOVF   00,W
028A:  IORWF  2D,F
....................     
....................    return(n); 
028C:  MOVFF  2D,01
....................   #else 
0290:  RETURN 0
....................    return(lcd.data); 
....................   #endif 
.................... } 
....................  
.................... void lcd_send_nibble(unsigned int8 n) 
.................... { 
....................   #if (defined(LCD_DATA4) && defined(LCD_DATA5) && defined(LCD_DATA6) && defined(LCD_DATA7)) 
....................    /* Write to the data port */ 
....................    output_bit(LCD_DATA4, bit_test(n, 0)); 
*
01FA:  BTFSC  2C.0
01FC:  BRA    0202
01FE:  BCF    F8A.4
0200:  BRA    0204
0202:  BSF    F8A.4
0204:  BCF    F93.4
....................    output_bit(LCD_DATA5, bit_test(n, 1)); 
0206:  BTFSC  2C.1
0208:  BRA    020E
020A:  BCF    F8A.5
020C:  BRA    0210
020E:  BSF    F8A.5
0210:  BCF    F93.5
....................    output_bit(LCD_DATA6, bit_test(n, 2)); 
0212:  BTFSC  2C.2
0214:  BRA    021A
0216:  BCF    F8A.6
0218:  BRA    021C
021A:  BSF    F8A.6
021C:  BCF    F93.6
....................    output_bit(LCD_DATA7, bit_test(n, 3)); 
021E:  BTFSC  2C.3
0220:  BRA    0226
0222:  BCF    F8A.7
0224:  BRA    0228
0226:  BSF    F8A.7
0228:  BCF    F93.7
....................   #else       
....................    lcdlat.data = n; 
....................   #endif 
....................        
....................    delay_cycles(1); 
022A:  NOP   
....................    lcd_output_enable(1); 
022C:  BSF    F8A.2
022E:  BCF    F93.2
....................    delay_us(2); 
0230:  MOVLW  02
0232:  MOVWF  00
0234:  DECFSZ 00,F
0236:  BRA    0234
0238:  NOP   
....................    lcd_output_enable(0); 
023A:  BCF    F8A.2
023C:  BCF    F93.2
023E:  RETURN 0
.................... } 
....................  
.................... void lcd_send_byte(unsigned int8 address, unsigned int8 n) 
.................... { 
....................   #if defined(__PCB__) 
....................    set_tris_lcd(LCD_OUTPUT_MAP); 
....................   #else 
....................    lcd_enable_tris(); 
*
02DE:  BCF    F93.2
....................    lcd_rs_tris(); 
02E0:  BCF    F93.0
....................    lcd_rw_tris(); 
02E2:  BCF    F93.1
....................   #endif 
....................  
....................    lcd_output_rs(0); 
02E4:  BCF    F8A.0
02E6:  BCF    F93.0
....................    while ( bit_test(lcd_read_byte(),7) ) ; 
02E8:  BRA    0292
02EA:  MOVFF  01,2B
02EE:  BTFSC  01.7
02F0:  BRA    02E8
....................    lcd_output_rs(address); 
02F2:  MOVF   29,F
02F4:  BNZ   02FA
02F6:  BCF    F8A.0
02F8:  BRA    02FC
02FA:  BSF    F8A.0
02FC:  BCF    F93.0
....................    delay_cycles(1); 
02FE:  NOP   
....................    lcd_output_rw(0); 
0300:  BCF    F8A.1
0302:  BCF    F93.1
....................    delay_cycles(1); 
0304:  NOP   
....................    lcd_output_enable(0); 
0306:  BCF    F8A.2
0308:  BCF    F93.2
....................    lcd_send_nibble(n >> 4); 
030A:  SWAPF  2A,W
030C:  MOVWF  2B
030E:  MOVLW  0F
0310:  ANDWF  2B,F
0312:  MOVFF  2B,2C
0316:  RCALL  01FA
....................    lcd_send_nibble(n & 0xf); 
0318:  MOVF   2A,W
031A:  ANDLW  0F
031C:  MOVWF  2B
031E:  MOVWF  2C
0320:  RCALL  01FA
0322:  RETURN 0
.................... } 
....................  
.................... #if defined(LCD_EXTENDED_NEWLINE) 
.................... unsigned int8 g_LcdX, g_LcdY; 
.................... #endif 
....................  
.................... void lcd_init(void)  
.................... { 
....................    unsigned int8 i; 
....................    unsigned int8 LCD_INIT_STRING[4] = {0x20 | (LCD_TYPE << 2), 0xc, 1, 6}; 
0324:  MOVLW  28
0326:  MOVWF  23
0328:  MOVLW  0C
032A:  MOVWF  24
032C:  MOVLW  01
032E:  MOVWF  25
0330:  MOVLW  06
0332:  MOVWF  26
....................                              // These bytes need to be sent to the LCD 
....................                              // to start it up. 
....................     
....................  
....................    lcd_output_enable(0); 
0334:  BCF    F8A.2
0336:  BCF    F93.2
....................    lcd_output_rs(0); 
0338:  BCF    F8A.0
033A:  BCF    F93.0
....................    lcd_output_rw(0); 
033C:  BCF    F8A.1
033E:  BCF    F93.1
....................  
....................  #if defined(__PCB__) 
....................    set_tris_lcd(LCD_OUTPUT_MAP); 
....................  #else 
....................   #if (defined(LCD_DATA4) && defined(LCD_DATA5) && defined(LCD_DATA6) && defined(LCD_DATA7)) 
....................    output_drive(LCD_DATA4); 
0340:  BCF    F93.4
....................    output_drive(LCD_DATA5); 
0342:  BCF    F93.5
....................    output_drive(LCD_DATA6); 
0344:  BCF    F93.6
....................    output_drive(LCD_DATA7); 
0346:  BCF    F93.7
....................   #else 
....................    lcdtris.data = 0x0; 
....................   #endif 
....................    lcd_enable_tris(); 
0348:  BCF    F93.2
....................    lcd_rs_tris(); 
034A:  BCF    F93.0
....................    lcd_rw_tris(); 
034C:  BCF    F93.1
....................  #endif 
....................      
....................    delay_ms(15); 
034E:  MOVLW  0F
0350:  MOVWF  27
0352:  RCALL  01D2
....................    for(i=1;i<=3;++i) 
0354:  MOVLW  01
0356:  MOVWF  22
0358:  MOVF   22,W
035A:  SUBLW  03
035C:  BNC   036E
....................    { 
....................        lcd_send_nibble(3); 
035E:  MOVLW  03
0360:  MOVWF  2C
0362:  RCALL  01FA
....................        delay_ms(5); 
0364:  MOVLW  05
0366:  MOVWF  27
0368:  RCALL  01D2
036A:  INCF   22,F
036C:  BRA    0358
....................    } 
....................     
....................    lcd_send_nibble(2); 
036E:  MOVLW  02
0370:  MOVWF  2C
0372:  RCALL  01FA
....................    delay_ms(5); 
0374:  MOVLW  05
0376:  MOVWF  27
0378:  RCALL  01D2
....................    for(i=0;i<=3;++i) 
037A:  CLRF   22
037C:  MOVF   22,W
037E:  SUBLW  03
0380:  BNC   039C
....................       lcd_send_byte(0,LCD_INIT_STRING[i]); 
0382:  CLRF   03
0384:  MOVF   22,W
0386:  ADDLW  23
0388:  MOVWF  FE9
038A:  MOVLW  00
038C:  ADDWFC 03,W
038E:  MOVWF  FEA
0390:  MOVFF  FEF,2A
0394:  CLRF   29
0396:  RCALL  02DE
....................  
....................   #if defined(LCD_EXTENDED_NEWLINE) 
0398:  INCF   22,F
039A:  BRA    037C
039C:  GOTO   06EC (RETURN)
....................    g_LcdX = 0; 
....................    g_LcdY = 0; 
....................   #endif 
.................... } 
....................  
.................... void lcd_gotoxy(unsigned int8 x, unsigned int8 y) 
.................... { 
....................    unsigned int8 address; 
....................     
....................    if(y!=1) 
03A0:  DECFSZ 26,W
03A2:  BRA    03A6
03A4:  BRA    03AC
....................       address=LCD_LINE_TWO; 
03A6:  MOVLW  40
03A8:  MOVWF  27
03AA:  BRA    03AE
....................    else 
....................       address=0; 
03AC:  CLRF   27
....................       
....................    address+=x-1; 
03AE:  MOVLW  01
03B0:  SUBWF  25,W
03B2:  ADDWF  27,F
....................    lcd_send_byte(0,0x80|address); 
03B4:  MOVF   27,W
03B6:  IORLW  80
03B8:  MOVWF  28
03BA:  CLRF   29
03BC:  MOVWF  2A
03BE:  RCALL  02DE
....................  
....................   #if defined(LCD_EXTENDED_NEWLINE) 
03C0:  RETURN 0
....................    g_LcdX = x - 1; 
....................    g_LcdY = y - 1; 
....................   #endif 
.................... } 
....................  
.................... void lcd_putc(char c) 
.................... { 
....................    switch (c) 
03C2:  MOVF   24,W
03C4:  XORLW  07
03C6:  BZ    03D6
03C8:  XORLW  0B
03CA:  BZ    03E0
03CC:  XORLW  06
03CE:  BZ    03F0
03D0:  XORLW  02
03D2:  BZ    03FC
03D4:  BRA    0406
....................    { 
....................       case '\a'   :  lcd_gotoxy(1,1);     break; 
03D6:  MOVLW  01
03D8:  MOVWF  25
03DA:  MOVWF  26
03DC:  RCALL  03A0
03DE:  BRA    0410
....................  
....................       case '\f'   :  lcd_send_byte(0,1); 
03E0:  CLRF   29
03E2:  MOVLW  01
03E4:  MOVWF  2A
03E6:  RCALL  02DE
....................                      delay_ms(2); 
03E8:  MOVLW  02
03EA:  MOVWF  27
03EC:  RCALL  01D2
....................                     #if defined(LCD_EXTENDED_NEWLINE) 
....................                      g_LcdX = 0; 
....................                      g_LcdY = 0; 
....................                     #endif 
....................                      break; 
03EE:  BRA    0410
....................  
....................      #if defined(LCD_EXTENDED_NEWLINE) 
....................       case '\r'   :  lcd_gotoxy(1, g_LcdY+1);   break; 
....................       case '\n'   : 
....................          while (g_LcdX++ < LCD_LINE_LENGTH) 
....................          { 
....................             lcd_send_byte(1, ' '); 
....................          } 
....................          lcd_gotoxy(1, g_LcdY+2); 
....................          break; 
....................      #else 
....................       case '\n'   : lcd_gotoxy(1,2);        break; 
03F0:  MOVLW  01
03F2:  MOVWF  25
03F4:  MOVLW  02
03F6:  MOVWF  26
03F8:  RCALL  03A0
03FA:  BRA    0410
....................      #endif 
....................       
....................       case '\b'   : lcd_send_byte(0,0x10);  break; 
03FC:  CLRF   29
03FE:  MOVLW  10
0400:  MOVWF  2A
0402:  RCALL  02DE
0404:  BRA    0410
....................       
....................      #if defined(LCD_EXTENDED_NEWLINE) 
....................       default     :  
....................          if (g_LcdX < LCD_LINE_LENGTH) 
....................          { 
....................             lcd_send_byte(1, c); 
....................             g_LcdX++; 
....................          } 
....................          break; 
....................      #else 
....................       default     : lcd_send_byte(1,c);     break; 
0406:  MOVLW  01
0408:  MOVWF  29
040A:  MOVFF  24,2A
040E:  RCALL  02DE
....................      #endif 
....................    } 
0410:  RETURN 0
.................... } 
....................   
.................... char lcd_getc(unsigned int8 x, unsigned int8 y) 
.................... { 
....................    char value; 
....................  
....................    lcd_gotoxy(x,y); 
....................    while ( bit_test(lcd_read_byte(),7) ); // wait until busy flag is low 
....................    lcd_output_rs(1); 
....................    value = lcd_read_byte(); 
....................    lcd_output_rs(0); 
....................     
....................    return(value); 
.................... } 
....................  
.................... // write a custom character to the ram 
.................... // which is 0-7 and specifies which character array we are modifying. 
.................... // ptr points to an array of 8 bytes, where each byte is the next row of 
.................... //    pixels.  only bits 0-4 are used.  the last row is the cursor row, and 
.................... //    usually you will want to leave this byte 0x00. 
.................... void lcd_set_cgram_char(unsigned int8 which, unsigned int8 *ptr) 
.................... { 
....................    unsigned int i; 
....................  
....................    which <<= 3; 
....................    which &= 0x38; 
....................  
....................    lcd_send_byte(0, 0x40 | which);  //set cgram address 
....................  
....................    for(i=0; i<8; i++) 
....................    { 
....................       lcd_send_byte(1, *ptr++); 
....................    } 
....................    
....................    #if defined(LCD_EXTENDED_NEWLINE) 
....................     lcd_gotoxy(g_LcdX+1, g_LcdY+1);  //set ddram address 
....................    #endif 
.................... } 
....................  
.................... void lcd_cursor_on(int1 on) 
.................... { 
....................    if (on) 
....................    { 
....................       lcd_send_byte(0,0x0F);           //turn LCD cursor ON 
....................    } 
....................    else 
....................    { 
....................       lcd_send_byte(0,0x0C);           //turn LCD cursor OFF 
....................    } 
.................... } 
....................  
.................... #endif 
....................  
....................  
....................  
....................  
.................... void main() 
*
0698:  CLRF   FF8
069A:  BCF    FD0.7
069C:  BSF    07.7
069E:  MOVLW  60
06A0:  MOVWF  FD3
06A2:  MOVLW  40
06A4:  MOVWF  F9B
06A6:  MOVF   FD3,W
06A8:  CLRF   19
06AA:  BSF    FB8.3
06AC:  MOVLW  A0
06AE:  MOVWF  FAF
06B0:  MOVLW  01
06B2:  MOVWF  FB0
06B4:  MOVLW  A6
06B6:  MOVWF  FAC
06B8:  MOVLW  90
06BA:  MOVWF  FAB
06BC:  MOVLW  0A
06BE:  MOVWF  1A
06C0:  CLRF   1B
06C2:  CLRF   1C
06C4:  CLRF   1D
06C6:  CLRF   1E
06C8:  CLRF   20
06CA:  CLRF   1F
06CC:  MOVF   FC1,W
06CE:  ANDLW  C0
06D0:  IORLW  0F
06D2:  MOVWF  FC1
06D4:  MOVLW  07
06D6:  MOVWF  FB4
06D8:  CLRF   21
.................... { 
.................... 	unsigned int dispense=0; 
....................  
.................... 	setup_timer_2(T2_DIV_BY_16,178,14);				//716 us overflow, 10.0 ms interrupt 
06DA:  MOVLW  68
06DC:  IORLW  06
06DE:  MOVWF  FCA
06E0:  MOVLW  B2
06E2:  MOVWF  FCB
....................  
....................  
.................... 	enable_interrupts(INT_TIMER2);					// enable timer 2 overflow interrupt 
06E4:  BSF    F9D.1
.................... 	enable_interrupts(GLOBAL);						// enable global interrupts 
06E6:  MOVLW  C0
06E8:  IORWF  FF2,F
.................... 	 
....................    lcd_init();										// initiate LCD 
06EA:  BRA    0324
....................  
.................... 	while(TRUE)										// Main program while loop 
.................... 	{ 
....................  
.................... 		dispense=0; 
06EC:  CLRF   21
.................... 		while(dispense !=1) 
06EE:  DECFSZ 21,W
06F0:  BRA    06F4
06F2:  BRA    0726
.................... 			{ 
.................... 					func1();								// display selection screen 
06F4:  BRA    0432
.................... 					selection=func2(0x07);					// call function 2 too get button value 
06F6:  MOVLW  07
06F8:  MOVWF  22
06FA:  RCALL  047C
06FC:  MOVFF  01,1C
.................... 					func3();								// set screen for sugar 
0700:  BRA    049A
.................... 					sugar=func2(0x07);						// call function 2 too get button value 
0702:  MOVLW  07
0704:  MOVWF  22
0706:  RCALL  047C
0708:  MOVFF  01,1D
.................... 					func4();								// set screen for sugar 
070C:  BRA    04E4
.................... 					milk=func2(0x05);						// call function 2 too get button value 
070E:  MOVLW  05
0710:  MOVWF  22
0712:  RCALL  047C
0714:  MOVFF  01,1E
.................... 					func5();								// display selection 
0718:  BRA    051A
.................... 					dispense=func2(0x03);					// call function 2 too get button value 
071A:  MOVLW  03
071C:  MOVWF  22
071E:  RCALL  047C
0720:  MOVFF  01,21
0724:  BRA    06EE
.................... 			} 
.................... 			printf(lcd_putc,"\f dispensing"); 
0726:  MOVLW  BE
0728:  MOVWF  FF6
072A:  MOVLW  00
072C:  MOVWF  FF7
072E:  RCALL  0412
.................... 			func6();										// dispense 
0730:  BRA    05D2
.................... 			printf(lcd_putc,"\f "); 
0732:  MOVLW  0C
0734:  MOVWF  24
0736:  RCALL  03C2
0738:  MOVLW  20
073A:  MOVWF  24
073C:  RCALL  03C2
.................... 			lcd_gotoxy(21,1); 
073E:  MOVLW  15
0740:  MOVWF  25
0742:  MOVLW  01
0744:  MOVWF  26
0746:  RCALL  03A0
.................... 			printf(lcd_putc,"Take your drink"); 
0748:  MOVLW  CC
074A:  MOVWF  FF6
074C:  MOVLW  00
074E:  MOVWF  FF7
0750:  RCALL  0412
....................  
.................... 			delay_ms(5000); 
0752:  MOVLW  14
0754:  MOVWF  22
0756:  MOVLW  FA
0758:  MOVWF  27
075A:  RCALL  01D2
075C:  DECFSZ 22,F
075E:  BRA    0756
0760:  BRA    06EC
....................  
....................  
.................... 	}												// main program while loop end 
.................... 	 
....................  
.................... }													// END PROGRAM 
....................  
0762:  SLEEP 
.................... void func6()						// dispense the beverage 1sec for tea/choc/coffee 1 sec per sugar, 1 sec for milk and 10secs for water 
.................... 	{ 
.................... 		switch(selection) 
*
05D2:  MOVF   1C,W
05D4:  XORLW  01
05D6:  BZ    05E2
05D8:  XORLW  03
05DA:  BZ    05FA
05DC:  XORLW  06
05DE:  BZ    0612
05E0:  BRA    062A
.................... 			{ 
.................... 				case 1: output_high(m_tea);				// dispanse tea 
05E2:  BCF    F94.0
05E4:  BSF    F8B.0
.................... 						delay_ms(1000); 
05E6:  MOVLW  04
05E8:  MOVWF  22
05EA:  MOVLW  FA
05EC:  MOVWF  27
05EE:  RCALL  01D2
05F0:  DECFSZ 22,F
05F2:  BRA    05EA
.................... 						output_low(m_tea); 
05F4:  BCF    F94.0
05F6:  BCF    F8B.0
.................... 						break; 
05F8:  BRA    062A
.................... 				case 2: output_high(m_cof);				// dispanse coffee 
05FA:  BCF    F94.1
05FC:  BSF    F8B.1
.................... 						delay_ms(1000); 
05FE:  MOVLW  04
0600:  MOVWF  22
0602:  MOVLW  FA
0604:  MOVWF  27
0606:  RCALL  01D2
0608:  DECFSZ 22,F
060A:  BRA    0602
.................... 						output_low(m_cof); 
060C:  BCF    F94.1
060E:  BCF    F8B.1
.................... 						break; 
0610:  BRA    062A
.................... 				case 4: output_high(m_choc);				// dispanse chocolate 
0612:  BCF    F94.2
0614:  BSF    F8B.2
.................... 						delay_ms(1000); 
0616:  MOVLW  04
0618:  MOVWF  22
061A:  MOVLW  FA
061C:  MOVWF  27
061E:  RCALL  01D2
0620:  DECFSZ 22,F
0622:  BRA    061A
.................... 						output_low(m_choc); 
0624:  BCF    F94.2
0626:  BCF    F8B.2
.................... 						break; 
0628:  BRA    062A
.................... 			default   : break; 
.................... 			} 
.................... 		switch(sugar) 
062A:  MOVF   1D,W
062C:  XORLW  02
062E:  BZ    0636
0630:  XORLW  03
0632:  BZ    064C
0634:  BRA    0664
.................... 			{ 
.................... 				case 2: output_high(m_sug);				// dispanse tea 
0636:  BCF    F94.4
0638:  BSF    F8B.4
.................... 						delay_ms(1000); 
063A:  MOVLW  04
063C:  MOVWF  22
063E:  MOVLW  FA
0640:  MOVWF  27
0642:  RCALL  01D2
0644:  DECFSZ 22,F
0646:  BRA    063E
.................... 						output_low(m_sug); 
0648:  BCF    F94.4
064A:  BCF    F8B.4
.................... 				case 1: output_high(m_sug);				// dispanse coffee 
064C:  BCF    F94.4
064E:  BSF    F8B.4
.................... 						delay_ms(1000); 
0650:  MOVLW  04
0652:  MOVWF  22
0654:  MOVLW  FA
0656:  MOVWF  27
0658:  RCALL  01D2
065A:  DECFSZ 22,F
065C:  BRA    0654
.................... 						output_low(m_sug); 
065E:  BCF    F94.4
0660:  BCF    F8B.4
.................... 						break; 
0662:  BRA    0664
.................... 			default   : break; 
.................... 	 
.................... 			} 
.................... 		output_high(m_water);							// dispense water 
0664:  BCF    F94.5
0666:  BSF    F8B.5
.................... 		delay_ms(10000); 
0668:  MOVLW  28
066A:  MOVWF  22
066C:  MOVLW  FA
066E:  MOVWF  27
0670:  RCALL  01D2
0672:  DECFSZ 22,F
0674:  BRA    066C
.................... 		output_low(m_water);	 
0676:  BCF    F94.5
0678:  BCF    F8B.5
.................... 		if(milk==1) 
067A:  DECFSZ 1E,W
067C:  BRA    0694
.................... 			{ 
.................... 				output_high(m_milk);					// dispense milk 
067E:  BCF    F94.3
0680:  BSF    F8B.3
.................... 				delay_ms(1000); 
0682:  MOVLW  04
0684:  MOVWF  22
0686:  MOVLW  FA
0688:  MOVWF  27
068A:  RCALL  01D2
068C:  DECFSZ 22,F
068E:  BRA    0686
.................... 				output_low(m_milk); 
0690:  BCF    F94.3
0692:  BCF    F8B.3
.................... 			} 
0694:  GOTO   0732 (RETURN)
....................  
....................  
.................... 	} 
....................  
.................... void func5(void)														// confirm selection 
.................... 	{ 
.................... 		switch (selection)												// print line 1 
*
051A:  MOVF   1C,W
051C:  XORLW  01
051E:  BZ    052A
0520:  XORLW  03
0522:  BZ    0536
0524:  XORLW  06
0526:  BZ    0542
0528:  BRA    054E
.................... 				{ 
.................... 					case 1: 		printf(lcd_putc,"\f  Tea"); 
052A:  MOVLW  DC
052C:  MOVWF  FF6
052E:  MOVLW  00
0530:  MOVWF  FF7
0532:  RCALL  0412
.................... 									break; 
0534:  BRA    054E
.................... 					case 2:			printf(lcd_putc,"\f  Coffee"); 
0536:  MOVLW  E4
0538:  MOVWF  FF6
053A:  MOVLW  00
053C:  MOVWF  FF7
053E:  RCALL  0412
.................... 									break; 
0540:  BRA    054E
.................... 					case 4:			printf(lcd_putc,"\f  Chocolate"); 
0542:  MOVLW  EE
0544:  MOVWF  FF6
0546:  MOVLW  00
0548:  MOVWF  FF7
054A:  RCALL  0412
.................... 									break; 
054C:  BRA    054E
.................... 					default:		break; 
.................... 				} 
.................... 		lcd_gotoxy(1,2);												// get ready to display line 2 
054E:  MOVLW  01
0550:  MOVWF  25
0552:  MOVLW  02
0554:  MOVWF  26
0556:  RCALL  03A0
.................... 		switch (sugar) 
0558:  MOVF   1D,W
055A:  XORLW  01
055C:  BZ    0568
055E:  XORLW  03
0560:  BZ    0574
0562:  XORLW  06
0564:  BZ    0580
0566:  BRA    058C
.................... 				{ 
.................... 					case 1: 		printf(lcd_putc,"  1 Sugar"); 
0568:  MOVLW  FC
056A:  MOVWF  FF6
056C:  MOVLW  00
056E:  MOVWF  FF7
0570:  RCALL  0412
.................... 									break; 
0572:  BRA    058C
.................... 					case 2:			printf(lcd_putc,"  2 Sugars"); 
0574:  MOVLW  06
0576:  MOVWF  FF6
0578:  MOVLW  01
057A:  MOVWF  FF7
057C:  RCALL  0412
.................... 									break; 
057E:  BRA    058C
.................... 					case 4:			printf(lcd_putc,"  no Sugar"); 
0580:  MOVLW  12
0582:  MOVWF  FF6
0584:  MOVLW  01
0586:  MOVWF  FF7
0588:  RCALL  0412
.................... 									break; 
058A:  BRA    058C
.................... 					default:		break; 
.................... 				} 
.................... 		lcd_gotoxy(21,1);												// get ready to display line 3 
058C:  MOVLW  15
058E:  MOVWF  25
0590:  MOVLW  01
0592:  MOVWF  26
0594:  RCALL  03A0
.................... 		switch (milk) 
0596:  MOVF   1E,W
0598:  XORLW  01
059A:  BZ    05A2
059C:  XORLW  05
059E:  BZ    05AE
05A0:  BRA    05BA
.................... 				{ 
.................... 					case 1: 		printf(lcd_putc,"  Milk"); 
05A2:  MOVLW  1E
05A4:  MOVWF  FF6
05A6:  MOVLW  01
05A8:  MOVWF  FF7
05AA:  RCALL  0412
.................... 									break; 
05AC:  BRA    05BA
.................... 					case 4:			printf(lcd_putc,"  No Milk"); 
05AE:  MOVLW  26
05B0:  MOVWF  FF6
05B2:  MOVLW  01
05B4:  MOVWF  FF7
05B6:  RCALL  0412
.................... 									break; 
05B8:  BRA    05BA
.................... 					default:		break; 
.................... 				} 
.................... 		lcd_gotoxy(21,2);	 
05BA:  MOVLW  15
05BC:  MOVWF  25
05BE:  MOVLW  02
05C0:  MOVWF  26
05C2:  RCALL  03A0
.................... 		printf(lcd_putc,"1 confirm 2 cancel");		 
05C4:  MOVLW  30
05C6:  MOVWF  FF6
05C8:  MOVLW  01
05CA:  MOVWF  FF7
05CC:  RCALL  0412
05CE:  GOTO   071A (RETURN)
.................... 	} 
....................  
.................... void func4(void) 
.................... 	{ 
.................... 		printf(lcd_putc,"\f1.. YES"); 
*
04E4:  MOVLW  44
04E6:  MOVWF  FF6
04E8:  MOVLW  01
04EA:  MOVWF  FF7
04EC:  RCALL  0412
....................  
.................... 		lcd_gotoxy(21,1); 
04EE:  MOVLW  15
04F0:  MOVWF  25
04F2:  MOVLW  01
04F4:  MOVWF  26
04F6:  RCALL  03A0
.................... 		printf(lcd_putc,"3.. NO "); 
04F8:  MOVLW  4E
04FA:  MOVWF  FF6
04FC:  MOVLW  01
04FE:  MOVWF  FF7
0500:  RCALL  0412
.................... 		lcd_gotoxy(21,2); 
0502:  MOVLW  15
0504:  MOVWF  25
0506:  MOVLW  02
0508:  MOVWF  26
050A:  RCALL  03A0
.................... 		printf(lcd_putc,"MILK PLEASE SELECT"); 
050C:  MOVLW  56
050E:  MOVWF  FF6
0510:  MOVLW  01
0512:  MOVWF  FF7
0514:  RCALL  0412
0516:  GOTO   070E (RETURN)
.................... 		 
....................  
.................... 	} 
.................... void func3(void) 
.................... 	{ 
.................... 		printf(lcd_putc,"\f1.. 1 sugar"); 
*
049A:  MOVLW  6A
049C:  MOVWF  FF6
049E:  MOVLW  01
04A0:  MOVWF  FF7
04A2:  RCALL  0412
.................... 		lcd_gotoxy(1,2); 
04A4:  MOVLW  01
04A6:  MOVWF  25
04A8:  MOVLW  02
04AA:  MOVWF  26
04AC:  RCALL  03A0
.................... 		printf(lcd_putc,"2.. 2 sugars"); 
04AE:  MOVLW  78
04B0:  MOVWF  FF6
04B2:  MOVLW  01
04B4:  MOVWF  FF7
04B6:  RCALL  0412
.................... 		lcd_gotoxy(21,1); 
04B8:  MOVLW  15
04BA:  MOVWF  25
04BC:  MOVLW  01
04BE:  MOVWF  26
04C0:  RCALL  03A0
.................... 		printf(lcd_putc,"3.. no sugar"); 
04C2:  MOVLW  86
04C4:  MOVWF  FF6
04C6:  MOVLW  01
04C8:  MOVWF  FF7
04CA:  RCALL  0412
.................... 		lcd_gotoxy(25,2); 
04CC:  MOVLW  19
04CE:  MOVWF  25
04D0:  MOVLW  02
04D2:  MOVWF  26
04D4:  RCALL  03A0
.................... 		printf(lcd_putc,"PLEASE SELECT"); 
04D6:  MOVLW  94
04D8:  MOVWF  FF6
04DA:  MOVLW  01
04DC:  MOVWF  FF7
04DE:  RCALL  0412
04E0:  GOTO   0702 (RETURN)
.................... 		 
....................  
.................... 	} 
....................  
.................... unsigned int func2(unsigned int mask) 
*
047C:  CLRF   23
.................... 	{ 
.................... 		unsigned int buttons=0; 
.................... 		while(input_a()); 
047E:  SETF   F92
0480:  MOVF   F80,W
0482:  BNZ   047E
.................... 		while (!buttons) 
0484:  MOVF   23,F
0486:  BNZ   0494
.................... 			{ 
.................... 				buttons = input_a();						// fetch port A status 
0488:  SETF   F92
048A:  MOVFF  F80,23
.................... 				buttons = buttons & mask;					// remove any unwanted buttons or signals 
048E:  MOVF   22,W
0490:  ANDWF  23,F
0492:  BRA    0484
.................... 			} 
.................... 		return (buttons); 
0494:  MOVFF  23,01
0498:  RETURN 0
....................  
.................... 	} 
....................  
....................  
.................... void func1(void) 
.................... 	{ 
.................... 															// display primary screen 
.................... 		printf(lcd_putc,"\f1.. Tea"); 
*
0432:  MOVLW  A2
0434:  MOVWF  FF6
0436:  MOVLW  01
0438:  MOVWF  FF7
043A:  RCALL  0412
.................... 		lcd_gotoxy(1,2); 
043C:  MOVLW  01
043E:  MOVWF  25
0440:  MOVLW  02
0442:  MOVWF  26
0444:  RCALL  03A0
.................... 		printf(lcd_putc,"2.. Coffee"); 
0446:  MOVLW  AC
0448:  MOVWF  FF6
044A:  MOVLW  01
044C:  MOVWF  FF7
044E:  RCALL  0412
.................... 		lcd_gotoxy(21,1); 
0450:  MOVLW  15
0452:  MOVWF  25
0454:  MOVLW  01
0456:  MOVWF  26
0458:  RCALL  03A0
.................... 		printf(lcd_putc,"3.. Bovril"); 
045A:  MOVLW  B8
045C:  MOVWF  FF6
045E:  MOVLW  01
0460:  MOVWF  FF7
0462:  RCALL  0412
.................... 		lcd_gotoxy(25,2); 
0464:  MOVLW  19
0466:  MOVWF  25
0468:  MOVLW  02
046A:  MOVWF  26
046C:  RCALL  03A0
.................... 		printf(lcd_putc,"PLEASE SELECT"); 
046E:  MOVLW  C4
0470:  MOVWF  FF6
0472:  MOVLW  01
0474:  MOVWF  FF7
0476:  RCALL  0412
0478:  GOTO   06F6 (RETURN)
....................  
.................... 	} 
....................  
....................  

Configuration Fuses:
   Word  1: C800   INTRC_IO FCMEN IESO
   Word  2: 1E1E   PUT BROWNOUT BORV21 NOWDT WDT32768
   Word  3: 0500   CCP2C1 NOPBADEN LPT1OSC NOMCLR
   Word  4: 0081   STVREN NOLVP NOXINST NODEBUG
   Word  5: C00F   NOPROTECT NOCPB NOCPD
   Word  6: E00F   NOWRT NOWRTC NOWRTB NOWRTD
   Word  7: 400F   NOEBTR NOEBTRB
