
_interrupt:

;GSM_PIC_clicker.mbas,92 :: 		sub procedure interrupt()
;GSM_PIC_clicker.mbas,95 :: 		if (USBIF_bit) then
	BTFSS       USBIF_bit+0, BitPos(USBIF_bit+0) 
	GOTO        L__interrupt2
;GSM_PIC_clicker.mbas,96 :: 		USB_Interrupt_Proc()
	CALL        _USB_Interrupt_Proc+0, 0
L__interrupt2:
;GSM_PIC_clicker.mbas,101 :: 		if (T0IF_bit) then ' 1ms Interrupt
	BTFSS       T0IF_bit+0, BitPos(T0IF_bit+0) 
	GOTO        L__interrupt5
;GSM_PIC_clicker.mbas,105 :: 		TMR0H = 0xD1
	MOVLW       209
	MOVWF       TMR0H+0 
;GSM_PIC_clicker.mbas,106 :: 		TMR0L = 0x20
	MOVLW       32
	MOVWF       TMR0L+0 
;GSM_PIC_clicker.mbas,107 :: 		gsm1msPing()
	CALL        _gsm1msPing+0, 0
;GSM_PIC_clicker.mbas,108 :: 		if (wrdButtonTmr < 65535) then
	MOVLW       255
	SUBWF       _wrdButtonTmr+1, 0 
	BTFSS       STATUS+0, 2 
	GOTO        L__interrupt104
	MOVLW       255
	SUBWF       _wrdButtonTmr+0, 0 
L__interrupt104:
	BTFSC       STATUS+0, 0 
	GOTO        L__interrupt8
;GSM_PIC_clicker.mbas,109 :: 		Inc(wrdButtonTmr)
	INFSNZ      _wrdButtonTmr+0, 1 
	INCF        _wrdButtonTmr+1, 1 
L__interrupt8:
;GSM_PIC_clicker.mbas,111 :: 		T0IF_bit = 0 ' Clear interrupt flag
	BCF         T0IF_bit+0, BitPos(T0IF_bit+0) 
L__interrupt5:
;GSM_PIC_clicker.mbas,114 :: 		end sub
L_end_interrupt:
L__interrupt103:
	RETFIE      1
; end of _interrupt

_setup:

;GSM_PIC_clicker.mbas,116 :: 		sub procedure setup()
;GSM_PIC_clicker.mbas,117 :: 		ANCON0 = %11111111 'All pins digital
	MOVLW       255
	MOVWF       ANCON0+0 
;GSM_PIC_clicker.mbas,118 :: 		ANCON1 = %00011111 'All pins digital
	MOVLW       31
	MOVWF       ANCON1+0 
;GSM_PIC_clicker.mbas,119 :: 		btn1_Dir = 1 ' Input
	BSF         TRISD3_bit+0, BitPos(TRISD3_bit+0) 
;GSM_PIC_clicker.mbas,120 :: 		btn2_Dir = 1 ' Input
	BSF         TRISD2_bit+0, BitPos(TRISD2_bit+0) 
;GSM_PIC_clicker.mbas,121 :: 		led1_Dir = 0 ' Output
	BCF         TRISA0_bit+0, BitPos(TRISA0_bit+0) 
;GSM_PIC_clicker.mbas,122 :: 		led2_Dir = 0 ' Output
	BCF         TRISA1_bit+0, BitPos(TRISA1_bit+0) 
;GSM_PIC_clicker.mbas,123 :: 		TRISD5_bit = 1 'UART Rx
	BSF         TRISD5_bit+0, BitPos(TRISD5_bit+0) 
;GSM_PIC_clicker.mbas,124 :: 		TRISD6_bit = 0 'UART Tx
	BCF         TRISD6_bit+0, BitPos(TRISD6_bit+0) 
;GSM_PIC_clicker.mbas,125 :: 		GSM_Pwr_Key_Dir = 0
	BCF         TRISB2_bit+0, BitPos(TRISB2_bit+0) 
;GSM_PIC_clicker.mbas,126 :: 		GSM_Stat_Dir = 1
	BSF         TRISA2_bit+0, BitPos(TRISA2_bit+0) 
;GSM_PIC_clicker.mbas,128 :: 		Unlock_IOLOCK()
	CALL        _Unlock_IOLOCK+0, 0
;GSM_PIC_clicker.mbas,129 :: 		PPS_Mapping_NoLock(22, _INPUT, _RX2_DT2)
	MOVLW       22
	MOVWF       FARG_PPS_Mapping_NoLock_rp_num+0 
	MOVLW       1
	MOVWF       FARG_PPS_Mapping_NoLock_input_output+0 
	MOVLW       12
	MOVWF       FARG_PPS_Mapping_NoLock_funct_name+0 
	CALL        _PPS_Mapping_NoLock+0, 0
;GSM_PIC_clicker.mbas,130 :: 		PPS_Mapping_NoLock(23, _OUTPUT, _TX2_CK2)
	MOVLW       23
	MOVWF       FARG_PPS_Mapping_NoLock_rp_num+0 
	CLRF        FARG_PPS_Mapping_NoLock_input_output+0 
	MOVLW       6
	MOVWF       FARG_PPS_Mapping_NoLock_funct_name+0 
	CALL        _PPS_Mapping_NoLock+0, 0
;GSM_PIC_clicker.mbas,131 :: 		Lock_IOLOCK()
	CALL        _Lock_IOLOCK+0, 0
;GSM_PIC_clicker.mbas,132 :: 		IPEN_bit = 0 'Interrupt priority disable
	BCF         IPEN_bit+0, BitPos(IPEN_bit+0) 
;GSM_PIC_clicker.mbas,133 :: 		GIE_bit = 1 'Global interrupt enable
	BSF         GIE_bit+0, BitPos(GIE_bit+0) 
;GSM_PIC_clicker.mbas,134 :: 		PEIE_bit = 1 'Peripheral interrupt enable
	BSF         PEIE_bit+0, BitPos(PEIE_bit+0) 
;GSM_PIC_clicker.mbas,136 :: 		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
;GSM_PIC_clicker.mbas,139 :: 		T0CON = %10001000 'Timer0 On, 16-bit, internal clock, pre-scaler not assgnd
	MOVLW       136
	MOVWF       T0CON+0 
;GSM_PIC_clicker.mbas,140 :: 		T0IE_bit = 1 'Enable Timer0 overflow interrupts
	BSF         T0IE_bit+0, BitPos(T0IE_bit+0) 
;GSM_PIC_clicker.mbas,141 :: 		end sub
L_end_setup:
	RETURN      0
; end of _setup

_startup:

;GSM_PIC_clicker.mbas,143 :: 		sub procedure startup()
;GSM_PIC_clicker.mbas,144 :: 		led1 = 0
	BCF         LATA0_bit+0, BitPos(LATA0_bit+0) 
