
_interrupt:

;SimPLC.c,126 :: 		void interrupt() {
;SimPLC.c,129 :: 		if (USBIF_bit) {
	BTFSS       USBIF_bit+0, BitPos(USBIF_bit+0) 
	GOTO        L_interrupt0
;SimPLC.c,130 :: 		USB_Interrupt_Proc();
	CALL        _USB_Interrupt_Proc+0, 0
;SimPLC.c,131 :: 		}
L_interrupt0:
;SimPLC.c,135 :: 		if (T0IF_bit) { // 1ms Interrupt
	BTFSS       T0IF_bit+0, BitPos(T0IF_bit+0) 
	GOTO        L_interrupt1
;SimPLC.c,139 :: 		TMR0H = 0xD1;
	MOVLW       209
	MOVWF       TMR0H+0 
;SimPLC.c,140 :: 		TMR0L = 0x20;
	MOVLW       32
	MOVWF       TMR0L+0 
;SimPLC.c,141 :: 		gsm1msPing();
	CALL        _gsm1msPing+0, 0
;SimPLC.c,142 :: 		if (wrdRB7Tmr < 65535) {wrdRB7Tmr++;}
	MOVLW       255
	SUBWF       _wrdRB7Tmr+1, 0 
	BTFSS       STATUS+0, 2 
	GOTO        L__interrupt51
	MOVLW       255
	SUBWF       _wrdRB7Tmr+0, 0 
L__interrupt51:
	BTFSC       STATUS+0, 0 
	GOTO        L_interrupt2
	INFSNZ      _wrdRB7Tmr+0, 1 
	INCF        _wrdRB7Tmr+1, 1 
L_interrupt2:
;SimPLC.c,144 :: 		if (wrdLcdTmr) {wrdLcdTmr--;}
	MOVF        _wrdLcdTmr+0, 0 
	IORWF       _wrdLcdTmr+1, 0 
	BTFSC       STATUS+0, 2 
	GOTO        L_interrupt3
	MOVLW       1
	SUBWF       _wrdLcdTmr+0, 1 
	MOVLW       0
	SUBWFB      _wrdLcdTmr+1, 1 
L_interrupt3:
;SimPLC.c,146 :: 		T0IF_bit = 0; // Clear interrupt flag
	BCF         T0IF_bit+0, BitPos(T0IF_bit+0) 
;SimPLC.c,147 :: 		}
L_interrupt1:
;SimPLC.c,149 :: 		}
L_end_interrupt:
L__interrupt50:
	RETFIE      1
; end of _interrupt

_setup:

;SimPLC.c,151 :: 		void setup() {
;SimPLC.c,152 :: 		OSCCON = 0b01110000; //8MHz
	MOVLW       112
	MOVWF       OSCCON+0 
;SimPLC.c,153 :: 		PLLEN_bit = 1; //Enable PLL (48MHz now)
	BSF         PLLEN_bit+0, BitPos(PLLEN_bit+0) 
;SimPLC.c,154 :: 		TRISD = 0b00000000; //PortD all outputs
	CLRF        TRISD+0 
;SimPLC.c,155 :: 		LATD = 0b00000000; //PortD all off by default
	CLRF        LATD+0 
;SimPLC.c,158 :: 		LCD_BL_Direction = 0; //Output
	BCF         TRISA5_bit+0, BitPos(TRISA5_bit+0) 
;SimPLC.c,160 :: 		TRISB = 0b11111111; //PortB all inputs
	MOVLW       255
	MOVWF       TRISB+0 
;SimPLC.c,161 :: 		GSM_Pwr_Key_Dir = 0;
	BCF         TRISE2_bit+0, BitPos(TRISE2_bit+0) 
;SimPLC.c,162 :: 		GSM_Stat_Dir = 1;
	BSF         TRISE0_bit+0, BitPos(TRISE0_bit+0) 
;SimPLC.c,163 :: 		ANCON0 = 0b11111111; //All pins digital
	MOVLW       255
	MOVWF       ANCON0+0 
;SimPLC.c,164 :: 		ANCON1 = 0b00011111; //All pins digital
	MOVLW       31
	MOVWF       ANCON1+0 
;SimPLC.c,165 :: 		RBPU_bit = 0; //PortB Weak Pull-Ups Enabled
	BCF         RBPU_bit+0, BitPos(RBPU_bit+0) 
;SimPLC.c,166 :: 		IPEN_bit = 0; //Interrupt priority disable
	BCF         IPEN_bit+0, BitPos(IPEN_bit+0) 
;SimPLC.c,167 :: 		GIE_bit = 1; //Global interrupt enable
	BSF         GIE_bit+0, BitPos(GIE_bit+0) 
;SimPLC.c,168 :: 		PEIE_bit = 1; //Peripheral interrupt enable
	BSF         PEIE_bit+0, BitPos(PEIE_bit+0) 
;SimPLC.c,170 :: 		HID_Enable(&USBin,&USBout); // Enable HID communication
	MOVLW       _USBin+0
	MOVWF       FARG_HID_Enable_readbuff+0 
	MOVLW       hi_addr(_USBin+0)
	MOVWF       FARG_HID_Enable_readbuff+1 
	MOVLW       _USBout+0
	MOVWF       FARG_HID_Enable_writebuff+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_HID_Enable_writebuff+1 
	CALL        _HID_Enable+0, 0
;SimPLC.c,173 :: 		T0CON = 0b10001000; //Timer0 On, 16-bit, internal clock, pre-scaler not assgnd
	MOVLW       136
	MOVWF       T0CON+0 
;SimPLC.c,174 :: 		T0IE_bit = 1; //Enable Timer0 overflow interrupts
	BSF         T0IE_bit+0, BitPos(T0IE_bit+0) 
;SimPLC.c,175 :: 		}
L_end_setup:
	RETURN      0
; end of _setup

_startup:

;SimPLC.c,177 :: 		void startup() {
;SimPLC.c,183 :: 		UART1_Init(9600);
	BSF         BAUDCON+0, 3, 0
	MOVLW       4
	MOVWF       SPBRGH+0 
	MOVLW       225
	MOVWF       SPBRG+0 
	BSF         TXSTA+0, 2, 0
	CALL        _UART1_Init+0, 0
;SimPLC.c,184 :: 		gsmInit();
	CALL        _gsmInit+0, 0
;SimPLC.c,185 :: 		gsm_MS_Init();
	CALL        _gsm_MS_Init+0, 0
;SimPLC.c,186 :: 		gsm_Msg_Init(); // Requires GSM_Msg module
	CALL        _gsm_Msg_Init+0, 0
;SimPLC.c,187 :: 		gsm_GPRS_Init(); // Requires GSM_GPRS module
	CALL        _gsm_GPRS_Init+0, 0
;SimPLC.c,188 :: 		RTCC_Init();
	CALL        _RTCC_Init+0, 0
;SimPLC.c,189 :: 		dtmRTCC.Year = 14; dtmRTCC.Month = 1; dtmRTCC.Day = 1;
	MOVLW       14
	MOVWF       _dtmRTCC+0 
	MOVLW       1
	MOVWF       _dtmRTCC+1 
	MOVLW       1
	MOVWF       _dtmRTCC+2 
;SimPLC.c,190 :: 		dtmRTCC.Hour = 0; dtmRTCC.Minute = 0; dtmRTCC.Second = 0;
	CLRF        _dtmRTCC+3 
	CLRF        _dtmRTCC+4 
	CLRF        _dtmRTCC+5 
;SimPLC.c,191 :: 		RTCC_Write();
	CALL        _RTCC_Write+0, 0
;SimPLC.c,192 :: 		bitRTCC_Set = 0;
	BCF         _bitRTCC_Set+0, BitPos(_bitRTCC_Set+0) 
;SimPLC.c,194 :: 		LCD_BL = 1;
	BSF         LATA5_bit+0, BitPos(LATA5_bit+0) 
;SimPLC.c,195 :: 		LCD_Init();
	CALL        _Lcd_Init+0, 0
;SimPLC.c,196 :: 		LCD_Cmd(_LCD_CURSOR_OFF);
	MOVLW       12
	MOVWF       FARG_Lcd_Cmd_out_char+0 
	CALL        _Lcd_Cmd+0, 0
;SimPLC.c,197 :: 		LCD_Cmd(_LCD_CLEAR);
	MOVLW       1
	MOVWF       FARG_Lcd_Cmd_out_char+0 
	CALL        _Lcd_Cmd+0, 0
;SimPLC.c,198 :: 		Lcd_Out(1,6,"SimPLC");
	MOVLW       1
	MOVWF       FARG_Lcd_Out_row+0 
	MOVLW       6
	MOVWF       FARG_Lcd_Out_column+0 
	MOVLW       ?lstr1_SimPLC+0
	MOVWF       FARG_Lcd_Out_text+0 
	MOVLW       hi_addr(?lstr1_SimPLC+0)
	MOVWF       FARG_Lcd_Out_text+1 
	CALL        _Lcd_Out+0, 0
;SimPLC.c,199 :: 		Lcd_Out(2,1,"www.dizzy.co.za");
	MOVLW       2
	MOVWF       FARG_Lcd_Out_row+0 
	MOVLW       1
	MOVWF       FARG_Lcd_Out_column+0 
	MOVLW       ?lstr2_SimPLC+0
	MOVWF       FARG_Lcd_Out_text+0 
	MOVLW       hi_addr(?lstr2_SimPLC+0)
	MOVWF       FARG_Lcd_Out_text+1 
	CALL        _Lcd_Out+0, 0
;SimPLC.c,200 :: 		wrdLcdTmr = 5000;
	MOVLW       136
	MOVWF       _wrdLcdTmr+0 
	MOVLW       19
	MOVWF       _wrdLcdTmr+1 
;SimPLC.c,202 :: 		}
L_end_startup:
	RETURN      0
