CCS PCH C Compiler, Version 5.103, 56135               17-May-24 16:18

               Filename:   D:\owncloud8.2\2023-24 assignments\embedded C\Embedded C EES\practical\Wolllands Harry\Harry Woollands - ACDA4013 - Practical\Embedded C Practical\Embedded C Practical\proteus\PIC18F25K22_1\Debug.lst

               ROM used:   1462 bytes (4%)
                           Largest free fragment is 31306
               RAM used:   9 (1%) at main() level
                           24 (2%) worst case
               Stack used: 5 locations
               Stack size: 31

*
0000:  GOTO   0566
.................... #import(file="main.o")
.................... // ***************************************************NOTES FOR GARY************************************************** 
.................... // ***************************************************NOTES FOR GARY************************************************** 
.................... // Routine1(task1) and 3(task3) function as intended, however ONLY when routine2 (task2) is commented out in void main
.................... // Routine 2(task2) runs when Routines1(task1) and 3(task3) are commented out in void main
.................... // Routine 2 performs the 4 tasks required in Task2's breif, however ONLY on 1 push, not 4 separate pushes
.................... // ***************************************************NOTES FOR GARY**************************************************
.................... 
.................... 
.................... 
.................... 
.................... #include <main.h>
.................... #include <18F25K22.h>
.................... //////////// Standard Header file for the PIC18F25K22 device ////////////////
.................... ///////////////////////////////////////////////////////////////////////////
.................... ////        (C) Copyright 1996, 2020 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 PIC18F25K22
0004:  DATA 0C,20
0006:  DATA 20,20
0008:  DATA 20,20
000A:  DATA 20,20
000C:  DATA 20,20
000E:  DATA 25,75
0010:  DATA 20,20
0012:  DATA 00,00
0014:  DATA 20,20
0016:  DATA 20,20
0018:  DATA 20,20
001A:  DATA 20,20
001C:  DATA 20,25
001E:  DATA 75,20
0020:  DATA 20,00
0022:  DATA 20,20
0024:  DATA 20,20
0026:  DATA 20,20
0028:  DATA 20,20
002A:  DATA 20,25
002C:  DATA 75,20
002E:  DATA 20,00
*
0296:  TBLRD*+
0298:  MOVFF  FF6,0B
029C:  MOVFF  FF7,0C
02A0:  MOVFF  FF5,0D
02A4:  RCALL  0246
02A6:  MOVFF  0B,FF6
02AA:  MOVFF  0C,FF7
02AE:  DECFSZ 0A,F
02B0:  BRA    0296
02B2:  RETURN 0
02B4:  MOVF   0D,W
02B6:  CLRF   01
02B8:  SUBWF  0C,W
02BA:  BC    02C2
02BC:  MOVFF  0C,00
02C0:  BRA    02DA
02C2:  CLRF   00
02C4:  MOVLW  08
02C6:  MOVWF  0E
02C8:  RLCF   0C,F
02CA:  RLCF   00,F
02CC:  MOVF   0D,W
02CE:  SUBWF  00,W
02D0:  BTFSC  FD8.0
02D2:  MOVWF  00
02D4:  RLCF   01,F
02D6:  DECFSZ 0E,F
02D8:  BRA    02C8
02DA:  RETURN 0
02DC:  MOVF   01,W
02DE:  MOVFF  0A,0C
02E2:  MOVLW  64
02E4:  MOVWF  0D
02E6:  RCALL  02B4
02E8:  MOVFF  00,0A
02EC:  MOVF   01,W
02EE:  MOVLW  30
02F0:  BNZ   0300
02F2:  BTFSS  0B.1
02F4:  BRA    030E
02F6:  BTFSC  0B.3
02F8:  BRA    030E
02FA:  BTFSC  0B.4
02FC:  MOVLW  20
02FE:  BRA    0306
0300:  BCF    0B.3
0302:  BCF    0B.4
0304:  BSF    0B.0
0306:  ADDWF  01,F
0308:  MOVFF  01,0D
030C:  RCALL  0246
030E:  MOVFF  0A,0C
0312:  MOVLW  0A
0314:  MOVWF  0D
0316:  RCALL  02B4
0318:  MOVFF  00,0A
031C:  MOVF   01,W
031E:  MOVLW  30
0320:  BNZ   032E
0322:  BTFSC  0B.3
0324:  BRA    0336
0326:  BTFSS  0B.0
0328:  BRA    0336
032A:  BTFSC  0B.4
032C:  MOVLW  20
032E:  ADDWF  01,F
0330:  MOVFF  01,0D
0334:  RCALL  0246
0336:  MOVLW  30
0338:  ADDWF  0A,F
033A:  MOVFF  0A,0D
033E:  RCALL  0246
0340:  RETURN 0
.................... 
.................... #list
.................... 
.................... #device ADC=8
.................... 
.................... #FUSES NOWDT                 	//No Watch Dog Timer
.................... #FUSES PRIMARY               	//Primary clock is system clock when scs=00
.................... #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 BORV19                	//Brownout reset at 1.9V
.................... #FUSES CCP3B5                	//CCP3 input/output multiplexed with RB5
.................... #FUSES HFOFST                	//High Frequency INTRC starts clocking CPU immediately
.................... #FUSES TIMER3C0              	//Timer3 Clock In is on pin C0
.................... #FUSES CCP2B5                	//CCP2 input/output multiplexed with RB5
.................... #FUSES NOPROTECT             	//Code not protected from reading
.................... #FUSES NOWRT                 	//Program memory not write protected
.................... #FUSES NOEBTR                	//Memory not protected from table reads
.................... #FUSES NOMCLR
.................... 
.................... #use delay(internal=16MHz)
*
0030:  CLRF   FEA
0032:  MOVLW  0E
0034:  MOVWF  FE9
0036:  MOVF   FEF,W
0038:  BZ    0056
003A:  MOVLW  05
003C:  MOVWF  01
003E:  CLRF   00
0040:  DECFSZ 00,F
0042:  BRA    0040
0044:  DECFSZ 01,F
0046:  BRA    003E
0048:  MOVLW  2E
004A:  MOVWF  00
004C:  DECFSZ 00,F
004E:  BRA    004C
0050:  BRA    0052
0052:  DECFSZ FEF,F
0054:  BRA    003A
0056:  RETURN 0
.................... 
.................... #define LED PIN_C3
.................... #define DELAY 500
.................... 
.................... 
.................... 
.................... #define LCD_ENABLE_PIN PIN_C0
.................... #define LCD_RS_PIN PIN_C2
.................... #define LCD_RW_PIN PIN_C1
.................... #define LCD_DATA4 PIN_C4
.................... #define LCD_DATA5 PIN_C5
.................... #define LCD_DATA6 PIN_C6
.................... #define LCD_DATA7 PIN_C7
.................... 
.................... unsigned int adc1(void);
.................... unsigned int adc2(void);	
.................... unsigned int adc3(void);
.................... unsigned int adc,old_adc;
.................... unsigned int read_but(void);
.................... unsigned int ops,old_ops,a=1;
.................... 
.................... void clear_outputs(void);	
.................... void welcome (void);
.................... void routine1(void);
.................... void routine2(void);
.................... void routine2a(void);
.................... void routine2b(void);
.................... void routine2c(void);
.................... void routine2d(void);
.................... void routine3(void);
.................... 
.................... #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);
*
00F0:  BSF    F94.4
....................    output_float(LCD_DATA5);
00F2:  BSF    F94.5
....................    output_float(LCD_DATA6);
00F4:  BSF    F94.6
....................    output_float(LCD_DATA7);
00F6:  BSF    F94.7
....................   #else
....................    lcdtris.data = 0xF;
....................   #endif
....................  #endif
....................         
....................    lcd_output_rw(1);
00F8:  BSF    F8B.1
00FA:  BCF    F94.1
....................    delay_cycles(1);
00FC:  NOP   
....................    lcd_output_enable(1);
00FE:  BSF    F8B.0
0100:  BCF    F94.0
....................    delay_cycles(1);
0102:  NOP   
....................    high = lcd_read_nibble();
0104:  RCALL  009E
0106:  MOVFF  01,15
....................       
....................    lcd_output_enable(0);
010A:  BCF    F8B.0
010C:  BCF    F94.0
....................    delay_cycles(1);
010E:  NOP   
....................    lcd_output_enable(1);
0110:  BSF    F8B.0
0112:  BCF    F94.0
....................    delay_us(1);
0114:  BRA    0116
0116:  BRA    0118
....................    low = lcd_read_nibble();
0118:  RCALL  009E
011A:  MOVFF  01,14
....................       
....................    lcd_output_enable(0);
011E:  BCF    F8B.0
0120:  BCF    F94.0
.................... 
....................  #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);
0122:  BCF    F94.4
....................    output_drive(LCD_DATA5);
0124:  BCF    F94.5
....................    output_drive(LCD_DATA6);
0126:  BCF    F94.6
....................    output_drive(LCD_DATA7);
0128:  BCF    F94.7
....................   #else
....................    lcdtris.data = 0x0;
....................   #endif
....................  #endif
.................... 
....................    return( (high<<4) | low);
012A:  SWAPF  15,W
012C:  MOVWF  00
012E:  MOVLW  F0
0130:  ANDWF  00,F
0132:  MOVF   00,W
0134:  IORWF  14,W
0136:  MOVWF  01
0138:  GOTO   0148 (RETURN)
.................... }
.................... 
.................... unsigned int8 lcd_read_nibble(void)
.................... {
....................   #if (defined(LCD_DATA4) && defined(LCD_DATA5) && defined(LCD_DATA6) && defined(LCD_DATA7))
*
009E:  CLRF   16
....................    unsigned int8 n = 0x00;
.................... 
....................    /* Read the data port */
....................    n |= input(LCD_DATA4);
00A0:  BSF    F94.4
00A2:  MOVLW  00
00A4:  BTFSC  F82.4
00A6:  MOVLW  01
00A8:  IORWF  16,F
....................    n |= input(LCD_DATA5) << 1;
00AA:  BSF    F94.5
00AC:  MOVLW  00
00AE:  BTFSC  F82.5
00B0:  MOVLW  01
00B2:  MOVWF  00
00B4:  BCF    FD8.0
00B6:  RLCF   00,F
00B8:  MOVF   00,W
00BA:  IORWF  16,F
....................    n |= input(LCD_DATA6) << 2;
00BC:  BSF    F94.6
00BE:  MOVLW  00
00C0:  BTFSC  F82.6
00C2:  MOVLW  01
00C4:  MOVWF  00
00C6:  RLCF   00,F
00C8:  RLCF   00,F
00CA:  MOVLW  FC
00CC:  ANDWF  00,F
00CE:  MOVF   00,W
00D0:  IORWF  16,F
....................    n |= input(LCD_DATA7) << 3;
00D2:  BSF    F94.7
00D4:  MOVLW  00
00D6:  BTFSC  F82.7
00D8:  MOVLW  01
00DA:  MOVWF  00
00DC:  RLCF   00,F
00DE:  RLCF   00,F
00E0:  RLCF   00,F
00E2:  MOVLW  F8
00E4:  ANDWF  00,F
00E6:  MOVF   00,W
00E8:  IORWF  16,F
....................    
....................    return(n);
00EA:  MOVFF  16,01
....................   #else
00EE:  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));
*
0058:  BTFSC  15.0
005A:  BRA    0060
005C:  BCF    F8B.4
005E:  BRA    0062
0060:  BSF    F8B.4
0062:  BCF    F94.4
....................    output_bit(LCD_DATA5, bit_test(n, 1));
0064:  BTFSC  15.1
0066:  BRA    006C
0068:  BCF    F8B.5
006A:  BRA    006E
006C:  BSF    F8B.5
006E:  BCF    F94.5
....................    output_bit(LCD_DATA6, bit_test(n, 2));
0070:  BTFSC  15.2
0072:  BRA    0078
0074:  BCF    F8B.6
0076:  BRA    007A
0078:  BSF    F8B.6
007A:  BCF    F94.6
....................    output_bit(LCD_DATA7, bit_test(n, 3));
007C:  BTFSC  15.3
007E:  BRA    0084
0080:  BCF    F8B.7
0082:  BRA    0086
0084:  BSF    F8B.7
0086:  BCF    F94.7
....................   #else      
....................    lcdlat.data = n;
....................   #endif
....................       
....................    delay_cycles(1);
0088:  NOP   
....................    lcd_output_enable(1);
008A:  BSF    F8B.0
008C:  BCF    F94.0
....................    delay_us(2);
008E:  MOVLW  02
0090:  MOVWF  00
0092:  DECFSZ 00,F
0094:  BRA    0092
0096:  NOP   
....................    lcd_output_enable(0);
0098:  BCF    F8B.0
009A:  BCF    F94.0
009C:  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();
*
013C:  BCF    F94.0
....................    lcd_rs_tris();
013E:  BCF    F94.2
....................    lcd_rw_tris();
0140:  BCF    F94.1
....................   #endif
.................... 
....................    lcd_output_rs(0);
0142:  BCF    F8B.2
0144:  BCF    F94.2
....................    while ( bit_test(lcd_read_byte(),7) ) ;
0146:  BRA    00F0
0148:  MOVFF  01,14
014C:  BTFSC  01.7
014E:  BRA    0146
....................    lcd_output_rs(address);
0150:  MOVF   12,F
0152:  BNZ   0158
0154:  BCF    F8B.2
0156:  BRA    015A
0158:  BSF    F8B.2
015A:  BCF    F94.2
....................    delay_cycles(1);
015C:  NOP   
....................    lcd_output_rw(0);
015E:  BCF    F8B.1
0160:  BCF    F94.1
....................    delay_cycles(1);
0162:  NOP   
....................    lcd_output_enable(0);
0164:  BCF    F8B.0
0166:  BCF    F94.0
....................    lcd_send_nibble(n >> 4);
0168:  SWAPF  13,W
016A:  MOVWF  14
016C:  MOVLW  0F
016E:  ANDWF  14,F
0170:  MOVFF  14,15
0174:  RCALL  0058
....................    lcd_send_nibble(n & 0xf);
0176:  MOVF   13,W
0178:  ANDLW  0F
017A:  MOVWF  14
017C:  MOVWF  15
017E:  RCALL  0058
0180:  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};
0182:  MOVLW  28
0184:  MOVWF  0A
0186:  MOVLW  0C
0188:  MOVWF  0B
018A:  MOVLW  01
018C:  MOVWF  0C
018E:  MOVLW  06
0190:  MOVWF  0D
....................                              // These bytes need to be sent to the LCD
....................                              // to start it up.
....................    
.................... 
....................    lcd_output_enable(0);
0192:  BCF    F8B.0
0194:  BCF    F94.0
....................    lcd_output_rs(0);
0196:  BCF    F8B.2
0198:  BCF    F94.2
....................    lcd_output_rw(0);
019A:  BCF    F8B.1
019C:  BCF    F94.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);
019E:  BCF    F94.4
....................    output_drive(LCD_DATA5);
01A0:  BCF    F94.5
....................    output_drive(LCD_DATA6);
01A2:  BCF    F94.6
....................    output_drive(LCD_DATA7);
01A4:  BCF    F94.7
....................   #else
....................    lcdtris.data = 0x0;
....................   #endif
....................    lcd_enable_tris();
01A6:  BCF    F94.0
....................    lcd_rs_tris();
01A8:  BCF    F94.2
....................    lcd_rw_tris();
01AA:  BCF    F94.1
....................  #endif
....................     
....................    delay_ms(15);
01AC:  MOVLW  0F
01AE:  MOVWF  0E
01B0:  RCALL  0030
....................    for(i=1;i<=3;++i)
01B2:  MOVLW  01
01B4:  MOVWF  09
01B6:  MOVF   09,W
01B8:  SUBLW  03
01BA:  BNC   01CC
....................    {
....................        lcd_send_nibble(3);
01BC:  MOVLW  03
01BE:  MOVWF  15
01C0:  RCALL  0058
....................        delay_ms(5);
01C2:  MOVLW  05
01C4:  MOVWF  0E
01C6:  RCALL  0030
01C8:  INCF   09,F
01CA:  BRA    01B6
....................    }
....................    
....................    lcd_send_nibble(2);
01CC:  MOVLW  02
01CE:  MOVWF  15
01D0:  RCALL  0058
....................    delay_ms(5);
01D2:  MOVLW  05
01D4:  MOVWF  0E
01D6:  RCALL  0030
....................    for(i=0;i<=3;++i)
01D8:  CLRF   09
01DA:  MOVF   09,W
01DC:  SUBLW  03
01DE:  BNC   01FA
....................       lcd_send_byte(0,LCD_INIT_STRING[i]);
01E0:  CLRF   03
01E2:  MOVF   09,W
01E4:  ADDLW  0A
01E6:  MOVWF  FE9
01E8:  MOVLW  00
01EA:  ADDWFC 03,W
01EC:  MOVWF  FEA
01EE:  MOVFF  FEF,13
01F2:  CLRF   12
01F4:  RCALL  013C
.................... 
....................   #if defined(LCD_EXTENDED_NEWLINE)
01F6:  INCF   09,F
01F8:  BRA    01DA
01FA:  GOTO   05AC (RETURN)
....................    g_LcdX = 0;
....................    g_LcdY = 0;
....................   #endif
.................... }
.................... 
.................... void lcd_gotoxy(unsigned int8 x, unsigned int8 y)
.................... {
....................    unsigned int8 address;
....................    
....................    if(y!=1)
*
0224:  DECFSZ 0F,W
0226:  BRA    022A
0228:  BRA    0230
....................       address=LCD_LINE_TWO;
022A:  MOVLW  40
022C:  MOVWF  10
022E:  BRA    0232
....................    else
....................       address=0;
0230:  CLRF   10
....................      
....................    address+=x-1;
0232:  MOVLW  01
0234:  SUBWF  0E,W
0236:  ADDWF  10,F
....................    lcd_send_byte(0,0x80|address);
0238:  MOVF   10,W
023A:  IORLW  80
023C:  MOVWF  11
023E:  CLRF   12
0240:  MOVWF  13
0242:  RCALL  013C
.................... 
....................   #if defined(LCD_EXTENDED_NEWLINE)
0244:  RETURN 0
....................    g_LcdX = x - 1;
....................    g_LcdY = y - 1;
....................   #endif
.................... }
.................... 
.................... void lcd_putc(char c)
.................... {
....................    switch (c)
0246:  MOVF   0D,W
0248:  XORLW  07
024A:  BZ    025A
024C:  XORLW  0B
024E:  BZ    0264
0250:  XORLW  06
0252:  BZ    0274
0254:  XORLW  02
0256:  BZ    0280
0258:  BRA    028A
....................    {
....................       case '\a'   :  lcd_gotoxy(1,1);     break;
025A:  MOVLW  01
025C:  MOVWF  0E
025E:  MOVWF  0F
0260:  RCALL  0224
0262:  BRA    0294
.................... 
....................       case '\f'   :  lcd_send_byte(0,1);
0264:  CLRF   12
0266:  MOVLW  01
0268:  MOVWF  13
026A:  RCALL  013C
....................                      delay_ms(2);
026C:  MOVLW  02
026E:  MOVWF  0E
0270:  RCALL  0030
....................                     #if defined(LCD_EXTENDED_NEWLINE)
....................                      g_LcdX = 0;
....................                      g_LcdY = 0;
....................                     #endif
....................                      break;
0272:  BRA    0294
.................... 
....................      #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;
0274:  MOVLW  01
0276:  MOVWF  0E
0278:  MOVLW  02
027A:  MOVWF  0F
027C:  RCALL  0224
027E:  BRA    0294
....................      #endif
....................      
....................       case '\b'   : lcd_send_byte(0,0x10);  break;
0280:  CLRF   12
0282:  MOVLW  10
0284:  MOVWF  13
0286:  RCALL  013C
0288:  BRA    0294
....................      
....................      #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;
028A:  MOVLW  01
028C:  MOVWF  12
028E:  MOVFF  0D,13
0292:  RCALL  013C
....................      #endif
....................    }
0294:  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()
*
0566:  CLRF   FF8
0568:  BCF    FD0.7
056A:  MOVLW  70
056C:  MOVWF  FD3
056E:  BCF    F9B.6
0570:  BCF    F9B.7
0572:  MOVLW  01
0574:  MOVWF  08
0576:  MOVF   FC1,W
0578:  ANDLW  F0
057A:  MOVWF  FC1
057C:  MOVLW  00
057E:  MOVLB  F
0580:  MOVWF  x38
0582:  MOVWF  x39
0584:  MOVWF  x3A
0586:  CLRF   F77
0588:  CLRF   F78
058A:  CLRF   F79
.................... {
.................... 	setup_adc_ports(sAN0 | sAN1 | sAN2, VSS_VDD);
058C:  MOVF   FC1,W
058E:  ANDLW  F0
0590:  MOVWF  FC1
0592:  MOVLW  07
0594:  MOVWF  x38
0596:  MOVLW  00
0598:  MOVWF  x39
059A:  MOVWF  x3A
.................... 	setup_adc(ADC_CLOCK_INTERNAL | ADC_TAD_MUL_0);
059C:  MOVF   FC0,W
059E:  ANDLW  C0
05A0:  IORLW  07
05A2:  MOVWF  FC0
05A4:  BCF    FC0.7
05A6:  BSF    FC2.0
.................... 
....................    lcd_init();
05A8:  MOVLB  0
05AA:  BRA    0182
....................  
.................... 	while(TRUE)
.................... 	{
.................... 			routine1();					
05AC:  BRA    038E
.................... 			routine2();
05AE:  BRA    04C2
.................... 			routine3();	
05B0:  BRA    04F8
05B2:  BRA    05AC
.................... 	}
.................... 
.................... }
.................... 
05B4:  SLEEP 
.................... 
.................... 
.................... void routine1(void)
....................    {
....................       
....................       printf(lcd_putc,"\f         %u  ", adc1());
*
038E:  RCALL  01FE
0390:  MOVFF  01,09
0394:  MOVLW  04
0396:  MOVWF  FF6
0398:  MOVLW  00
039A:  MOVWF  FF7
039C:  MOVLW  0A
039E:  MOVWF  0A
03A0:  RCALL  0296
03A2:  MOVFF  09,0A
03A6:  MOVLW  1B
03A8:  MOVWF  0B
03AA:  RCALL  02DC
03AC:  MOVLW  20
03AE:  MOVWF  0D
03B0:  RCALL  0246
03B2:  MOVLW  20
03B4:  MOVWF  0D
03B6:  RCALL  0246
....................       lcd_gotoxy(1,2);						
03B8:  MOVLW  01
03BA:  MOVWF  0E
03BC:  MOVLW  02
03BE:  MOVWF  0F
03C0:  RCALL  0224
....................       printf(lcd_putc,"         %u  ", adc2()); 
03C2:  RCALL  0342
03C4:  MOVFF  01,09
03C8:  MOVLW  14
03CA:  MOVWF  FF6
03CC:  MOVLW  00
03CE:  MOVWF  FF7
03D0:  MOVLW  09
03D2:  MOVWF  0A
03D4:  RCALL  0296
03D6:  MOVFF  09,0A
03DA:  MOVLW  1B
03DC:  MOVWF  0B
03DE:  RCALL  02DC
03E0:  MOVLW  20
03E2:  MOVWF  0D
03E4:  RCALL  0246
03E6:  MOVLW  20
03E8:  MOVWF  0D
03EA:  RCALL  0246
....................       lcd_gotoxy(21,1);
03EC:  MOVLW  15
03EE:  MOVWF  0E
03F0:  MOVLW  01
03F2:  MOVWF  0F
03F4:  RCALL  0224
....................       printf(lcd_putc,"         %u  ", adc3());
03F6:  RCALL  0368
03F8:  MOVFF  01,09
03FC:  MOVLW  22
03FE:  MOVWF  FF6
0400:  MOVLW  00
0402:  MOVWF  FF7
0404:  MOVLW  09
0406:  MOVWF  0A
0408:  RCALL  0296
040A:  MOVFF  09,0A
040E:  MOVLW  1B
0410:  MOVWF  0B
0412:  RCALL  02DC
0414:  MOVLW  20
0416:  MOVWF  0D
0418:  RCALL  0246
041A:  MOVLW  20
041C:  MOVWF  0D
041E:  RCALL  0246
....................       delay_ms(1000); 
0420:  MOVLW  04
0422:  MOVWF  09
0424:  MOVLW  FA
0426:  MOVWF  0E
0428:  RCALL  0030
042A:  DECFSZ 09,F
042C:  BRA    0424
042E:  GOTO   05AE (RETURN)
....................    }
....................    
.................... void routine2()
....................    {
....................       while(TRUE)
....................       {
....................           ops=read_but();
*
04C2:  BRA    0432
04C4:  MOVFF  01,06
.................... 
....................           if(ops!=old_ops)    
04C8:  MOVF   07,W
04CA:  SUBWF  06,W
04CC:  BZ    04EE
.................... 		  {
....................           switch(ops)
04CE:  MOVF   06,W
04D0:  XORLW  01
04D2:  BZ    04E2
04D4:  XORLW  03
04D6:  BZ    04E4
04D8:  XORLW  06
04DA:  BZ    04E6
04DC:  XORLW  0C
04DE:  BZ    04E8
04E0:  BRA    04EA
....................                   {
....................                         case 1:           routine2a();
04E2:  BRA    0442
.................... 					  //break;
....................                         case 2:           routine2b();
04E4:  BRA    0462
.................... 					  //break;
....................                         case 4:           routine2c();
04E6:  BRA    0482
.................... 					  //break;
.................... 			case 8:           routine2d();
04E8:  BRA    04A2
.................... 					  //break;
....................                         //default:    	  break;
....................                   }
.................... 				  a*=2;
04EA:  BCF    FD8.0
04EC:  RLCF   08,F
.................... 			  }
....................             old_ops=ops;
04EE:  MOVFF  06,07
04F2:  BRA    04C2
.................... 
....................       }
04F4:  GOTO   05B0 (RETURN)
....................    }
.................... 
.................... void routine2a(void)
....................       {
.................... 	 if(old_ops!=ops)									
*
0442:  MOVF   06,W
0444:  SUBWF  07,W
0446:  BZ    045E
.................... 		  {
.................... 				 output_high(PIN_A7);							
0448:  BCF    F92.7
044A:  BSF    F89.7
.................... 				 output_low(PIN_A6); 
044C:  BCF    F92.6
044E:  BCF    F89.6
.................... 				 delay_ms(2000);
0450:  MOVLW  08
0452:  MOVWF  09
0454:  MOVLW  FA
0456:  MOVWF  0E
0458:  RCALL  0030
045A:  DECFSZ 09,F
045C:  BRA    0454
.................... 		  }
045E:  GOTO   04E4 (RETURN)
.................... 	//clear_outputs();	
....................       }
....................       
.................... void routine2b(void)
....................       {
.................... 	    if(old_ops!=ops)									
0462:  MOVF   06,W
0464:  SUBWF  07,W
0466:  BZ    047E
.................... 		  {
.................... 				 output_low(PIN_A6);							
0468:  BCF    F92.6
046A:  BCF    F89.6
.................... 				 output_low(PIN_A7); 
046C:  BCF    F92.7
046E:  BCF    F89.7
.................... 				 delay_ms(2000);
0470:  MOVLW  08
0472:  MOVWF  09
0474:  MOVLW  FA
0476:  MOVWF  0E
0478:  RCALL  0030
047A:  DECFSZ 09,F
047C:  BRA    0474
.................... 		  }
047E:  GOTO   04E6 (RETURN)
.................... 	//clear_outputs();	
....................       }
....................       
.................... void routine2c(void)
....................       {
.................... 	if(old_ops!=ops)									
0482:  MOVF   06,W
0484:  SUBWF  07,W
0486:  BZ    049E
.................... 		  {
.................... 				 output_low(PIN_A7);							
0488:  BCF    F92.7
048A:  BCF    F89.7
.................... 				 output_high(PIN_A6); 
048C:  BCF    F92.6
048E:  BSF    F89.6
.................... 				 delay_ms(2000);
0490:  MOVLW  08
0492:  MOVWF  09
0494:  MOVLW  FA
0496:  MOVWF  0E
0498:  RCALL  0030
049A:  DECFSZ 09,F
049C:  BRA    0494
.................... 		  }
049E:  GOTO   04E8 (RETURN)
.................... 	//clear_outputs();
....................       }
....................       
.................... void routine2d(void)
....................       {
.................... 	if(old_ops!=ops)									
04A2:  MOVF   06,W
04A4:  SUBWF  07,W
04A6:  BZ    04BE
.................... 		  {
.................... 				 output_low(PIN_A6);							
04A8:  BCF    F92.6
04AA:  BCF    F89.6
.................... 				 output_low(PIN_A7); 
04AC:  BCF    F92.7
04AE:  BCF    F89.7
.................... 				 delay_ms(2000);
04B0:  MOVLW  08
04B2:  MOVWF  09
04B4:  MOVLW  FA
04B6:  MOVWF  0E
04B8:  RCALL  0030
04BA:  DECFSZ 09,F
04BC:  BRA    04B4
.................... 		  }
04BE:  GOTO   04EA (RETURN)
.................... 	//clear_outputs();
....................       }
....................       
.................... void routine3(void)                         								 
.................... 	{
.................... 	   if(input(PIN_A5))
*
04F8:  BSF    F92.5
04FA:  BTFSS  F80.5
04FC:  BRA    055A
.................... 	      {
.................... 		adc = adc1();										
04FE:  RCALL  01FE
0500:  MOVFF  01,04
.................... 		if(old_adc!=adc)									
0504:  MOVF   04,W
0506:  SUBWF  05,W
0508:  BZ    051E
.................... 		  {
.................... 		     output_b(adc);									
050A:  CLRF   F93
050C:  MOVFF  04,F8A
.................... 		     delay_ms(2000);
0510:  MOVLW  08
0512:  MOVWF  09
0514:  MOVLW  FA
0516:  MOVWF  0E
0518:  RCALL  0030
051A:  DECFSZ 09,F
051C:  BRA    0514
.................... 		  }
.................... 		old_adc = adc;										
051E:  MOVFF  04,05
.................... 		adc = adc2();										
0522:  RCALL  0342
0524:  MOVFF  01,04
.................... 		if(old_adc!=adc)									
0528:  MOVF   04,W
052A:  SUBWF  05,W
052C:  BZ    0542
.................... 		  {
.................... 		     output_b(adc);									
052E:  CLRF   F93
0530:  MOVFF  04,F8A
.................... 		     delay_ms(2000);
0534:  MOVLW  08
0536:  MOVWF  09
0538:  MOVLW  FA
053A:  MOVWF  0E
053C:  RCALL  0030
053E:  DECFSZ 09,F
0540:  BRA    0538
.................... 		  }
.................... 		old_adc = adc;	
0542:  MOVFF  04,05
.................... 		adc = adc3();										
0546:  RCALL  0368
0548:  MOVFF  01,04
.................... 		if(old_adc!=adc)									
054C:  MOVF   04,W
054E:  SUBWF  05,W
0550:  BZ    0558
.................... 		  {
.................... 		     output_b(adc);									
0552:  CLRF   F93
0554:  MOVFF  04,F8A
.................... 		  }
.................... 	       }
0558:  BRA    055E
.................... 	    else
.................... 	    {
.................... 	       output_b(0x00);
055A:  CLRF   F93
055C:  CLRF   F8A
.................... 	    }
.................... 	    old_adc = adc;	
055E:  MOVFF  04,05
0562:  GOTO   05B2 (RETURN)
.................... 	}
.................... 
.................... unsigned int adc1(void)										
.................... 	{	
.................... 		unsigned int adc1_value;									
.................... 		set_adc_channel(0);									
*
01FE:  MOVLW  00
0200:  MOVWF  01
0202:  MOVF   FC2,W
0204:  ANDLW  83
0206:  IORWF  01,W
0208:  MOVWF  FC2
.................... 		delay_us(20);										
020A:  MOVLW  1A
020C:  MOVWF  00
020E:  DECFSZ 00,F
0210:  BRA    020E
0212:  NOP   
.................... 		adc1_value=read_adc();									
0214:  BSF    FC2.1
0216:  BTFSC  FC2.1
0218:  BRA    0216
021A:  MOVFF  FC4,09
.................... 		return(adc1_value);										
021E:  MOVFF  09,01
0222:  RETURN 0
.................... 	}
.................... 	
.................... unsigned int adc2()											
.................... 	{
.................... 		unsigned int adc2_value;									
.................... 		set_adc_channel(1);									
*
0342:  MOVLW  04
0344:  MOVWF  01
0346:  MOVF   FC2,W
0348:  ANDLW  83
034A:  IORWF  01,W
034C:  MOVWF  FC2
.................... 		delay_us(20);										
034E:  MOVLW  1A
0350:  MOVWF  00
0352:  DECFSZ 00,F
0354:  BRA    0352
0356:  NOP   
.................... 		adc2_value = read_adc();									
0358:  BSF    FC2.1
035A:  BTFSC  FC2.1
035C:  BRA    035A
035E:  MOVFF  FC4,09
.................... 		return(adc2_value);									
0362:  MOVFF  09,01
0366:  RETURN 0
.................... 	}
.................... 
.................... unsigned int adc3()											
.................... 	{
.................... 		unsigned int adc3_value;									
.................... 		set_adc_channel(2);									
0368:  MOVLW  08
036A:  MOVWF  01
036C:  MOVF   FC2,W
036E:  ANDLW  83
0370:  IORWF  01,W
0372:  MOVWF  FC2
.................... 		delay_us(20);										
0374:  MOVLW  1A
0376:  MOVWF  00
0378:  DECFSZ 00,F
037A:  BRA    0378
037C:  NOP   
.................... 		adc3_value = read_adc();									
037E:  BSF    FC2.1
0380:  BTFSC  FC2.1
0382:  BRA    0380
0384:  MOVFF  FC4,09
.................... 		return(adc3_value);									
0388:  MOVFF  09,01
038C:  RETURN 0
.................... 	}
.................... 	
.................... void clear_outputs(void)										
.................... 	 {
.................... 		output_b(0x00);																									
.................... 		output_low(pin_A6);									
.................... 		output_low(pin_A7);
.................... 	        adc = 0;
.................... 		old_adc = 0;
.................... 	 }
.................... 	 
.................... unsigned int read_but(void)
....................       {
....................             unsigned int buttons;
....................             buttons = input(PIN_A4);               
*
0432:  BSF    F92.4
0434:  CLRF   09
0436:  BTFSC  F80.4
0438:  INCF   09,F
....................             return(buttons);                    
043A:  MOVFF  09,01
043E:  GOTO   04C4 (RETURN)
....................       }
.................... 

Configuration Fuses:
   Word  1: E800   INTRC_IO NOPLLEN PRIMARY FCMEN IESO
   Word  2: 3C1E   PUT BROWNOUT BORV19 NOWDT WDT32768
   Word  3: 3F00   CCP2C1 PBADEN CCP3B5 HFOFST TIMER3C0 CCP2B5 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