;GSM_PIC_clicker.mbas,145 :: 		led2 = 0
	BCF         LATA1_bit+0, BitPos(LATA1_bit+0) 
;GSM_PIC_clicker.mbas,146 :: 		UART_Remappable_Init(9600)
	BSF         BAUDCON2+0, 3, 0
	MOVLW       4
	MOVWF       SPBRGH2+0 
	MOVLW       225
	MOVWF       SPBRG2+0 
	BSF         TXSTA2+0, 2, 0
	CALL        _UART_Remappable_Init+0, 0
;GSM_PIC_clicker.mbas,147 :: 		gsmInit()
	CALL        _gsmInit+0, 0
;GSM_PIC_clicker.mbas,148 :: 		gsm_MS_Init()
	CALL        _gsm_MS_Init+0, 0
;GSM_PIC_clicker.mbas,149 :: 		gsm_Msg_Init() ' Requires GSM_Msg module
	CALL        _gsm_Msg_Init+0, 0
;GSM_PIC_clicker.mbas,150 :: 		strDestID = ""
	CLRF        _strDestID+0 
;GSM_PIC_clicker.mbas,151 :: 		wrdButtonTmr = 65535
	MOVLW       255
	MOVWF       _wrdButtonTmr+0 
	MOVLW       255
	MOVWF       _wrdButtonTmr+1 
;GSM_PIC_clicker.mbas,152 :: 		bitRTCC_Set = 0
	BCF         _bitRTCC_Set+0, BitPos(_bitRTCC_Set+0) 
;GSM_PIC_clicker.mbas,153 :: 		end sub
L_end_startup:
	RETURN      0
; end of _startup

_msgSend:

;GSM_PIC_clicker.mbas,155 :: 		sub procedure msgSend()
;GSM_PIC_clicker.mbas,158 :: 		strcpy(USBout, "Sending message to ")
	MOVLW       _USBout+0
	MOVWF       FARG_strcpy_s1+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_strcpy_s1+1 
	MOVLW       83
	MOVWF       ?LocalText_msgSend_0+0 
	MOVLW       101
	MOVWF       ?LocalText_msgSend_0+1 
	MOVLW       110
	MOVWF       ?LocalText_msgSend_0+2 
	MOVLW       100
	MOVWF       ?LocalText_msgSend_0+3 
	MOVLW       105
	MOVWF       ?LocalText_msgSend_0+4 
	MOVLW       110
	MOVWF       ?LocalText_msgSend_0+5 
	MOVLW       103
	MOVWF       ?LocalText_msgSend_0+6 
	MOVLW       32
	MOVWF       ?LocalText_msgSend_0+7 
	MOVLW       109
	MOVWF       ?LocalText_msgSend_0+8 
	MOVLW       101
	MOVWF       ?LocalText_msgSend_0+9 
	MOVLW       115
	MOVWF       ?LocalText_msgSend_0+10 
	MOVLW       115
	MOVWF       ?LocalText_msgSend_0+11 
	MOVLW       97
	MOVWF       ?LocalText_msgSend_0+12 
	MOVLW       103
	MOVWF       ?LocalText_msgSend_0+13 
	MOVLW       101
	MOVWF       ?LocalText_msgSend_0+14 
	MOVLW       32
	MOVWF       ?LocalText_msgSend_0+15 
	MOVLW       116
	MOVWF       ?LocalText_msgSend_0+16 
	MOVLW       111
	MOVWF       ?LocalText_msgSend_0+17 
	MOVLW       32
	MOVWF       ?LocalText_msgSend_0+18 
	CLRF        ?LocalText_msgSend_0+19 
	MOVLW       ?LocalText_msgSend_0+0
	MOVWF       FARG_strcpy_s2+0 
	MOVLW       hi_addr(?LocalText_msgSend_0+0)
	MOVWF       FARG_strcpy_s2+1 
	CALL        _strcpy+0, 0
;GSM_PIC_clicker.mbas,159 :: 		strcat(USBout, strDestID)
	MOVLW       _USBout+0
	MOVWF       FARG_strcat_s1+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_strcat_s1+1 
	MOVLW       _strDestID+0
	MOVWF       FARG_strcat_s2+0 
	MOVLW       hi_addr(_strDestID+0)
	MOVWF       FARG_strcat_s2+1 
	CALL        _strcat+0, 0
;GSM_PIC_clicker.mbas,160 :: 		strcat(USBout, ":" + Chr(13) + Chr(10))
	MOVLW       _USBout+0
	MOVWF       FARG_strcat_s1+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_strcat_s1+1 
	MOVLW       58
	MOVWF       ?LocalText_msgSend_1+0 
	MOVLW       13
	MOVWF       ?LocalText_msgSend_1+1 
	MOVLW       10
	MOVWF       ?LocalText_msgSend_1+2 
	MOVLW       0
	MOVWF       ?LocalText_msgSend_1+3 
	MOVLW       ?LocalText_msgSend_1+0
	MOVWF       FARG_strcat_s2+0 
	MOVLW       hi_addr(?LocalText_msgSend_1+0)
	MOVWF       FARG_strcat_s2+1 
	CALL        _strcat+0, 0
;GSM_PIC_clicker.mbas,161 :: 		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
;GSM_PIC_clicker.mbas,162 :: 		strncpyExNewLine(USBout, strMsgSendTxt, 64)
	MOVLW       _USBout+0
	MOVWF       FARG_strncpyExNewLine_dest+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_strncpyExNewLine_dest+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
;GSM_PIC_clicker.mbas,163 :: 		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
;GSM_PIC_clicker.mbas,165 :: 		if strDestID[0] <> 0 then
	MOVF        _strDestID+0, 0 
	XORLW       0
	BTFSC       STATUS+0, 2 
	GOTO        L__msgSend14
;GSM_PIC_clicker.mbas,166 :: 		if gsmMsgSendPending() then
	CALL        _gsmMsgSendPending+0, 0
	MOVF        R0, 1 
	BTFSC       STATUS+0, 2 
	GOTO        L__msgSend17
;GSM_PIC_clicker.mbas,167 :: 		gsmMsgSendCancel() ' Cancel any message waiting to be sent
	CALL        _gsmMsgSendCancel+0, 0
L__msgSend17:
;GSM_PIC_clicker.mbas,169 :: 		gsmMsgSend(strMsgSendTxt, strDestID) ' Send the message
	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
L__msgSend14:
;GSM_PIC_clicker.mbas,171 :: 		end sub
L_end_msgSend:
	RETURN      0
; end of _msgSend

_gsmMissedCall:

;GSM_PIC_clicker.mbas,173 :: 		sub procedure gsmMissedCall(dim byref OriginatorID as string)
;GSM_PIC_clicker.mbas,174 :: 		led1 = not led1 ' Toggle LED1
	BTG         LATA0_bit+0, BitPos(LATA0_bit+0) 
