
_interrupt:

;USB.c,34 :: 		void interrupt(){
;USB.c,35 :: 		USB_Interrupt_Proc();                 // USB servicing is done inside the interrupt
	CALL        _USB_Interrupt_Proc+0, 0
;USB.c,36 :: 		}
L_end_interrupt:
L__interrupt11:
	RETFIE      1
; end of _interrupt

_main:

;USB.c,38 :: 		void main(void){
;USB.c,39 :: 		int Count = 0;
	CLRF        main_Count_L0+0 
	CLRF        main_Count_L0+1 
;USB.c,40 :: 		TRISB.RB1 = 0; PORTB.RB1 = 0;
	BCF         TRISB+0, 1 
	BCF         PORTB+0, 1 
;USB.c,42 :: 		PLLEN_bit=1;                           // PLL turned on
	BSF         PLLEN_bit+0, BitPos(PLLEN_bit+0) 
;USB.c,43 :: 		Delay_ms(150);                         // wait for a while to oscillator stabilizes
	MOVLW       10
	MOVWF       R11, 0
	MOVLW       34
	MOVWF       R12, 0
	MOVLW       161
	MOVWF       R13, 0
L_main0:
	DECFSZ      R13, 1, 1
	BRA         L_main0
	DECFSZ      R12, 1, 1
	BRA         L_main0
	DECFSZ      R11, 1, 1
	BRA         L_main0
;USB.c,45 :: 		ANCON0 = 0xFF;                         // Default all pins to digital
	MOVLW       255
	MOVWF       ANCON0+0 
;USB.c,46 :: 		ANCON1 = 0xFF;
	MOVLW       255
	MOVWF       ANCON1+0 
;USB.c,48 :: 		HID_Enable(&readbuff,&writebuff);      // Enable HID communication
	MOVLW       _readbuff+0
	MOVWF       FARG_HID_Enable_readbuff+0 
	MOVLW       hi_addr(_readbuff+0)
	MOVWF       FARG_HID_Enable_readbuff+1 
	MOVLW       _writebuff+0
	MOVWF       FARG_HID_Enable_writebuff+0 
	MOVLW       hi_addr(_writebuff+0)
	MOVWF       FARG_HID_Enable_writebuff+1 
	CALL        _HID_Enable+0, 0
;USB.c,50 :: 		while(1){
L_main1:
;USB.c,51 :: 		while(!HID_Read());                  // wait for data on USB
L_main3:
	CALL        _HID_Read+0, 0
	MOVF        R0, 1 
	BTFSS       STATUS+0, 2 
	GOTO        L_main4
	GOTO        L_main3
L_main4:
;USB.c,53 :: 		for(cnt=0;cnt<64;cnt++)
	CLRF        _cnt+0 
L_main5:
	MOVLW       64
	SUBWF       _cnt+0, 0 
	BTFSC       STATUS+0, 0 
	GOTO        L_main6
;USB.c,54 :: 		writebuff[cnt]=readbuff[cnt];      // move data to output buffer
	MOVLW       _writebuff+0
	MOVWF       FSR1 
	MOVLW       hi_addr(_writebuff+0)
	MOVWF       FSR1H 
	MOVF        _cnt+0, 0 
	ADDWF       FSR1, 1 
	BTFSC       STATUS+0, 0 
	INCF        FSR1H, 1 
	MOVLW       _readbuff+0
	MOVWF       FSR0 
	MOVLW       hi_addr(_readbuff+0)
	MOVWF       FSR0H 
	MOVF        _cnt+0, 0 
	ADDWF       FSR0, 1 
	BTFSC       STATUS+0, 0 
	INCF        FSR0H, 1 
	MOVF        POSTINC0+0, 0 
	MOVWF       POSTINC1+0 
;USB.c,53 :: 		for(cnt=0;cnt<64;cnt++)
	INCF        _cnt+0, 1 
;USB.c,54 :: 		writebuff[cnt]=readbuff[cnt];      // move data to output buffer
	GOTO        L_main5
L_main6:
;USB.c,56 :: 		PORTB.RB1 = readbuff[63];
	BTFSC       1343, 0 
	GOTO        L__main13
	BCF         PORTB+0, 1 
	GOTO        L__main14
L__main13:
	BSF         PORTB+0, 1 
L__main14:
;USB.c,57 :: 		writebuff[0] = ++Count;
	INFSNZ      main_Count_L0+0, 1 
	INCF        main_Count_L0+1, 1 
	MOVF        main_Count_L0+0, 0 
	MOVWF       1344 
;USB.c,59 :: 		while(!HID_Write(&writebuff,64));    // echo the data back
L_main8:
	MOVLW       _writebuff+0
	MOVWF       FARG_HID_Write_writebuff+0 
	MOVLW       hi_addr(_writebuff+0)
	MOVWF       FARG_HID_Write_writebuff+1 
	MOVLW       64
	MOVWF       FARG_HID_Write_len+0 
	CALL        _HID_Write+0, 0
	MOVF        R0, 1 
	BTFSS       STATUS+0, 2 
	GOTO        L_main9
	GOTO        L_main8
L_main9:
;USB.c,60 :: 		}
	GOTO        L_main1
;USB.c,61 :: 		}
L_end_main:
	GOTO        $+0
; end of _main