; end of _startup

_rtccSet:

;SimPLC.c,222 :: 		void rtccSet() {
;SimPLC.c,231 :: 		RTCC_Write();
	CALL        _RTCC_Write+0, 0
;SimPLC.c,232 :: 		bitRTCC_Set = 1;
	BSF         _bitRTCC_Set+0, BitPos(_bitRTCC_Set+0) 
;SimPLC.c,233 :: 		}
L_end_rtccSet:
	RETURN      0
; end of _rtccSet

_ByteToBin:

;SimPLC.c,235 :: 		void ByteToBin(char input, char *output) {
;SimPLC.c,237 :: 		for (mask = 0b10000000; mask != 0; mask = mask >> 1) {
	MOVLW       128
	MOVWF       R1 
L_ByteToBin4:
	MOVF        R1, 0 
	XORLW       0
	BTFSC       STATUS+0, 2 
	GOTO        L_ByteToBin5
;SimPLC.c,238 :: 		if (input & mask) *output = '1'; else *output = '0';
	MOVF        R1, 0 
	ANDWF       FARG_ByteToBin_input+0, 0 
	MOVWF       R0 
	BTFSC       STATUS+0, 2 
	GOTO        L_ByteToBin7
	MOVFF       FARG_ByteToBin_output+0, FSR1
	MOVFF       FARG_ByteToBin_output+1, FSR1H
	MOVLW       49
	MOVWF       POSTINC1+0 
	GOTO        L_ByteToBin8
L_ByteToBin7:
	MOVFF       FARG_ByteToBin_output+0, FSR1
	MOVFF       FARG_ByteToBin_output+1, FSR1H
	MOVLW       48
	MOVWF       POSTINC1+0 
L_ByteToBin8:
;SimPLC.c,239 :: 		output++;
	INFSNZ      FARG_ByteToBin_output+0, 1 
	INCF        FARG_ByteToBin_output+1, 1 
;SimPLC.c,237 :: 		for (mask = 0b10000000; mask != 0; mask = mask >> 1) {
	RRCF        R1, 1 
	BCF         R1, 7 
;SimPLC.c,240 :: 		}
	GOTO        L_ByteToBin4
L_ByteToBin5:
;SimPLC.c,241 :: 		*output = 0; // Mark the end of the string
	MOVFF       FARG_ByteToBin_output+0, FSR1
	MOVFF       FARG_ByteToBin_output+1, FSR1H
	CLRF        POSTINC1+0 
;SimPLC.c,242 :: 		}
L_end_ByteToBin:
	RETURN      0
; end of _ByteToBin

_generateStatusReport:

;SimPLC.c,244 :: 		void generateStatusReport(char *dest) {
;SimPLC.c,245 :: 		strcpy(dest, "PORTA:");
	MOVF        FARG_generateStatusReport_dest+0, 0 
	MOVWF       FARG_strcpy_to+0 
	MOVF        FARG_generateStatusReport_dest+1, 0 
	MOVWF       FARG_strcpy_to+1 
	MOVLW       ?lstr3_SimPLC+0
	MOVWF       FARG_strcpy_from+0 
	MOVLW       hi_addr(?lstr3_SimPLC+0)
	MOVWF       FARG_strcpy_from+1 
	CALL        _strcpy+0, 0
;SimPLC.c,246 :: 		dest += 6;
	MOVLW       6
	ADDWF       FARG_generateStatusReport_dest+0, 0 
	MOVWF       R0 
	MOVLW       0
	ADDWFC      FARG_generateStatusReport_dest+1, 0 
	MOVWF       R1 
	MOVF        R0, 0 
	MOVWF       FARG_generateStatusReport_dest+0 
	MOVF        R1, 0 
	MOVWF       FARG_generateStatusReport_dest+1 
;SimPLC.c,247 :: 		ByteToBin(PORTA, dest);
	MOVF        PORTA+0, 0 
	MOVWF       FARG_ByteToBin_input+0 
	MOVF        R0, 0 
	MOVWF       FARG_ByteToBin_output+0 
	MOVF        R1, 0 
	MOVWF       FARG_ByteToBin_output+1 
	CALL        _ByteToBin+0, 0
;SimPLC.c,248 :: 		dest += 8;
	MOVLW       8
	ADDWF       FARG_generateStatusReport_dest+0, 0 
	MOVWF       R0 
	MOVLW       0
	ADDWFC      FARG_generateStatusReport_dest+1, 0 
	MOVWF       R1 
	MOVF        R0, 0 
	MOVWF       FARG_generateStatusReport_dest+0 
	MOVF        R1, 0 
	MOVWF       FARG_generateStatusReport_dest+1 
;SimPLC.c,249 :: 		*dest++ = ',';
	MOVFF       R0, FSR1
	MOVFF       R1, FSR1H
	MOVLW       44
	MOVWF       POSTINC1+0 
	INFSNZ      FARG_generateStatusReport_dest+0, 1 
	INCF        FARG_generateStatusReport_dest+1, 1 
;SimPLC.c,250 :: 		strcpy(dest, "PORTB:");
	MOVF        FARG_generateStatusReport_dest+0, 0 
	MOVWF       FARG_strcpy_to+0 
	MOVF        FARG_generateStatusReport_dest+1, 0 
	MOVWF       FARG_strcpy_to+1 
	MOVLW       ?lstr4_SimPLC+0
	MOVWF       FARG_strcpy_from+0 
	MOVLW       hi_addr(?lstr4_SimPLC+0)
	MOVWF       FARG_strcpy_from+1 
	CALL        _strcpy+0, 0
;SimPLC.c,251 :: 		dest += 6;
	MOVLW       6
	ADDWF       FARG_generateStatusReport_dest+0, 0 
	MOVWF       R0 
	MOVLW       0
	ADDWFC      FARG_generateStatusReport_dest+1, 0 
	MOVWF       R1 
	MOVF        R0, 0 
	MOVWF       FARG_generateStatusReport_dest+0 
	MOVF        R1, 0 
	MOVWF       FARG_generateStatusReport_dest+1 
;SimPLC.c,252 :: 		ByteToBin(PORTB, dest);
	MOVF        PORTB+0, 0 
	MOVWF       FARG_ByteToBin_input+0 
	MOVF        R0, 0 
	MOVWF       FARG_ByteToBin_output+0 
	MOVF        R1, 0 
	MOVWF       FARG_ByteToBin_output+1 
	CALL        _ByteToBin+0, 0
;SimPLC.c,253 :: 		dest += 8;
	MOVLW       8
	ADDWF       FARG_generateStatusReport_dest+0, 0 
	MOVWF       R0 
	MOVLW       0
	ADDWFC      FARG_generateStatusReport_dest+1, 0 
	MOVWF       R1 
	MOVF        R0, 0 
	MOVWF       FARG_generateStatusReport_dest+0 
	MOVF        R1, 0 
	MOVWF       FARG_generateStatusReport_dest+1 
;SimPLC.c,254 :: 		*dest++ = ',';
	MOVFF       R0, FSR1
	MOVFF       R1, FSR1H
	MOVLW       44
	MOVWF       POSTINC1+0 
	INFSNZ      FARG_generateStatusReport_dest+0, 1 
	INCF        FARG_generateStatusReport_dest+1, 1 
;SimPLC.c,255 :: 		strcpy(dest, "LATD:");
	MOVF        FARG_generateStatusReport_dest+0, 0 
	MOVWF       FARG_strcpy_to+0 
	MOVF        FARG_generateStatusReport_dest+1, 0 
	MOVWF       FARG_strcpy_to+1 
	MOVLW       ?lstr5_SimPLC+0
	MOVWF       FARG_strcpy_from+0 
	MOVLW       hi_addr(?lstr5_SimPLC+0)
	MOVWF       FARG_strcpy_from+1 
	CALL        _strcpy+0, 0
;SimPLC.c,256 :: 		dest += 5;
	MOVLW       5
	ADDWF       FARG_generateStatusReport_dest+0, 0 
	MOVWF       R0 
	MOVLW       0
	ADDWFC      FARG_generateStatusReport_dest+1, 0 
	MOVWF       R1 
	MOVF        R0, 0 
	MOVWF       FARG_generateStatusReport_dest+0 
	MOVF        R1, 0 
	MOVWF       FARG_generateStatusReport_dest+1 
;SimPLC.c,257 :: 		ByteToBin(LATD, dest);
	MOVF        LATD+0, 0 
	MOVWF       FARG_ByteToBin_input+0 
	MOVF        R0, 0 
	MOVWF       FARG_ByteToBin_output+0 
	MOVF        R1, 0 
	MOVWF       FARG_ByteToBin_output+1 
	CALL        _ByteToBin+0, 0
;SimPLC.c,258 :: 		}
L_end_generateStatusReport:
	RETURN      0
; end of _generateStatusReport

_msgSend:

;SimPLC.c,260 :: 		void msgSend() {
;SimPLC.c,262 :: 		strcpy(&USBout, "Sending message to ");
	MOVLW       _USBout+0
	MOVWF       FARG_strcpy_to+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_strcpy_to+1 
	MOVLW       ?lstr6_SimPLC+0
	MOVWF       FARG_strcpy_from+0 
	MOVLW       hi_addr(?lstr6_SimPLC+0)
	MOVWF       FARG_strcpy_from+1 
	CALL        _strcpy+0, 0
;SimPLC.c,263 :: 		strcat(&USBout, &strDestID);
	MOVLW       _USBout+0
	MOVWF       FARG_strcat_to+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_strcat_to+1 
	MOVLW       _strDestID+0
	MOVWF       FARG_strcat_from+0 
	MOVLW       hi_addr(_strDestID+0)
	MOVWF       FARG_strcat_from+1 
	CALL        _strcat+0, 0
;SimPLC.c,264 :: 		strcat(&USBout, ":\r\n");
	MOVLW       _USBout+0
	MOVWF       FARG_strcat_to+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_strcat_to+1 
	MOVLW       ?lstr7_SimPLC+0
	MOVWF       FARG_strcat_from+0 
	MOVLW       hi_addr(?lstr7_SimPLC+0)
	MOVWF       FARG_strcat_from+1 
	CALL        _strcat+0, 0
;SimPLC.c,265 :: 		HID_Write(&USBout, 64);
	MOVLW       _USBout+0
	MOVWF       FARG_HID_Write_writebuff+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_HID_Write_writebuff+1 
	MOVLW       64
	MOVWF       FARG_HID_Write_len+0 
	CALL        _HID_Write+0, 0
;SimPLC.c,266 :: 		strncpyExNewLine(&USBout, &strMsgSendTxt, 64);
	MOVLW       _USBout+0
	MOVWF       FARG_strncpyExNewLine_to+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_strncpyExNewLine_to+1 
	MOVLW       _strMsgSendTxt+0
	MOVWF       FARG_strncpyExNewLine_from+0 
	MOVLW       hi_addr(_strMsgSendTxt+0)
	MOVWF       FARG_strncpyExNewLine_from+1 
	MOVLW       64
	MOVWF       FARG_strncpyExNewLine_size+0 
	CALL        _strncpyExNewLine+0, 0
;SimPLC.c,267 :: 		HID_Write(&USBout, 64);
	MOVLW       _USBout+0
	MOVWF       FARG_HID_Write_writebuff+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_HID_Write_writebuff+1 
	MOVLW       64
	MOVWF       FARG_HID_Write_len+0 
	CALL        _HID_Write+0, 0
;SimPLC.c,269 :: 		if (strDestID[0] != 0) {
	MOVF        _strDestID+0, 0 
	XORLW       0
	BTFSC       STATUS+0, 2 
	GOTO        L_msgSend9
;SimPLC.c,270 :: 		if (gsmMsgSendPending()) {gsmMsgSendCancel();} // Cancel any message waiting to be sent
	CALL        _gsmMsgSendPending+0, 0
	MOVF        R0, 1 
	BTFSC       STATUS+0, 2 
	GOTO        L_msgSend10
	CALL        _gsmMsgSendCancel+0, 0
L_msgSend10:
;SimPLC.c,271 :: 		gsmMsgSend(&strMsgSendTxt, &strDestID);
	MOVLW       _strMsgSendTxt+0
	MOVWF       FARG_gsmMsgSend_Message+0 
	MOVLW       hi_addr(_strMsgSendTxt+0)
	MOVWF       FARG_gsmMsgSend_Message+1 
	MOVLW       _strDestID+0
	MOVWF       FARG_gsmMsgSend_DestinationID+0 
	MOVLW       hi_addr(_strDestID+0)
	MOVWF       FARG_gsmMsgSend_DestinationID+1 
	CALL        _gsmMsgSend+0, 0
;SimPLC.c,272 :: 		}
L_msgSend9:
;SimPLC.c,273 :: 		}
L_end_msgSend:
	RETURN      0
; end of _msgSend

_gsmMissedCall:

;SimPLC.c,275 :: 		void gsmMissedCall(char *OriginatorID) {
;SimPLC.c,277 :: 		LCD_Cmd(_LCD_Clear);
	MOVLW       1
	MOVWF       FARG_Lcd_Cmd_out_char+0 
	CALL        _Lcd_Cmd+0, 0
;SimPLC.c,278 :: 		LCD_Out(1,1,OriginatorID);
	MOVLW       1
	MOVWF       FARG_Lcd_Out_row+0 
	MOVLW       1
	MOVWF       FARG_Lcd_Out_column+0 
	MOVF        FARG_gsmMissedCall_OriginatorID+0, 0 
	MOVWF       FARG_Lcd_Out_text+0 
	MOVF        FARG_gsmMissedCall_OriginatorID+1, 0 
	MOVWF       FARG_Lcd_Out_text+1 
	CALL        _Lcd_Out+0, 0
;SimPLC.c,279 :: 		LCD_Out(2,1,"(Missed call)");
	MOVLW       2
	MOVWF       FARG_Lcd_Out_row+0 
	MOVLW       1
	MOVWF       FARG_Lcd_Out_column+0 
	MOVLW       ?lstr8_SimPLC+0
	MOVWF       FARG_Lcd_Out_text+0 
	MOVLW       hi_addr(?lstr8_SimPLC+0)
	MOVWF       FARG_Lcd_Out_text+1 
	CALL        _Lcd_Out+0, 0
;SimPLC.c,280 :: 		wrdLcdTmr = 2500;
	MOVLW       196
	MOVWF       _wrdLcdTmr+0 
	MOVLW       9
	MOVWF       _wrdLcdTmr+1 
;SimPLC.c,282 :: 		LATD0_bit = !LATD0_bit; // Toggle PortD.0
	BTG         LATD0_bit+0, BitPos(LATD0_bit+0) 
;SimPLC.c,283 :: 		if (strDestID[0] == 0) {
	MOVF        _strDestID+0, 0 
	XORLW       0
	BTFSS       STATUS+0, 2 
	GOTO        L_gsmMissedCall11
;SimPLC.c,284 :: 		strcpy(&strDestID, OriginatorID);
	MOVLW       _strDestID+0
	MOVWF       FARG_strcpy_to+0 
	MOVLW       hi_addr(_strDestID+0)
	MOVWF       FARG_strcpy_to+1 
	MOVF        FARG_gsmMissedCall_OriginatorID+0, 0 
	MOVWF       FARG_strcpy_from+0 
	MOVF        FARG_gsmMissedCall_OriginatorID+1, 0 
	MOVWF       FARG_strcpy_from+1 
	CALL        _strcpy+0, 0
;SimPLC.c,285 :: 		}
L_gsmMissedCall11:
;SimPLC.c,286 :: 		}
L_end_gsmMissedCall:
	RETURN      0
; end of _gsmMissedCall

_gsmMsgRcvd:

;SimPLC.c,288 :: 		void gsmMsgRcvd(char *MessageText, char *OriginatorID) {
;SimPLC.c,290 :: 		LCD_Cmd(_LCD_Clear);
	MOVLW       1
	MOVWF       FARG_Lcd_Cmd_out_char+0 
	CALL        _Lcd_Cmd+0, 0
;SimPLC.c,291 :: 		LCD_Out(1,1,OriginatorID);
	MOVLW       1
	MOVWF       FARG_Lcd_Out_row+0 
	MOVLW       1
	MOVWF       FARG_Lcd_Out_column+0 
	MOVF        FARG_gsmMsgRcvd_OriginatorID+0, 0 
	MOVWF       FARG_Lcd_Out_text+0 
	MOVF        FARG_gsmMsgRcvd_OriginatorID+1, 0 
	MOVWF       FARG_Lcd_Out_text+1 
	CALL        _Lcd_Out+0, 0
;SimPLC.c,292 :: 		LCD_Out(2,1,MessageText);
	MOVLW       2
	MOVWF       FARG_Lcd_Out_row+0 
	MOVLW       1
	MOVWF       FARG_Lcd_Out_column+0 
	MOVF        FARG_gsmMsgRcvd_MessageText+0, 0 
	MOVWF       FARG_Lcd_Out_text+0 
	MOVF        FARG_gsmMsgRcvd_MessageText+1, 0 
	MOVWF       FARG_Lcd_Out_text+1 
	CALL        _Lcd_Out+0, 0
;SimPLC.c,293 :: 		wrdLcdTmr = 2500;
	MOVLW       196
	MOVWF       _wrdLcdTmr+0 
	MOVLW       9
	MOVWF       _wrdLcdTmr+1 
;SimPLC.c,295 :: 		if (strDestID[0] == 0) { // If the destination ID has not yet been set then
	MOVF        _strDestID+0, 0 
	XORLW       0
	BTFSS       STATUS+0, 2 
	GOTO        L_gsmMsgRcvd12
;SimPLC.c,296 :: 		strcpy(&strDestID, OriginatorID); // Copy it from the originator ID
	MOVLW       _strDestID+0
	MOVWF       FARG_strcpy_to+0 
	MOVLW       hi_addr(_strDestID+0)
	MOVWF       FARG_strcpy_to+1 
	MOVF        FARG_gsmMsgRcvd_OriginatorID+0, 0 
	MOVWF       FARG_strcpy_from+0 
	MOVF        FARG_gsmMsgRcvd_OriginatorID+1, 0 
	MOVWF       FARG_strcpy_from+1 
	CALL        _strcpy+0, 0
;SimPLC.c,297 :: 		}                                   // (reply to sender)
L_gsmMsgRcvd12:
;SimPLC.c,298 :: 		if (gsmMsgJustArrived() == 1) {
	CALL        _gsmMsgJustArrived+0, 0
	MOVF        R0, 0 
	XORLW       1
	BTFSS       STATUS+0, 2 
	GOTO        L_gsmMsgRcvd13
;SimPLC.c,301 :: 		memcpy(&dtmRTCC, &dtmGsmEvent, 6);
	MOVLW       _dtmRTCC+0
	MOVWF       FARG_memcpy_d1+0 
	MOVLW       hi_addr(_dtmRTCC+0)
	MOVWF       FARG_memcpy_d1+1 
	MOVLW       _dtmGsmEvent+0
	MOVWF       FARG_memcpy_s1+0 
	MOVLW       hi_addr(_dtmGsmEvent+0)
	MOVWF       FARG_memcpy_s1+1 
	MOVLW       6
	MOVWF       FARG_memcpy_n+0 
	MOVLW       0
	MOVWF       FARG_memcpy_n+1 
	CALL        _memcpy+0, 0
;SimPLC.c,302 :: 		rtccSet();
	CALL        _rtccSet+0, 0
;SimPLC.c,303 :: 		gsmDateTimeWrite();
	CALL        _gsmDateTimeWrite+0, 0
;SimPLC.c,304 :: 		}
L_gsmMsgRcvd13:
;SimPLC.c,305 :: 		lcase(MessageText); // Convert the entire message to lower case
	MOVF        FARG_gsmMsgRcvd_MessageText+0, 0 
	MOVWF       FARG_lcase_string+0 
	MOVF        FARG_gsmMsgRcvd_MessageText+1, 0 
	MOVWF       FARG_lcase_string+1 
	CALL        _lcase+0, 0
;SimPLC.c,307 :: 		if (*(MessageText + 1) == 'n') { // Looking for "on"
	MOVLW       1
	ADDWF       FARG_gsmMsgRcvd_MessageText+0, 0 
	MOVWF       FSR0 
	MOVLW       0
	ADDWFC      FARG_gsmMsgRcvd_MessageText+1, 0 
	MOVWF       FSR0H 
	MOVF        POSTINC0+0, 0 
	XORLW       110
	BTFSS       STATUS+0, 2 
	GOTO        L_gsmMsgRcvd14
;SimPLC.c,308 :: 		LATD = 0xFF;
	MOVLW       255
	MOVWF       LATD+0 
;SimPLC.c,309 :: 		} else if (*(MessageText + 1) == 'f') { // Looking for "off"
	GOTO        L_gsmMsgRcvd15
L_gsmMsgRcvd14:
	MOVLW       1
	ADDWF       FARG_gsmMsgRcvd_MessageText+0, 0 
	MOVWF       FSR0 
	MOVLW       0
	ADDWFC      FARG_gsmMsgRcvd_MessageText+1, 0 
	MOVWF       FSR0H 
	MOVF        POSTINC0+0, 0 
	XORLW       102
	BTFSS       STATUS+0, 2 
	GOTO        L_gsmMsgRcvd16
;SimPLC.c,310 :: 		LATD = 0x00;
	CLRF        LATD+0 
;SimPLC.c,311 :: 		} else if (*MessageText == 'c') { // Query clock
	GOTO        L_gsmMsgRcvd17
L_gsmMsgRcvd16:
	MOVFF       FARG_gsmMsgRcvd_MessageText+0, FSR0
	MOVFF       FARG_gsmMsgRcvd_MessageText+1, FSR0H
	MOVF        POSTINC0+0, 0 
	XORLW       99
	BTFSS       STATUS+0, 2 
	GOTO        L_gsmMsgRcvd18
;SimPLC.c,312 :: 		strcpy(&strMsgSendTxt, "SimPLC Date/Time: ");
	MOVLW       _strMsgSendTxt+0
	MOVWF       FARG_strcpy_to+0 
	MOVLW       hi_addr(_strMsgSendTxt+0)
	MOVWF       FARG_strcpy_to+1 
	MOVLW       ?lstr9_SimPLC+0
	MOVWF       FARG_strcpy_from+0 
	MOVLW       hi_addr(?lstr9_SimPLC+0)
	MOVWF       FARG_strcpy_from+1 
	CALL        _strcpy+0, 0
;SimPLC.c,313 :: 		RTCC_GenerateString(&dtmRTCC, &strMsgSendTxt + 18);
	MOVLW       _dtmRTCC+0
	MOVWF       FARG_RTCC_GenerateString_dt+0 
	MOVLW       hi_addr(_dtmRTCC+0)
	MOVWF       FARG_RTCC_GenerateString_dt+1 
	MOVLW       _strMsgSendTxt+18
	MOVWF       FARG_RTCC_GenerateString_rtccstring+0 
	MOVLW       hi_addr(_strMsgSendTxt+18)
	MOVWF       FARG_RTCC_GenerateString_rtccstring+1 
	CALL        _RTCC_GenerateString+0, 0
;SimPLC.c,314 :: 		msgSend();
	CALL        _msgSend+0, 0
;SimPLC.c,315 :: 		} else if (memcmp(MessageText, "stat", 4) == 0) { //Status report
	GOTO        L_gsmMsgRcvd19
L_gsmMsgRcvd18:
	MOVF        FARG_gsmMsgRcvd_MessageText+0, 0 
	MOVWF       FARG_memcmp_s1+0 
	MOVF        FARG_gsmMsgRcvd_MessageText+1, 0 
	MOVWF       FARG_memcmp_s1+1 
	MOVLW       ?lstr10_SimPLC+0
	MOVWF       FARG_memcmp_s2+0 
	MOVLW       hi_addr(?lstr10_SimPLC+0)
	MOVWF       FARG_memcmp_s2+1 
	MOVLW       4
	MOVWF       FARG_memcmp_n+0 
	MOVLW       0
	MOVWF       FARG_memcmp_n+1 
	CALL        _memcmp+0, 0
	MOVLW       0
	XORWF       R1, 0 
	BTFSS       STATUS+0, 2 
	GOTO        L__gsmMsgRcvd60
	MOVLW       0
	XORWF       R0, 0 
L__gsmMsgRcvd60:
	BTFSS       STATUS+0, 2 
	GOTO        L_gsmMsgRcvd20
;SimPLC.c,316 :: 		generateStatusReport(&strMsgSendTxt);
	MOVLW       _strMsgSendTxt+0
	MOVWF       FARG_generateStatusReport_dest+0 
	MOVLW       hi_addr(_strMsgSendTxt+0)
	MOVWF       FARG_generateStatusReport_dest+1 
	CALL        _generateStatusReport+0, 0
;SimPLC.c,317 :: 		msgSend();
	CALL        _msgSend+0, 0
;SimPLC.c,318 :: 		} else if (memcmp(MessageText, "please call ", 12) == 0) { // "Please Call Me"
	GOTO        L_gsmMsgRcvd21
L_gsmMsgRcvd20:
	MOVF        FARG_gsmMsgRcvd_MessageText+0, 0 
	MOVWF       FARG_memcmp_s1+0 
	MOVF        FARG_gsmMsgRcvd_MessageText+1, 0 
	MOVWF       FARG_memcmp_s1+1 
	MOVLW       ?lstr11_SimPLC+0
	MOVWF       FARG_memcmp_s2+0 
	MOVLW       hi_addr(?lstr11_SimPLC+0)
	MOVWF       FARG_memcmp_s2+1 
	MOVLW       12
	MOVWF       FARG_memcmp_n+0 
	MOVLW       0
	MOVWF       FARG_memcmp_n+1 
	CALL        _memcmp+0, 0
	MOVLW       0
	XORWF       R1, 0 
	BTFSS       STATUS+0, 2 
	GOTO        L__gsmMsgRcvd61
	MOVLW       0
	XORWF       R0, 0 
L__gsmMsgRcvd61:
	BTFSS       STATUS+0, 2 
	GOTO        L_gsmMsgRcvd22
;SimPLC.c,319 :: 		LATD1_bit = !LATD1_bit;
	BTG         LATD1_bit+0, BitPos(LATD1_bit+0) 
;SimPLC.c,320 :: 		generateStatusReport(&strMsgSendTxt);
	MOVLW       _strMsgSendTxt+0
	MOVWF       FARG_generateStatusReport_dest+0 
	MOVLW       hi_addr(_strMsgSendTxt+0)
	MOVWF       FARG_generateStatusReport_dest+1 
	CALL        _generateStatusReport+0, 0
;SimPLC.c,321 :: 		msgSend();
	CALL        _msgSend+0, 0
;SimPLC.c,322 :: 		}
L_gsmMsgRcvd22:
L_gsmMsgRcvd21:
L_gsmMsgRcvd19:
L_gsmMsgRcvd17:
L_gsmMsgRcvd15:
;SimPLC.c,323 :: 		}
L_end_gsmMsgRcvd:
	RETURN      0
; end of _gsmMsgRcvd

_gsmEvent:

;SimPLC.c,325 :: 		void gsmEvent(char GsmEventType) {
;SimPLC.c,326 :: 		switch (GsmEventType) {
	GOTO        L_gsmEvent23
;SimPLC.c,327 :: 		case gsmevntPIN_Request:
L_gsmEvent25:
;SimPLC.c,329 :: 		break;
	GOTO        L_gsmEvent24
;SimPLC.c,330 :: 		case gsmevntPIN_Fail:
L_gsmEvent26:
;SimPLC.c,332 :: 		strcpy(&USBout, "PIN entry failed\r\n");
	MOVLW       _USBout+0
	MOVWF       FARG_strcpy_to+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_strcpy_to+1 
	MOVLW       ?lstr12_SimPLC+0
	MOVWF       FARG_strcpy_from+0 
	MOVLW       hi_addr(?lstr12_SimPLC+0)
	MOVWF       FARG_strcpy_from+1 
	CALL        _strcpy+0, 0
;SimPLC.c,333 :: 		HID_Write(&USBout, 64);
	MOVLW       _USBout+0
	MOVWF       FARG_HID_Write_writebuff+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_HID_Write_writebuff+1 
	MOVLW       64
	MOVWF       FARG_HID_Write_len+0 
	CALL        _HID_Write+0, 0
;SimPLC.c,335 :: 		break;
	GOTO        L_gsmEvent24
;SimPLC.c,336 :: 		case gsmevntMissedCall:
L_gsmEvent27:
;SimPLC.c,337 :: 		gsmMissedCall(pstrGsmEventOriginatorID);
	MOVF        _pstrGsmEventOriginatorID+0, 0 
	MOVWF       FARG_gsmMissedCall_OriginatorID+0 
	MOVF        _pstrGsmEventOriginatorID+1, 0 
	MOVWF       FARG_gsmMissedCall_OriginatorID+1 
	CALL        _gsmMissedCall+0, 0
;SimPLC.c,338 :: 		break;
	GOTO        L_gsmEvent24
;SimPLC.c,339 :: 		case gsmevntMsgRcvd:
L_gsmEvent28:
;SimPLC.c,340 :: 		gsmMsgRcvd(pstrGsmEventData, pstrGsmEventOriginatorID);
	MOVF        _pstrGsmEventData+0, 0 
	MOVWF       FARG_gsmMsgRcvd_MessageText+0 
	MOVF        _pstrGsmEventData+1, 0 
	MOVWF       FARG_gsmMsgRcvd_MessageText+1 
	MOVF        _pstrGsmEventOriginatorID+0, 0 
	MOVWF       FARG_gsmMsgRcvd_OriginatorID+0 
	MOVF        _pstrGsmEventOriginatorID+1, 0 
	MOVWF       FARG_gsmMsgRcvd_OriginatorID+1 
	CALL        _gsmMsgRcvd+0, 0
;SimPLC.c,341 :: 		break;
	GOTO        L_gsmEvent24
;SimPLC.c,342 :: 		case gsmevntMsgSent:
L_gsmEvent29:
;SimPLC.c,344 :: 		strcpy(&USBout, "Message sent\r\n");
	MOVLW       _USBout+0
	MOVWF       FARG_strcpy_to+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_strcpy_to+1 
	MOVLW       ?lstr13_SimPLC+0
	MOVWF       FARG_strcpy_from+0 
	MOVLW       hi_addr(?lstr13_SimPLC+0)
	MOVWF       FARG_strcpy_from+1 
	CALL        _strcpy+0, 0
;SimPLC.c,345 :: 		HID_Write(&USBout, 64);
	MOVLW       _USBout+0
	MOVWF       FARG_HID_Write_writebuff+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_HID_Write_writebuff+1 
	MOVLW       64
	MOVWF       FARG_HID_Write_len+0 
	CALL        _HID_Write+0, 0
;SimPLC.c,347 :: 		break;
	GOTO        L_gsmEvent24
;SimPLC.c,348 :: 		case gsmevntMsgDiscarded:
L_gsmEvent30:
;SimPLC.c,349 :: 		case gsmevntMsgSendFailed:
L_gsmEvent31:
;SimPLC.c,351 :: 		strcpy(&USBout, "Message send failed\r\n");
	MOVLW       _USBout+0
	MOVWF       FARG_strcpy_to+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_strcpy_to+1 
	MOVLW       ?lstr14_SimPLC+0
	MOVWF       FARG_strcpy_from+0 
	MOVLW       hi_addr(?lstr14_SimPLC+0)
	MOVWF       FARG_strcpy_from+1 
	CALL        _strcpy+0, 0
;SimPLC.c,352 :: 		HID_Write(&USBout, 64);
	MOVLW       _USBout+0
	MOVWF       FARG_HID_Write_writebuff+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_HID_Write_writebuff+1 
	MOVLW       64
	MOVWF       FARG_HID_Write_len+0 
	CALL        _HID_Write+0, 0
;SimPLC.c,354 :: 		break;
	GOTO        L_gsmEvent24
;SimPLC.c,355 :: 		case gsmevntGprsHttpResponseLine:
L_gsmEvent32:
;SimPLC.c,356 :: 		if (bitGsmGprsFirstLine) {
	BTFSS       _bitGsmGprsFirstLine+0, BitPos(_bitGsmGprsFirstLine+0) 
	GOTO        L_gsmEvent33
;SimPLC.c,358 :: 		LCD_Cmd(_LCD_Clear);
	MOVLW       1
	MOVWF       FARG_Lcd_Cmd_out_char+0 
	CALL        _Lcd_Cmd+0, 0
;SimPLC.c,359 :: 		LCD_Out(1,1,"HTTP Result:");
	MOVLW       1
	MOVWF       FARG_Lcd_Out_row+0 
	MOVLW       1
	MOVWF       FARG_Lcd_Out_column+0 
	MOVLW       ?lstr15_SimPLC+0
	MOVWF       FARG_Lcd_Out_text+0 
	MOVLW       hi_addr(?lstr15_SimPLC+0)
	MOVWF       FARG_Lcd_Out_text+1 
	CALL        _Lcd_Out+0, 0
;SimPLC.c,360 :: 		LCD_Out(2,1,pstrGsmEventData);
	MOVLW       2
	MOVWF       FARG_Lcd_Out_row+0 
	MOVLW       1
	MOVWF       FARG_Lcd_Out_column+0 
	MOVF        _pstrGsmEventData+0, 0 
	MOVWF       FARG_Lcd_Out_text+0 
	MOVF        _pstrGsmEventData+1, 0 
	MOVWF       FARG_Lcd_Out_text+1 
	CALL        _Lcd_Out+0, 0
;SimPLC.c,361 :: 		wrdLcdTmr = 2500;
	MOVLW       196
	MOVWF       _wrdLcdTmr+0 
	MOVLW       9
	MOVWF       _wrdLcdTmr+1 
;SimPLC.c,363 :: 		bitGsmGprsFirstLine = 0;
	BCF         _bitGsmGprsFirstLine+0, BitPos(_bitGsmGprsFirstLine+0) 
;SimPLC.c,364 :: 		}
L_gsmEvent33:
;SimPLC.c,366 :: 		strcpy(&USBout, "HTTP response line: ");
	MOVLW       _USBout+0
	MOVWF       FARG_strcpy_to+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_strcpy_to+1 
	MOVLW       ?lstr16_SimPLC+0
	MOVWF       FARG_strcpy_from+0 
	MOVLW       hi_addr(?lstr16_SimPLC+0)
	MOVWF       FARG_strcpy_from+1 
	CALL        _strcpy+0, 0
;SimPLC.c,367 :: 		HID_Write(&USBout, 64);
	MOVLW       _USBout+0
	MOVWF       FARG_HID_Write_writebuff+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_HID_Write_writebuff+1 
	MOVLW       64
	MOVWF       FARG_HID_Write_len+0 
	CALL        _HID_Write+0, 0
;SimPLC.c,368 :: 		strcpyTillChar(pstrGsmEventData, &USBout, 0, 61);
	MOVF        _pstrGsmEventData+0, 0 
	MOVWF       FARG_strcpyTillChar_source+0 
	MOVF        _pstrGsmEventData+1, 0 
	MOVWF       FARG_strcpyTillChar_source+1 
	MOVLW       _USBout+0
	MOVWF       FARG_strcpyTillChar_dest+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_strcpyTillChar_dest+1 
	CLRF        FARG_strcpyTillChar_stop_char+0 
	MOVLW       61
	MOVWF       FARG_strcpyTillChar_max_len+0 
	CALL        _strcpyTillChar+0, 0
;SimPLC.c,369 :: 		strcat(&USBout, "\r\n");
	MOVLW       _USBout+0
	MOVWF       FARG_strcat_to+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_strcat_to+1 
	MOVLW       ?lstr17_SimPLC+0
	MOVWF       FARG_strcat_from+0 
	MOVLW       hi_addr(?lstr17_SimPLC+0)
	MOVWF       FARG_strcat_from+1 
	CALL        _strcat+0, 0
;SimPLC.c,370 :: 		HID_Write(&USBout, 64);
	MOVLW       _USBout+0
	MOVWF       FARG_HID_Write_writebuff+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_HID_Write_writebuff+1 
	MOVLW       64
	MOVWF       FARG_HID_Write_len+0 
	CALL        _HID_Write+0, 0
;SimPLC.c,372 :: 		break;
	GOTO        L_gsmEvent24
;SimPLC.c,373 :: 		case gsmevntGprsHttpResultErr:
L_gsmEvent34:
;SimPLC.c,375 :: 		LCD_Cmd(_LCD_Clear);
	MOVLW       1
	MOVWF       FARG_Lcd_Cmd_out_char+0 
	CALL        _Lcd_Cmd+0, 0
;SimPLC.c,376 :: 		LCD_Out(1,1,"HTTP Error:");
	MOVLW       1
	MOVWF       FARG_Lcd_Out_row+0 
	MOVLW       1
	MOVWF       FARG_Lcd_Out_column+0 
	MOVLW       ?lstr18_SimPLC+0
	MOVWF       FARG_Lcd_Out_text+0 
	MOVLW       hi_addr(?lstr18_SimPLC+0)
	MOVWF       FARG_Lcd_Out_text+1 
	CALL        _Lcd_Out+0, 0
;SimPLC.c,377 :: 		LCD_Out(2,1,pstrGsmEventData);
	MOVLW       2
	MOVWF       FARG_Lcd_Out_row+0 
	MOVLW       1
	MOVWF       FARG_Lcd_Out_column+0 
	MOVF        _pstrGsmEventData+0, 0 
	MOVWF       FARG_Lcd_Out_text+0 
	MOVF        _pstrGsmEventData+1, 0 
	MOVWF       FARG_Lcd_Out_text+1 
	CALL        _Lcd_Out+0, 0
;SimPLC.c,378 :: 		wrdLcdTmr = 2500;
	MOVLW       196
	MOVWF       _wrdLcdTmr+0 
	MOVLW       9
	MOVWF       _wrdLcdTmr+1 
;SimPLC.c,381 :: 		strcpy(&USBout, "HTTP response error, code ");
	MOVLW       _USBout+0
	MOVWF       FARG_strcpy_to+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_strcpy_to+1 
	MOVLW       ?lstr19_SimPLC+0
	MOVWF       FARG_strcpy_from+0 
	MOVLW       hi_addr(?lstr19_SimPLC+0)
	MOVWF       FARG_strcpy_from+1 
	CALL        _strcpy+0, 0
;SimPLC.c,382 :: 		strcat(&USBout, pstrGsmEventData);
	MOVLW       _USBout+0
	MOVWF       FARG_strcat_to+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_strcat_to+1 
	MOVF        _pstrGsmEventData+0, 0 
	MOVWF       FARG_strcat_from+0 
	MOVF        _pstrGsmEventData+1, 0 
	MOVWF       FARG_strcat_from+1 
	CALL        _strcat+0, 0
;SimPLC.c,383 :: 		strcat(&USBout, "\r\n");
	MOVLW       _USBout+0
	MOVWF       FARG_strcat_to+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_strcat_to+1 
	MOVLW       ?lstr20_SimPLC+0
	MOVWF       FARG_strcat_from+0 
	MOVLW       hi_addr(?lstr20_SimPLC+0)
	MOVWF       FARG_strcat_from+1 
	CALL        _strcat+0, 0
;SimPLC.c,384 :: 		HID_Write(&USBout, 64);
	MOVLW       _USBout+0
	MOVWF       FARG_HID_Write_writebuff+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_HID_Write_writebuff+1 
	MOVLW       64
	MOVWF       FARG_HID_Write_len+0 
	CALL        _HID_Write+0, 0
;SimPLC.c,386 :: 		break;
	GOTO        L_gsmEvent24
;SimPLC.c,387 :: 		case gsmevntGprsFailed:
L_gsmEvent35:
;SimPLC.c,389 :: 		LCD_Cmd(_LCD_Clear);
	MOVLW       1
	MOVWF       FARG_Lcd_Cmd_out_char+0 
	CALL        _Lcd_Cmd+0, 0
;SimPLC.c,390 :: 		LCD_Out(1,1,"GPRS Failed");
	MOVLW       1
	MOVWF       FARG_Lcd_Out_row+0 
	MOVLW       1
	MOVWF       FARG_Lcd_Out_column+0 
	MOVLW       ?lstr21_SimPLC+0
	MOVWF       FARG_Lcd_Out_text+0 
	MOVLW       hi_addr(?lstr21_SimPLC+0)
	MOVWF       FARG_Lcd_Out_text+1 
	CALL        _Lcd_Out+0, 0
;SimPLC.c,391 :: 		wrdLcdTmr = 2500;
	MOVLW       196
	MOVWF       _wrdLcdTmr+0 
	MOVLW       9
	MOVWF       _wrdLcdTmr+1 
;SimPLC.c,394 :: 		strcpy(&USBout, "GPRS failed\r\n");
	MOVLW       _USBout+0
	MOVWF       FARG_strcpy_to+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_strcpy_to+1 
	MOVLW       ?lstr22_SimPLC+0
	MOVWF       FARG_strcpy_from+0 
	MOVLW       hi_addr(?lstr22_SimPLC+0)
	MOVWF       FARG_strcpy_from+1 
	CALL        _strcpy+0, 0
;SimPLC.c,395 :: 		HID_Write(&USBout, 64);
	MOVLW       _USBout+0
	MOVWF       FARG_HID_Write_writebuff+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_HID_Write_writebuff+1 
	MOVLW       64
	MOVWF       FARG_HID_Write_len+0 
	CALL        _HID_Write+0, 0
;SimPLC.c,397 :: 		break;
	GOTO        L_gsmEvent24
;SimPLC.c,398 :: 		case gsmevntDateTimeRead:
L_gsmEvent36:
;SimPLC.c,399 :: 		memcpy(&dtmRTCC, &dtmGsmEvent, 6);
	MOVLW       _dtmRTCC+0
	MOVWF       FARG_memcpy_d1+0 
	MOVLW       hi_addr(_dtmRTCC+0)
	MOVWF       FARG_memcpy_d1+1 
	MOVLW       _dtmGsmEvent+0
	MOVWF       FARG_memcpy_s1+0 
	MOVLW       hi_addr(_dtmGsmEvent+0)
	MOVWF       FARG_memcpy_s1+1 
	MOVLW       6
	MOVWF       FARG_memcpy_n+0 
	MOVLW       0
	MOVWF       FARG_memcpy_n+1 
	CALL        _memcpy+0, 0
;SimPLC.c,400 :: 		rtccSet();
	CALL        _rtccSet+0, 0
;SimPLC.c,401 :: 		break;
	GOTO        L_gsmEvent24
;SimPLC.c,402 :: 		case gsmevntDateTimeWrite:
L_gsmEvent37:
;SimPLC.c,403 :: 		RTCC_Read();
	CALL        _RTCC_Read+0, 0
;SimPLC.c,404 :: 		memcpy(&dtmGsmEvent, &dtmRTCC, 6);
	MOVLW       _dtmGsmEvent+0
	MOVWF       FARG_memcpy_d1+0 
	MOVLW       hi_addr(_dtmGsmEvent+0)
	MOVWF       FARG_memcpy_d1+1 
	MOVLW       _dtmRTCC+0
	MOVWF       FARG_memcpy_s1+0 
	MOVLW       hi_addr(_dtmRTCC+0)
	MOVWF       FARG_memcpy_s1+1 
	MOVLW       6
	MOVWF       FARG_memcpy_n+0 
	MOVLW       0
	MOVWF       FARG_memcpy_n+1 
	CALL        _memcpy+0, 0
;SimPLC.c,405 :: 		break;
	GOTO        L_gsmEvent24
;SimPLC.c,406 :: 		case gsmevntIMEI_Read:
L_gsmEvent38:
;SimPLC.c,408 :: 		strcpy(&USBout, "IMEI: ");
	MOVLW       _USBout+0
	MOVWF       FARG_strcpy_to+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_strcpy_to+1 
	MOVLW       ?lstr23_SimPLC+0
	MOVWF       FARG_strcpy_from+0 
	MOVLW       hi_addr(?lstr23_SimPLC+0)
	MOVWF       FARG_strcpy_from+1 
	CALL        _strcpy+0, 0
;SimPLC.c,409 :: 		strcat(&USBout, pstrGsmEventData);
	MOVLW       _USBout+0
	MOVWF       FARG_strcat_to+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_strcat_to+1 
	MOVF        _pstrGsmEventData+0, 0 
	MOVWF       FARG_strcat_from+0 
	MOVF        _pstrGsmEventData+1, 0 
	MOVWF       FARG_strcat_from+1 
	CALL        _strcat+0, 0
;SimPLC.c,410 :: 		strcat(&USBout, "\r\n");
	MOVLW       _USBout+0
	MOVWF       FARG_strcat_to+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_strcat_to+1 
	MOVLW       ?lstr24_SimPLC+0
	MOVWF       FARG_strcat_from+0 
	MOVLW       hi_addr(?lstr24_SimPLC+0)
	MOVWF       FARG_strcat_from+1 
	CALL        _strcat+0, 0
;SimPLC.c,411 :: 		HID_Write(&USBout, 64);
	MOVLW       _USBout+0
	MOVWF       FARG_HID_Write_writebuff+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_HID_Write_writebuff+1 
	MOVLW       64
	MOVWF       FARG_HID_Write_len+0 
	CALL        _HID_Write+0, 0
;SimPLC.c,413 :: 		break;
	GOTO        L_gsmEvent24
;SimPLC.c,414 :: 		}
L_gsmEvent23:
	MOVF        FARG_gsmEvent_GsmEventType+0, 0 
	XORLW       30
	BTFSC       STATUS+0, 2 
	GOTO        L_gsmEvent25
	MOVF        FARG_gsmEvent_GsmEventType+0, 0 
	XORLW       31
	BTFSC       STATUS+0, 2 
	GOTO        L_gsmEvent26
	MOVF        FARG_gsmEvent_GsmEventType+0, 0 
	XORLW       70
	BTFSC       STATUS+0, 2 
	GOTO        L_gsmEvent27
	MOVF        FARG_gsmEvent_GsmEventType+0, 0 
	XORLW       80
	BTFSC       STATUS+0, 2 
	GOTO        L_gsmEvent28
	MOVF        FARG_gsmEvent_GsmEventType+0, 0 
	XORLW       83
	BTFSC       STATUS+0, 2 
	GOTO        L_gsmEvent29
	MOVF        FARG_gsmEvent_GsmEventType+0, 0 
	XORLW       82
	BTFSC       STATUS+0, 2 
	GOTO        L_gsmEvent30
	MOVF        FARG_gsmEvent_GsmEventType+0, 0 
	XORLW       84
	BTFSC       STATUS+0, 2 
	GOTO        L_gsmEvent31
	MOVF        FARG_gsmEvent_GsmEventType+0, 0 
	XORLW       112
	BTFSC       STATUS+0, 2 
	GOTO        L_gsmEvent32
	MOVF        FARG_gsmEvent_GsmEventType+0, 0 
	XORLW       111
	BTFSC       STATUS+0, 2 
	GOTO        L_gsmEvent34
	MOVF        FARG_gsmEvent_GsmEventType+0, 0 
	XORLW       110
	BTFSC       STATUS+0, 2 
	GOTO        L_gsmEvent35
	MOVF        FARG_gsmEvent_GsmEventType+0, 0 
	XORLW       150
	BTFSC       STATUS+0, 2 
	GOTO        L_gsmEvent36
	MOVF        FARG_gsmEvent_GsmEventType+0, 0 
	XORLW       151
	BTFSC       STATUS+0, 2 
	GOTO        L_gsmEvent37
	MOVF        FARG_gsmEvent_GsmEventType+0, 0 
	XORLW       20
	BTFSC       STATUS+0, 2 
	GOTO        L_gsmEvent38
L_gsmEvent24:
;SimPLC.c,415 :: 		}
L_end_gsmEvent:
	RETURN      0
; end of _gsmEvent

_lcdRTCC:

;SimPLC.c,418 :: 		void lcdRTCC() { // Display the RTCC date/time on the LCD
;SimPLC.c,419 :: 		RTCC_Read();
	CALL        _RTCC_Read+0, 0
;SimPLC.c,420 :: 		memset(&strLCD, ' ', 16);
	MOVLW       _strLcd+0
	MOVWF       FARG_memset_p1+0 
	MOVLW       hi_addr(_strLcd+0)
	MOVWF       FARG_memset_p1+1 
	MOVLW       32
	MOVWF       FARG_memset_character+0 
	MOVLW       16
	MOVWF       FARG_memset_n+0 
	MOVLW       0
	MOVWF       FARG_memset_n+1 
	CALL        _memset+0, 0
;SimPLC.c,421 :: 		strLCD[16] = 0;
	CLRF        _strLcd+16 
;SimPLC.c,422 :: 		RTCC_GenerateTimeString(&dtmRTCC, &strLcd + 4, 1);
	MOVLW       _dtmRTCC+0
	MOVWF       FARG_RTCC_GenerateTimeString_dt+0 
	MOVLW       hi_addr(_dtmRTCC+0)
	MOVWF       FARG_RTCC_GenerateTimeString_dt+1 
	MOVLW       _strLcd+4
	MOVWF       FARG_RTCC_GenerateTimeString_rtccstring+0 
	MOVLW       hi_addr(_strLcd+4)
	MOVWF       FARG_RTCC_GenerateTimeString_rtccstring+1 
	MOVLW       1
	MOVWF       FARG_RTCC_GenerateTimeString_incl_sec+0 
	CALL        _RTCC_GenerateTimeString+0, 0
;SimPLC.c,423 :: 		strLcd[12] = ' ';
	MOVLW       32
	MOVWF       _strLcd+12 
;SimPLC.c,424 :: 		Lcd_Out(2,1,&strLcd);
	MOVLW       2
	MOVWF       FARG_Lcd_Out_row+0 
	MOVLW       1
	MOVWF       FARG_Lcd_Out_column+0 
	MOVLW       _strLcd+0
	MOVWF       FARG_Lcd_Out_text+0 
	MOVLW       hi_addr(_strLcd+0)
	MOVWF       FARG_Lcd_Out_text+1 
	CALL        _Lcd_Out+0, 0
;SimPLC.c,425 :: 		RTCC_GenerateDateStringDMY(&dtmRTCC, &strLcd + 3);
	MOVLW       _dtmRTCC+0
	MOVWF       FARG_RTCC_GenerateDateStringDMY_dt+0 
	MOVLW       hi_addr(_dtmRTCC+0)
	MOVWF       FARG_RTCC_GenerateDateStringDMY_dt+1 
	MOVLW       _strLcd+3
	MOVWF       FARG_RTCC_GenerateDateStringDMY_rtccstring+0 
	MOVLW       hi_addr(_strLcd+3)
	MOVWF       FARG_RTCC_GenerateDateStringDMY_rtccstring+1 
	CALL        _RTCC_GenerateDateStringDMY+0, 0
;SimPLC.c,426 :: 		strLcd[13] = ' ';
	MOVLW       32
	MOVWF       _strLcd+13 
;SimPLC.c,427 :: 		Lcd_Out(1,1,&strLcd);
	MOVLW       1
	MOVWF       FARG_Lcd_Out_row+0 
	MOVLW       1
	MOVWF       FARG_Lcd_Out_column+0 
	MOVLW       _strLcd+0
	MOVWF       FARG_Lcd_Out_text+0 
	MOVLW       hi_addr(_strLcd+0)
	MOVWF       FARG_Lcd_Out_text+1 
	CALL        _Lcd_Out+0, 0
;SimPLC.c,428 :: 		}
L_end_lcdRTCC:
	RETURN      0
; end of _lcdRTCC

_main:

;SimPLC.c,431 :: 		void main() {
;SimPLC.c,432 :: 		setup();
	CALL        _setup+0, 0
;SimPLC.c,433 :: 		startup();
	CALL        _startup+0, 0
;SimPLC.c,434 :: 		gsmDateTimeRead(); // Request a read of the GSM modules date/time
	CALL        _gsmDateTimeRead+0, 0
;SimPLC.c,435 :: 		while (1) {
L_main39:
;SimPLC.c,436 :: 		if (OERR1_bit) { // Check for UART rx overflow
	BTFSS       OERR1_bit+0, BitPos(OERR1_bit+0) 
	GOTO        L_main41
;SimPLC.c,441 :: 		strcpy(&USBout, "UART rx overflow occurred.\r\n");
	MOVLW       _USBout+0
	MOVWF       FARG_strcpy_to+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_strcpy_to+1 
	MOVLW       ?lstr25_SimPLC+0
	MOVWF       FARG_strcpy_from+0 
	MOVLW       hi_addr(?lstr25_SimPLC+0)
	MOVWF       FARG_strcpy_from+1 
	CALL        _strcpy+0, 0
;SimPLC.c,442 :: 		HID_Write(&USBout, 64);
	MOVLW       _USBout+0
	MOVWF       FARG_HID_Write_writebuff+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_HID_Write_writebuff+1 
	MOVLW       64
	MOVWF       FARG_HID_Write_len+0 
	CALL        _HID_Write+0, 0
;SimPLC.c,445 :: 		}
L_main41:
;SimPLC.c,446 :: 		gsmPoll();
	CALL        _gsmPoll+0, 0
;SimPLC.c,449 :: 		if (wrdLcdTmr == 0) {
	MOVLW       0
	XORWF       _wrdLcdTmr+1, 0 
	BTFSS       STATUS+0, 2 
	GOTO        L__main65
	MOVLW       0
	XORWF       _wrdLcdTmr+0, 0 
L__main65:
	BTFSS       STATUS+0, 2 
	GOTO        L_main42
;SimPLC.c,450 :: 		lcdRTCC();
	CALL        _lcdRTCC+0, 0
;SimPLC.c,451 :: 		wrdLcdTmr = 1000;
	MOVLW       232
	MOVWF       _wrdLcdTmr+0 
	MOVLW       3
	MOVWF       _wrdLcdTmr+1 
;SimPLC.c,452 :: 		}
L_main42:
;SimPLC.c,456 :: 		if (HID_Read() != 0) {
	CALL        _HID_Read+0, 0
	MOVF        R0, 0 
	XORLW       0
	BTFSC       STATUS+0, 2 
	GOTO        L_main43
;SimPLC.c,461 :: 		}
L_main43:
;SimPLC.c,464 :: 		if ((RB7_bit == 0) && (wrdRB7Tmr > 10000)) {
	BTFSC       RB7_bit+0, BitPos(RB7_bit+0) 
	GOTO        L_main46
	MOVF        _wrdRB7Tmr+1, 0 
	SUBLW       39
	BTFSS       STATUS+0, 2 
	GOTO        L__main66
	MOVF        _wrdRB7Tmr+0, 0 
	SUBLW       16
L__main66:
	BTFSC       STATUS+0, 0 
	GOTO        L_main46
L__main48:
;SimPLC.c,470 :: 		if (!gsmGprsPending()) {
	CALL        _gsmGprsPending+0, 0
	MOVF        R0, 1 
	BTFSS       STATUS+0, 2 
	GOTO        L_main47
;SimPLC.c,471 :: 		bitGsmGprsFirstLine = 1;
	BSF         _bitGsmGprsFirstLine+0, BitPos(_bitGsmGprsFirstLine+0) 
;SimPLC.c,473 :: 		gsmGprsHttpPost("www.dizzy.co.za/gprs_test.asp", "unit=SimPLC");
	MOVLW       ?lstr26_SimPLC+0
	MOVWF       FARG_gsmGprsHttpPost_url+0 
	MOVLW       hi_addr(?lstr26_SimPLC+0)
	MOVWF       FARG_gsmGprsHttpPost_url+1 
	MOVLW       ?lstr27_SimPLC+0
	MOVWF       FARG_gsmGprsHttpPost_postdata+0 
	MOVLW       hi_addr(?lstr27_SimPLC+0)
	MOVWF       FARG_gsmGprsHttpPost_postdata+1 
	CALL        _gsmGprsHttpPost+0, 0
;SimPLC.c,474 :: 		}
L_main47:
;SimPLC.c,476 :: 		wrdRB7Tmr = 0;
	CLRF        _wrdRB7Tmr+0 
	CLRF        _wrdRB7Tmr+1 
;SimPLC.c,477 :: 		}
L_main46:
;SimPLC.c,479 :: 		} // (while)
	GOTO        L_main39
;SimPLC.c,480 :: 		} // (void)
L_end_main:
	GOTO        $+0
; end of _main