;GSM_PIC_clicker.mbas,175 :: 		if strDestID[0] = 0 then ' If the destination ID has not yet been set then
	MOVF        _strDestID+0, 0 
	XORLW       0
	BTFSS       STATUS+0, 2 
	GOTO        L__gsmMissedCall21
;GSM_PIC_clicker.mbas,176 :: 		strcpy(strDestID, OriginatorID) ' Copy it from the originator ID
	MOVLW       _strDestID+0
	MOVWF       FARG_strcpy_s1+0 
	MOVLW       hi_addr(_strDestID+0)
	MOVWF       FARG_strcpy_s1+1 
	MOVF        FARG_gsmMissedCall_OriginatorID+0, 0 
	MOVWF       FARG_strcpy_s2+0 
	MOVF        FARG_gsmMissedCall_OriginatorID+1, 0 
	MOVWF       FARG_strcpy_s2+1 
	CALL        _strcpy+0, 0
L__gsmMissedCall21:
;GSM_PIC_clicker.mbas,178 :: 		end sub
L_end_gsmMissedCall:
	RETURN      0
; end of _gsmMissedCall

_gsmMsgRcvd:

;GSM_PIC_clicker.mbas,180 :: 		sub procedure gsmMsgRcvd(dim byref MessageText as string, dim byref OriginatorID as string)
;GSM_PIC_clicker.mbas,181 :: 		if strDestID[0] = 0 then ' If the destination ID has not yet been set then
	MOVF        _strDestID+0, 0 
	XORLW       0
	BTFSS       STATUS+0, 2 
	GOTO        L__gsmMsgRcvd25
;GSM_PIC_clicker.mbas,182 :: 		strcpy(strDestID, OriginatorID) ' Copy it from the originator ID
	MOVLW       _strDestID+0
	MOVWF       FARG_strcpy_s1+0 
	MOVLW       hi_addr(_strDestID+0)
	MOVWF       FARG_strcpy_s1+1 
	MOVF        FARG_gsmMsgRcvd_OriginatorID+0, 0 
	MOVWF       FARG_strcpy_s2+0 
	MOVF        FARG_gsmMsgRcvd_OriginatorID+1, 0 
	MOVWF       FARG_strcpy_s2+1 
	CALL        _strcpy+0, 0
L__gsmMsgRcvd25:
;GSM_PIC_clicker.mbas,184 :: 		if gsmMsgJustArrived() = 1 then
	CALL        _gsmMsgJustArrived+0, 0
	MOVF        R0, 0 
	XORLW       1
	BTFSS       STATUS+0, 2 
	GOTO        L__gsmMsgRcvd28
;GSM_PIC_clicker.mbas,187 :: 		if not bitRTCC_Set then
	BTFSC       _bitRTCC_Set+0, BitPos(_bitRTCC_Set+0) 
	GOTO        L__gsmMsgRcvd110
	BSF         4056, 0 
	GOTO        L__gsmMsgRcvd111
L__gsmMsgRcvd110:
	BCF         4056, 0 
L__gsmMsgRcvd111:
	BTFSS       4056, 0 
	GOTO        L__gsmMsgRcvd31
;GSM_PIC_clicker.mbas,188 :: 		dtmRTCC = dtmGsmEvent
	MOVLW       _dtmRTCC+0
	MOVWF       FSR1 
	MOVLW       hi_addr(_dtmRTCC+0)
	MOVWF       FSR1H 
	MOVLW       _dtmGsmEvent+0
	MOVWF       FSR2 
	MOVLW       hi_addr(_dtmGsmEvent+0)
	MOVWF       FSR2H 
	MOVLW       6
	MOVWF       R0 
	MOVLW       0
	MOVWF       R1 
	CALL        ___CA2AW+0, 0
;GSM_PIC_clicker.mbas,190 :: 		gsmDateTimeWrite()
	CALL        _gsmDateTimeWrite+0, 0
L__gsmMsgRcvd31:
;GSM_PIC_clicker.mbas,191 :: 		end if
L__gsmMsgRcvd28:
;GSM_PIC_clicker.mbas,193 :: 		lowcase(MessageText) ' Convert the entire message to lower case
	MOVF        FARG_gsmMsgRcvd_MessageText+0, 0 
	MOVWF       FARG_lowcase_str+0 
	MOVF        FARG_gsmMsgRcvd_MessageText+1, 0 
	MOVWF       FARG_lowcase_str+1 
	CALL        _lowcase+0, 0
;GSM_PIC_clicker.mbas,195 :: 		if MessageText[1] = "n" then ' 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__gsmMsgRcvd34
;GSM_PIC_clicker.mbas,196 :: 		if MessageText[2] = "1" then ' "on1"
	MOVLW       2
	ADDWF       FARG_gsmMsgRcvd_MessageText+0, 0 
	MOVWF       FSR0 
	MOVLW       0
	ADDWFC      FARG_gsmMsgRcvd_MessageText+1, 0 
	MOVWF       FSR0H 
	MOVF        POSTINC0+0, 0 
	XORLW       49
	BTFSS       STATUS+0, 2 
	GOTO        L__gsmMsgRcvd37
;GSM_PIC_clicker.mbas,197 :: 		LED1 = 1
	BSF         LATA0_bit+0, BitPos(LATA0_bit+0) 
	GOTO        L__gsmMsgRcvd38
;GSM_PIC_clicker.mbas,198 :: 		else
L__gsmMsgRcvd37:
;GSM_PIC_clicker.mbas,199 :: 		if MessageText[2] = "2" then ' "on2"
	MOVLW       2
	ADDWF       FARG_gsmMsgRcvd_MessageText+0, 0 
	MOVWF       FSR0 
	MOVLW       0
	ADDWFC      FARG_gsmMsgRcvd_MessageText+1, 0 
	MOVWF       FSR0H 
	MOVF        POSTINC0+0, 0 
	XORLW       50
	BTFSS       STATUS+0, 2 
	GOTO        L__gsmMsgRcvd40
;GSM_PIC_clicker.mbas,200 :: 		LED2 = 1
	BSF         LATA1_bit+0, BitPos(LATA1_bit+0) 
	GOTO        L__gsmMsgRcvd41
;GSM_PIC_clicker.mbas,201 :: 		else ' just "on" (both)
L__gsmMsgRcvd40:
;GSM_PIC_clicker.mbas,202 :: 		LED1 = 1
	BSF         LATA0_bit+0, BitPos(LATA0_bit+0) 
;GSM_PIC_clicker.mbas,203 :: 		LED2 = 1
	BSF         LATA1_bit+0, BitPos(LATA1_bit+0) 
;GSM_PIC_clicker.mbas,204 :: 		end if
L__gsmMsgRcvd41:
;GSM_PIC_clicker.mbas,205 :: 		end if
L__gsmMsgRcvd38:
	GOTO        L__gsmMsgRcvd35
;GSM_PIC_clicker.mbas,206 :: 		else
L__gsmMsgRcvd34:
;GSM_PIC_clicker.mbas,207 :: 		if MessageText[1] = "f" then ' Looking for "off"
	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__gsmMsgRcvd43
;GSM_PIC_clicker.mbas,208 :: 		if MessageText[2] = "1" then ' "off1"
	MOVLW       2
	ADDWF       FARG_gsmMsgRcvd_MessageText+0, 0 
	MOVWF       FSR0 
	MOVLW       0
	ADDWFC      FARG_gsmMsgRcvd_MessageText+1, 0 
	MOVWF       FSR0H 
	MOVF        POSTINC0+0, 0 
	XORLW       49
	BTFSS       STATUS+0, 2 
	GOTO        L__gsmMsgRcvd46
;GSM_PIC_clicker.mbas,209 :: 		LED1 = 0
	BCF         LATA0_bit+0, BitPos(LATA0_bit+0) 
	GOTO        L__gsmMsgRcvd47
;GSM_PIC_clicker.mbas,210 :: 		else
L__gsmMsgRcvd46:
;GSM_PIC_clicker.mbas,211 :: 		if MessageText[2] = "2" then ' "off2"
	MOVLW       2
	ADDWF       FARG_gsmMsgRcvd_MessageText+0, 0 
	MOVWF       FSR0 
	MOVLW       0
	ADDWFC      FARG_gsmMsgRcvd_MessageText+1, 0 
	MOVWF       FSR0H 
	MOVF        POSTINC0+0, 0 
	XORLW       50
	BTFSS       STATUS+0, 2 
	GOTO        L__gsmMsgRcvd49
;GSM_PIC_clicker.mbas,212 :: 		LED2 = 0
	BCF         LATA1_bit+0, BitPos(LATA1_bit+0) 
	GOTO        L__gsmMsgRcvd50
;GSM_PIC_clicker.mbas,213 :: 		else ' just "off" (both)
L__gsmMsgRcvd49:
;GSM_PIC_clicker.mbas,214 :: 		LED1 = 0
	BCF         LATA0_bit+0, BitPos(LATA0_bit+0) 
;GSM_PIC_clicker.mbas,215 :: 		LED2 = 0
	BCF         LATA1_bit+0, BitPos(LATA1_bit+0) 
;GSM_PIC_clicker.mbas,216 :: 		end if
L__gsmMsgRcvd50:
;GSM_PIC_clicker.mbas,217 :: 		end if
L__gsmMsgRcvd47:
	GOTO        L__gsmMsgRcvd44
;GSM_PIC_clicker.mbas,218 :: 		else
L__gsmMsgRcvd43:
;GSM_PIC_clicker.mbas,219 :: 		if strncmp(MessageText, "please call ", 12) = 0 then ' "Please Call Me"
	MOVF        FARG_gsmMsgRcvd_MessageText+0, 0 
	MOVWF       FARG_strncmp_s1+0 
	MOVF        FARG_gsmMsgRcvd_MessageText+1, 0 
	MOVWF       FARG_strncmp_s1+1 
	MOVLW       112
	MOVWF       ?LocalText_gsmMsgRcvd_2+0 
	MOVLW       108
	MOVWF       ?LocalText_gsmMsgRcvd_2+1 
	MOVLW       101
	MOVWF       ?LocalText_gsmMsgRcvd_2+2 
	MOVLW       97
	MOVWF       ?LocalText_gsmMsgRcvd_2+3 
	MOVLW       115
	MOVWF       ?LocalText_gsmMsgRcvd_2+4 
	MOVLW       101
	MOVWF       ?LocalText_gsmMsgRcvd_2+5 
	MOVLW       32
	MOVWF       ?LocalText_gsmMsgRcvd_2+6 
	MOVLW       99
	MOVWF       ?LocalText_gsmMsgRcvd_2+7 
	MOVLW       97
	MOVWF       ?LocalText_gsmMsgRcvd_2+8 
	MOVLW       108
	MOVWF       ?LocalText_gsmMsgRcvd_2+9 
	MOVLW       108
	MOVWF       ?LocalText_gsmMsgRcvd_2+10 
	MOVLW       32
	MOVWF       ?LocalText_gsmMsgRcvd_2+11 
	CLRF        ?LocalText_gsmMsgRcvd_2+12 
	MOVLW       ?LocalText_gsmMsgRcvd_2+0
	MOVWF       FARG_strncmp_s2+0 
	MOVLW       hi_addr(?LocalText_gsmMsgRcvd_2+0)
	MOVWF       FARG_strncmp_s2+1 
	MOVLW       12
	MOVWF       FARG_strncmp_len+0 
	MOVLW       0
	MOVWF       FARG_strncmp_len+1 
	CALL        _strncmp+0, 0
	MOVLW       0
	XORWF       R1, 0 
	BTFSS       STATUS+0, 2 
	GOTO        L__gsmMsgRcvd112
	MOVLW       0
	XORWF       R0, 0 
L__gsmMsgRcvd112:
	BTFSS       STATUS+0, 2 
	GOTO        L__gsmMsgRcvd52
;GSM_PIC_clicker.mbas,220 :: 		LED2 = not LED2
	BTG         LATA1_bit+0, BitPos(LATA1_bit+0) 
L__gsmMsgRcvd52:
;GSM_PIC_clicker.mbas,222 :: 		end if
L__gsmMsgRcvd44:
;GSM_PIC_clicker.mbas,223 :: 		end if
L__gsmMsgRcvd35:
;GSM_PIC_clicker.mbas,224 :: 		end sub
L_end_gsmMsgRcvd:
	RETURN      0
; end of _gsmMsgRcvd

_gsmEvent:

;GSM_PIC_clicker.mbas,226 :: 		sub procedure gsmEvent(dim GsmEventType as char)
;GSM_PIC_clicker.mbas,228 :: 		case gsmevntPIN_Request
	MOVF        FARG_gsmEvent_GsmEventType+0, 0 
	XORLW       30
	BTFSS       STATUS+0, 2 
	GOTO        L__gsmEvent58
	GOTO        L__gsmEvent55
L__gsmEvent58:
;GSM_PIC_clicker.mbas,231 :: 		case gsmevntPIN_Fail
	MOVF        FARG_gsmEvent_GsmEventType+0, 0 
	XORLW       31
	BTFSS       STATUS+0, 2 
	GOTO        L__gsmEvent61
;GSM_PIC_clicker.mbas,233 :: 		strcpy(USBout, "PIN entry failed" + Chr(13) + Chr(10))
	MOVLW       _USBout+0
	MOVWF       FARG_strcpy_s1+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_strcpy_s1+1 
	MOVLW       80
	MOVWF       ?LocalText_gsmEvent_3+0 
	MOVLW       73
	MOVWF       ?LocalText_gsmEvent_3+1 
	MOVLW       78
	MOVWF       ?LocalText_gsmEvent_3+2 
	MOVLW       32
	MOVWF       ?LocalText_gsmEvent_3+3 
	MOVLW       101
	MOVWF       ?LocalText_gsmEvent_3+4 
	MOVLW       110
	MOVWF       ?LocalText_gsmEvent_3+5 
	MOVLW       116
	MOVWF       ?LocalText_gsmEvent_3+6 
	MOVLW       114
	MOVWF       ?LocalText_gsmEvent_3+7 
	MOVLW       121
	MOVWF       ?LocalText_gsmEvent_3+8 
	MOVLW       32
	MOVWF       ?LocalText_gsmEvent_3+9 
	MOVLW       102
	MOVWF       ?LocalText_gsmEvent_3+10 
	MOVLW       97
	MOVWF       ?LocalText_gsmEvent_3+11 
	MOVLW       105
	MOVWF       ?LocalText_gsmEvent_3+12 
	MOVLW       108
	MOVWF       ?LocalText_gsmEvent_3+13 
	MOVLW       101
	MOVWF       ?LocalText_gsmEvent_3+14 
	MOVLW       100
	MOVWF       ?LocalText_gsmEvent_3+15 
	MOVLW       13
	MOVWF       ?LocalText_gsmEvent_3+16 
	MOVLW       10
	MOVWF       ?LocalText_gsmEvent_3+17 
	MOVLW       0
	MOVWF       ?LocalText_gsmEvent_3+18 
	MOVLW       ?LocalText_gsmEvent_3+0
	MOVWF       FARG_strcpy_s2+0 
	MOVLW       hi_addr(?LocalText_gsmEvent_3+0)
	MOVWF       FARG_strcpy_s2+1 
	CALL        _strcpy+0, 0
;GSM_PIC_clicker.mbas,234 :: 		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
	GOTO        L__gsmEvent55
L__gsmEvent61:
;GSM_PIC_clicker.mbas,236 :: 		case gsmevntMissedCall
	MOVF        FARG_gsmEvent_GsmEventType+0, 0 
	XORLW       70
	BTFSS       STATUS+0, 2 
	GOTO        L__gsmEvent64
;GSM_PIC_clicker.mbas,237 :: 		gsmMissedCall(pstrGsmEventOriginatorID)
	MOVF        _pstrGsmEventOriginatorID+0, 0 
	MOVWF       FARG_gsmMissedCall_OriginatorID+0 
	MOVF        _pstrGsmEventOriginatorID+1, 0 
	MOVWF       FARG_gsmMissedCall_OriginatorID+1 
	CALL        _gsmMissedCall+0, 0
	GOTO        L__gsmEvent55
L__gsmEvent64:
;GSM_PIC_clicker.mbas,238 :: 		case gsmevntMsgRcvd
	MOVF        FARG_gsmEvent_GsmEventType+0, 0 
	XORLW       80
	BTFSS       STATUS+0, 2 
	GOTO        L__gsmEvent67
;GSM_PIC_clicker.mbas,239 :: 		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
	GOTO        L__gsmEvent55
L__gsmEvent67:
;GSM_PIC_clicker.mbas,240 :: 		case gsmevntMsgSent
	MOVF        FARG_gsmEvent_GsmEventType+0, 0 
	XORLW       83
	BTFSS       STATUS+0, 2 
	GOTO        L__gsmEvent70
;GSM_PIC_clicker.mbas,242 :: 		strcpy(USBout, "Message sent" + Chr(13) + Chr(10))
	MOVLW       _USBout+0
	MOVWF       FARG_strcpy_s1+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_strcpy_s1+1 
	MOVLW       77
	MOVWF       ?LocalText_gsmEvent_4+0 
	MOVLW       101
	MOVWF       ?LocalText_gsmEvent_4+1 
	MOVLW       115
	MOVWF       ?LocalText_gsmEvent_4+2 
	MOVLW       115
	MOVWF       ?LocalText_gsmEvent_4+3 
	MOVLW       97
	MOVWF       ?LocalText_gsmEvent_4+4 
	MOVLW       103
	MOVWF       ?LocalText_gsmEvent_4+5 
	MOVLW       101
	MOVWF       ?LocalText_gsmEvent_4+6 
	MOVLW       32
	MOVWF       ?LocalText_gsmEvent_4+7 
	MOVLW       115
	MOVWF       ?LocalText_gsmEvent_4+8 
	MOVLW       101
	MOVWF       ?LocalText_gsmEvent_4+9 
	MOVLW       110
	MOVWF       ?LocalText_gsmEvent_4+10 
	MOVLW       116
	MOVWF       ?LocalText_gsmEvent_4+11 
	MOVLW       13
	MOVWF       ?LocalText_gsmEvent_4+12 
	MOVLW       10
	MOVWF       ?LocalText_gsmEvent_4+13 
	MOVLW       0
	MOVWF       ?LocalText_gsmEvent_4+14 
	MOVLW       ?LocalText_gsmEvent_4+0
	MOVWF       FARG_strcpy_s2+0 
	MOVLW       hi_addr(?LocalText_gsmEvent_4+0)
	MOVWF       FARG_strcpy_s2+1 
	CALL        _strcpy+0, 0
;GSM_PIC_clicker.mbas,243 :: 		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
	GOTO        L__gsmEvent55
L__gsmEvent70:
;GSM_PIC_clicker.mbas,245 :: 		case gsmevntMsgDiscarded, gsmevntMsgSendFailed
	MOVF        FARG_gsmEvent_GsmEventType+0, 0 
	XORLW       82
	BTFSS       STATUS+0, 2 
	GOTO        L__gsmEvent73
	GOTO        L__gsmEvent71
L__gsmEvent73:
	MOVF        FARG_gsmEvent_GsmEventType+0, 0 
	XORLW       84
	BTFSS       STATUS+0, 2 
	GOTO        L__gsmEvent74
L__gsmEvent71:
;GSM_PIC_clicker.mbas,247 :: 		strcpy(USBout, "Message send failed" + Chr(13) + Chr(10))
	MOVLW       _USBout+0
	MOVWF       FARG_strcpy_s1+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_strcpy_s1+1 
	MOVLW       77
	MOVWF       ?LocalText_gsmEvent_5+0 
	MOVLW       101
	MOVWF       ?LocalText_gsmEvent_5+1 
	MOVLW       115
	MOVWF       ?LocalText_gsmEvent_5+2 
	MOVLW       115
	MOVWF       ?LocalText_gsmEvent_5+3 
	MOVLW       97
	MOVWF       ?LocalText_gsmEvent_5+4 
	MOVLW       103
	MOVWF       ?LocalText_gsmEvent_5+5 
	MOVLW       101
	MOVWF       ?LocalText_gsmEvent_5+6 
	MOVLW       32
	MOVWF       ?LocalText_gsmEvent_5+7 
	MOVLW       115
	MOVWF       ?LocalText_gsmEvent_5+8 
	MOVLW       101
	MOVWF       ?LocalText_gsmEvent_5+9 
	MOVLW       110
	MOVWF       ?LocalText_gsmEvent_5+10 
	MOVLW       100
	MOVWF       ?LocalText_gsmEvent_5+11 
	MOVLW       32
	MOVWF       ?LocalText_gsmEvent_5+12 
	MOVLW       102
	MOVWF       ?LocalText_gsmEvent_5+13 
	MOVLW       97
	MOVWF       ?LocalText_gsmEvent_5+14 
	MOVLW       105
	MOVWF       ?LocalText_gsmEvent_5+15 
	MOVLW       108
	MOVWF       ?LocalText_gsmEvent_5+16 
	MOVLW       101
	MOVWF       ?LocalText_gsmEvent_5+17 
	MOVLW       100
	MOVWF       ?LocalText_gsmEvent_5+18 
	MOVLW       13
	MOVWF       ?LocalText_gsmEvent_5+19 
	MOVLW       10
	MOVWF       ?LocalText_gsmEvent_5+20 
	MOVLW       0
	MOVWF       ?LocalText_gsmEvent_5+21 
	MOVLW       ?LocalText_gsmEvent_5+0
	MOVWF       FARG_strcpy_s2+0 
	MOVLW       hi_addr(?LocalText_gsmEvent_5+0)
	MOVWF       FARG_strcpy_s2+1 
	CALL        _strcpy+0, 0
;GSM_PIC_clicker.mbas,248 :: 		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
	GOTO        L__gsmEvent55
L__gsmEvent74:
;GSM_PIC_clicker.mbas,250 :: 		case gsmevntDateTimeRead
	MOVF        FARG_gsmEvent_GsmEventType+0, 0 
	XORLW       150
	BTFSS       STATUS+0, 2 
	GOTO        L__gsmEvent77
;GSM_PIC_clicker.mbas,251 :: 		if dtmGsmEvent.Year > 10 then ' If the GSM modules date/time is valid
	MOVF        _dtmGsmEvent+0, 0 
	SUBLW       10
	BTFSC       STATUS+0, 0 
	GOTO        L__gsmEvent79
;GSM_PIC_clicker.mbas,255 :: 		strcpy(USBout, "Date/Time: ")
	MOVLW       _USBout+0
	MOVWF       FARG_strcpy_s1+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_strcpy_s1+1 
	MOVLW       68
	MOVWF       ?LocalText_gsmEvent_6+0 
	MOVLW       97
	MOVWF       ?LocalText_gsmEvent_6+1 
	MOVLW       116
	MOVWF       ?LocalText_gsmEvent_6+2 
	MOVLW       101
	MOVWF       ?LocalText_gsmEvent_6+3 
	MOVLW       47
	MOVWF       ?LocalText_gsmEvent_6+4 
	MOVLW       84
	MOVWF       ?LocalText_gsmEvent_6+5 
	MOVLW       105
	MOVWF       ?LocalText_gsmEvent_6+6 
	MOVLW       109
	MOVWF       ?LocalText_gsmEvent_6+7 
	MOVLW       101
	MOVWF       ?LocalText_gsmEvent_6+8 
	MOVLW       58
	MOVWF       ?LocalText_gsmEvent_6+9 
	MOVLW       32
	MOVWF       ?LocalText_gsmEvent_6+10 
	CLRF        ?LocalText_gsmEvent_6+11 
	MOVLW       ?LocalText_gsmEvent_6+0
	MOVWF       FARG_strcpy_s2+0 
	MOVLW       hi_addr(?LocalText_gsmEvent_6+0)
	MOVWF       FARG_strcpy_s2+1 
	CALL        _strcpy+0, 0
;GSM_PIC_clicker.mbas,256 :: 		pstr = @USBout + 11 'Point past the first 11 characters of the string
	MOVLW       11
	MOVWF       R0 
	MOVLW       0
	MOVWF       R1 
	MOVLW       _USBout+0
	ADDWF       R0, 1 
	MOVLW       hi_addr(_USBout+0)
	ADDWFC      R1, 1 
	MOVF        R0, 0 
	MOVWF       _pstr+0 
	MOVF        R1, 0 
	MOVWF       _pstr+1 
;GSM_PIC_clicker.mbas,257 :: 		RTCC_GenerateString(dtmGsmEvent, pstr)
	MOVLW       _dtmGsmEvent+0
	MOVWF       FARG_RTCC_GenerateString_dt+0 
	MOVLW       hi_addr(_dtmGsmEvent+0)
	MOVWF       FARG_RTCC_GenerateString_dt+1 
	MOVF        R0, 0 
	MOVWF       FARG_RTCC_GenerateString_rtccstring+0 
	MOVF        R1, 0 
	MOVWF       FARG_RTCC_GenerateString_rtccstring+1 
	CALL        _RTCC_GenerateString+0, 0
;GSM_PIC_clicker.mbas,258 :: 		strcat(USBout, Chr(13) + Chr(10))
	MOVLW       _USBout+0
	MOVWF       FARG_strcat_s1+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_strcat_s1+1 
	MOVLW       13
	MOVWF       ?LocalText_gsmEvent_7+0 
	MOVLW       10
	MOVWF       ?LocalText_gsmEvent_7+1 
	MOVLW       0
	MOVWF       ?LocalText_gsmEvent_7+2 
	MOVLW       ?LocalText_gsmEvent_7+0
	MOVWF       FARG_strcat_s2+0 
	MOVLW       hi_addr(?LocalText_gsmEvent_7+0)
	MOVWF       FARG_strcat_s2+1 
	CALL        _strcat+0, 0
;GSM_PIC_clicker.mbas,259 :: 		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
;GSM_PIC_clicker.mbas,261 :: 		dtmRTCC = dtmGsmEvent
	MOVLW       _dtmRTCC+0
	MOVWF       FSR1 
	MOVLW       hi_addr(_dtmRTCC+0)
	MOVWF       FSR1H 
	MOVLW       _dtmGsmEvent+0
	MOVWF       FSR2 
	MOVLW       hi_addr(_dtmGsmEvent+0)
	MOVWF       FSR2H 
	MOVLW       6
	MOVWF       R0 
	MOVLW       0
	MOVWF       R1 
	CALL        ___CA2AW+0, 0
;GSM_PIC_clicker.mbas,262 :: 		bitRTCC_Set = 1
	BSF         _bitRTCC_Set+0, BitPos(_bitRTCC_Set+0) 
	GOTO        L__gsmEvent80
;GSM_PIC_clicker.mbas,263 :: 		else
L__gsmEvent79:
;GSM_PIC_clicker.mbas,265 :: 		strcpy(USBout, "Date/Time not yet set." + Chr(13) + Chr(10))
	MOVLW       _USBout+0
	MOVWF       FARG_strcpy_s1+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_strcpy_s1+1 
	MOVLW       68
	MOVWF       ?LocalText_gsmEvent_8+0 
	MOVLW       97
	MOVWF       ?LocalText_gsmEvent_8+1 
	MOVLW       116
	MOVWF       ?LocalText_gsmEvent_8+2 
	MOVLW       101
	MOVWF       ?LocalText_gsmEvent_8+3 
	MOVLW       47
	MOVWF       ?LocalText_gsmEvent_8+4 
	MOVLW       84
	MOVWF       ?LocalText_gsmEvent_8+5 
	MOVLW       105
	MOVWF       ?LocalText_gsmEvent_8+6 
	MOVLW       109
	MOVWF       ?LocalText_gsmEvent_8+7 
	MOVLW       101
	MOVWF       ?LocalText_gsmEvent_8+8 
	MOVLW       32
	MOVWF       ?LocalText_gsmEvent_8+9 
	MOVLW       110
	MOVWF       ?LocalText_gsmEvent_8+10 
	MOVLW       111
	MOVWF       ?LocalText_gsmEvent_8+11 
	MOVLW       116
	MOVWF       ?LocalText_gsmEvent_8+12 
	MOVLW       32
	MOVWF       ?LocalText_gsmEvent_8+13 
	MOVLW       121
	MOVWF       ?LocalText_gsmEvent_8+14 
	MOVLW       101
	MOVWF       ?LocalText_gsmEvent_8+15 
	MOVLW       116
	MOVWF       ?LocalText_gsmEvent_8+16 
	MOVLW       32
	MOVWF       ?LocalText_gsmEvent_8+17 
	MOVLW       115
	MOVWF       ?LocalText_gsmEvent_8+18 
	MOVLW       101
	MOVWF       ?LocalText_gsmEvent_8+19 
	MOVLW       116
	MOVWF       ?LocalText_gsmEvent_8+20 
	MOVLW       46
	MOVWF       ?LocalText_gsmEvent_8+21 
	MOVLW       13
	MOVWF       ?LocalText_gsmEvent_8+22 
	MOVLW       10
	MOVWF       ?LocalText_gsmEvent_8+23 
	MOVLW       0
	MOVWF       ?LocalText_gsmEvent_8+24 
	MOVLW       ?LocalText_gsmEvent_8+0
	MOVWF       FARG_strcpy_s2+0 
	MOVLW       hi_addr(?LocalText_gsmEvent_8+0)
	MOVWF       FARG_strcpy_s2+1 
	CALL        _strcpy+0, 0
;GSM_PIC_clicker.mbas,266 :: 		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
;GSM_PIC_clicker.mbas,268 :: 		end if
L__gsmEvent80:
	GOTO        L__gsmEvent55
L__gsmEvent77:
;GSM_PIC_clicker.mbas,269 :: 		case gsmevntDateTimeWrite
	MOVF        FARG_gsmEvent_GsmEventType+0, 0 
	XORLW       151
	BTFSS       STATUS+0, 2 
	GOTO        L__gsmEvent83
;GSM_PIC_clicker.mbas,271 :: 		dtmGsmEvent = dtmRTCC
	MOVLW       _dtmGsmEvent+0
	MOVWF       FSR1 
	MOVLW       hi_addr(_dtmGsmEvent+0)
	MOVWF       FSR1H 
	MOVLW       _dtmRTCC+0
	MOVWF       FSR2 
	MOVLW       hi_addr(_dtmRTCC+0)
	MOVWF       FSR2H 
	MOVLW       6
	MOVWF       R0 
	MOVLW       0
	MOVWF       R1 
	CALL        ___CA2AW+0, 0
	GOTO        L__gsmEvent55
L__gsmEvent83:
;GSM_PIC_clicker.mbas,272 :: 		case gsmevntIMEI_Read
	MOVF        FARG_gsmEvent_GsmEventType+0, 0 
	XORLW       20
	BTFSS       STATUS+0, 2 
	GOTO        L__gsmEvent86
;GSM_PIC_clicker.mbas,274 :: 		strcpy(USBout, "IMEI: ")
	MOVLW       _USBout+0
	MOVWF       FARG_strcpy_s1+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_strcpy_s1+1 
	MOVLW       73
	MOVWF       ?LocalText_gsmEvent_9+0 
	MOVLW       77
	MOVWF       ?LocalText_gsmEvent_9+1 
	MOVLW       69
	MOVWF       ?LocalText_gsmEvent_9+2 
	MOVLW       73
	MOVWF       ?LocalText_gsmEvent_9+3 
	MOVLW       58
	MOVWF       ?LocalText_gsmEvent_9+4 
	MOVLW       32
	MOVWF       ?LocalText_gsmEvent_9+5 
	CLRF        ?LocalText_gsmEvent_9+6 
	MOVLW       ?LocalText_gsmEvent_9+0
	MOVWF       FARG_strcpy_s2+0 
	MOVLW       hi_addr(?LocalText_gsmEvent_9+0)
	MOVWF       FARG_strcpy_s2+1 
	CALL        _strcpy+0, 0
;GSM_PIC_clicker.mbas,275 :: 		strcat(USBout, pstrGsmEventData)
	MOVLW       _USBout+0
	MOVWF       FARG_strcat_s1+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_strcat_s1+1 
	MOVF        _pstrGsmEventData+0, 0 
	MOVWF       FARG_strcat_s2+0 
	MOVF        _pstrGsmEventData+1, 0 
	MOVWF       FARG_strcat_s2+1 
	CALL        _strcat+0, 0
;GSM_PIC_clicker.mbas,276 :: 		strcat(USBout, "" + Chr(13) + Chr(10))
	MOVLW       _USBout+0
	MOVWF       FARG_strcat_s1+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_strcat_s1+1 
	MOVLW       13
	MOVWF       ?LocalText_gsmEvent_10+0 
	MOVLW       10
	MOVWF       ?LocalText_gsmEvent_10+1 
	MOVLW       0
	MOVWF       ?LocalText_gsmEvent_10+2 
	MOVLW       ?LocalText_gsmEvent_10+0
	MOVWF       FARG_strcat_s2+0 
	MOVLW       hi_addr(?LocalText_gsmEvent_10+0)
	MOVWF       FARG_strcat_s2+1 
	CALL        _strcat+0, 0
;GSM_PIC_clicker.mbas,277 :: 		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
	GOTO        L__gsmEvent55
L__gsmEvent86:
L__gsmEvent55:
;GSM_PIC_clicker.mbas,280 :: 		end sub
L_end_gsmEvent:
	RETURN      0
; end of _gsmEvent

_main:

;GSM_PIC_clicker.mbas,282 :: 		main:
;GSM_PIC_clicker.mbas,283 :: 		setup()
	CALL        _setup+0, 0
;GSM_PIC_clicker.mbas,284 :: 		startup()
	CALL        _startup+0, 0
;GSM_PIC_clicker.mbas,285 :: 		gsmDateTimeRead()
	CALL        _gsmDateTimeRead+0, 0
;GSM_PIC_clicker.mbas,286 :: 		while true
L__main89:
;GSM_PIC_clicker.mbas,287 :: 		gsmPoll()
	CALL        _gsmPoll+0, 0
;GSM_PIC_clicker.mbas,290 :: 		if (wrdButtonTmr > 10000) then
	MOVF        _wrdButtonTmr+1, 0 
	SUBLW       39
	BTFSS       STATUS+0, 2 
	GOTO        L__main115
	MOVF        _wrdButtonTmr+0, 0 
	SUBLW       16
L__main115:
	BTFSC       STATUS+0, 0 
	GOTO        L__main94
;GSM_PIC_clicker.mbas,291 :: 		if (btn1 = 0) then
	BTFSC       RD3_bit+0, BitPos(RD3_bit+0) 
	GOTO        L__main97
;GSM_PIC_clicker.mbas,292 :: 		strcpy(strMsgSendTxt, "Button T1 pressed.")
	MOVLW       _strMsgSendTxt+0
	MOVWF       FARG_strcpy_s1+0 
	MOVLW       hi_addr(_strMsgSendTxt+0)
	MOVWF       FARG_strcpy_s1+1 
	MOVLW       66
	MOVWF       ?LocalText_main_11+0 
	MOVLW       117
	MOVWF       ?LocalText_main_11+1 
	MOVLW       116
	MOVWF       ?LocalText_main_11+2 
	MOVLW       116
	MOVWF       ?LocalText_main_11+3 
	MOVLW       111
	MOVWF       ?LocalText_main_11+4 
	MOVLW       110
	MOVWF       ?LocalText_main_11+5 
	MOVLW       32
	MOVWF       ?LocalText_main_11+6 
	MOVLW       84
	MOVWF       ?LocalText_main_11+7 
	MOVLW       49
	MOVWF       ?LocalText_main_11+8 
	MOVLW       32
	MOVWF       ?LocalText_main_11+9 
	MOVLW       112
	MOVWF       ?LocalText_main_11+10 
	MOVLW       114
	MOVWF       ?LocalText_main_11+11 
	MOVLW       101
	MOVWF       ?LocalText_main_11+12 
	MOVLW       115
	MOVWF       ?LocalText_main_11+13 
	MOVLW       115
	MOVWF       ?LocalText_main_11+14 
	MOVLW       101
	MOVWF       ?LocalText_main_11+15 
	MOVLW       100
	MOVWF       ?LocalText_main_11+16 
	MOVLW       46
	MOVWF       ?LocalText_main_11+17 
	CLRF        ?LocalText_main_11+18 
	MOVLW       ?LocalText_main_11+0
	MOVWF       FARG_strcpy_s2+0 
	MOVLW       hi_addr(?LocalText_main_11+0)
	MOVWF       FARG_strcpy_s2+1 
	CALL        _strcpy+0, 0
;GSM_PIC_clicker.mbas,293 :: 		msgSend()
	CALL        _msgSend+0, 0
;GSM_PIC_clicker.mbas,294 :: 		wrdButtonTmr = 0
	CLRF        _wrdButtonTmr+0 
	CLRF        _wrdButtonTmr+1 
	GOTO        L__main98
;GSM_PIC_clicker.mbas,295 :: 		else
L__main97:
;GSM_PIC_clicker.mbas,296 :: 		if (btn2 = 0) then
	BTFSC       RD2_bit+0, BitPos(RD2_bit+0) 
	GOTO        L__main100
;GSM_PIC_clicker.mbas,297 :: 		strcpy(strMsgSendTxt, "Button T2 pressed.")
	MOVLW       _strMsgSendTxt+0
	MOVWF       FARG_strcpy_s1+0 
	MOVLW       hi_addr(_strMsgSendTxt+0)
	MOVWF       FARG_strcpy_s1+1 
	MOVLW       66
	MOVWF       ?LocalText_main_12+0 
	MOVLW       117
	MOVWF       ?LocalText_main_12+1 
	MOVLW       116
	MOVWF       ?LocalText_main_12+2 
	MOVLW       116
	MOVWF       ?LocalText_main_12+3 
	MOVLW       111
	MOVWF       ?LocalText_main_12+4 
	MOVLW       110
	MOVWF       ?LocalText_main_12+5 
	MOVLW       32
	MOVWF       ?LocalText_main_12+6 
	MOVLW       84
	MOVWF       ?LocalText_main_12+7 
	MOVLW       50
	MOVWF       ?LocalText_main_12+8 
	MOVLW       32
	MOVWF       ?LocalText_main_12+9 
	MOVLW       112
	MOVWF       ?LocalText_main_12+10 
	MOVLW       114
	MOVWF       ?LocalText_main_12+11 
	MOVLW       101
	MOVWF       ?LocalText_main_12+12 
	MOVLW       115
	MOVWF       ?LocalText_main_12+13 
	MOVLW       115
	MOVWF       ?LocalText_main_12+14 
	MOVLW       101
	MOVWF       ?LocalText_main_12+15 
	MOVLW       100
	MOVWF       ?LocalText_main_12+16 
	MOVLW       46
	MOVWF       ?LocalText_main_12+17 
	CLRF        ?LocalText_main_12+18 
	MOVLW       ?LocalText_main_12+0
	MOVWF       FARG_strcpy_s2+0 
	MOVLW       hi_addr(?LocalText_main_12+0)
	MOVWF       FARG_strcpy_s2+1 
	CALL        _strcpy+0, 0
;GSM_PIC_clicker.mbas,298 :: 		msgSend()
	CALL        _msgSend+0, 0
;GSM_PIC_clicker.mbas,299 :: 		wrdButtonTmr = 0
	CLRF        _wrdButtonTmr+0 
	CLRF        _wrdButtonTmr+1 
L__main100:
;GSM_PIC_clicker.mbas,301 :: 		end if
L__main98:
L__main94:
;GSM_PIC_clicker.mbas,303 :: 		wend ' (while)
	GOTO        L__main89
L_end_main:
	GOTO        $+0
; end of _main
