Subversion Repositories svnkaklik

Rev

Rev 324 | Go to most recent revision | Blame | Last modification | View Log | Download

;/////////////////////////////////////////////////////////////////////////////////
;// Code Generator: BoostBasic Compiler - http://www.sourceboost.com
;// Version       : 6.70
;// License Type  : Pro License
;// Limitations   : PIC18 max code size:Unlimited, max RAM banks:Unlimited
;/////////////////////////////////////////////////////////////////////////////////

        include "P18F252.inc"
__HEAPSTART                      EQU    0x0000000F ; Start address of heap 
__HEAPEND                        EQU    0x000005FF ; End address of heap 
gbl_status                       EQU    0x00000FD8 ; bytes:1
gbl_prodl                        EQU    0x00000FF3 ; bytes:1
gbl_prodh                        EQU    0x00000FF4 ; bytes:1
gbl_porta                        EQU    0x00000F80 ; bytes:1
gbl_portb                        EQU    0x00000F81 ; bytes:1
gbl_portc                        EQU    0x00000F82 ; bytes:1
gbl_lata                         EQU    0x00000F89 ; bytes:1
gbl_latb                         EQU    0x00000F8A ; bytes:1
gbl_latc                         EQU    0x00000F8B ; bytes:1
gbl_trisa                        EQU    0x00000F92 ; bytes:1
gbl_trisb                        EQU    0x00000F93 ; bytes:1
gbl_trisc                        EQU    0x00000F94 ; bytes:1
gbl_pie1                         EQU    0x00000F9D ; bytes:1
gbl_pir1                         EQU    0x00000F9E ; bytes:1
gbl_ipr1                         EQU    0x00000F9F ; bytes:1
gbl_pie2                         EQU    0x00000FA0 ; bytes:1
gbl_pir2                         EQU    0x00000FA1 ; bytes:1
gbl_ipr2                         EQU    0x00000FA2 ; bytes:1
gbl_eecon1                       EQU    0x00000FA6 ; bytes:1
gbl_eecon2                       EQU    0x00000FA7 ; bytes:1
gbl_eedata                       EQU    0x00000FA8 ; bytes:1
gbl_eeadr                        EQU    0x00000FA9 ; bytes:1
gbl_rcsta                        EQU    0x00000FAB ; bytes:1
gbl_txsta                        EQU    0x00000FAC ; bytes:1
gbl_txreg                        EQU    0x00000FAD ; bytes:1
gbl_rcreg                        EQU    0x00000FAE ; bytes:1
gbl_spbrg                        EQU    0x00000FAF ; bytes:1
gbl_t3con                        EQU    0x00000FB1 ; bytes:1
gbl_tmr3l                        EQU    0x00000FB2 ; bytes:1
gbl_tmr3h                        EQU    0x00000FB3 ; bytes:1
gbl_ccp2con                      EQU    0x00000FBA ; bytes:1
gbl_ccpr2l                       EQU    0x00000FBB ; bytes:1
gbl_ccpr2h                       EQU    0x00000FBC ; bytes:1
gbl_ccp1con                      EQU    0x00000FBD ; bytes:1
gbl_ccpr1l                       EQU    0x00000FBE ; bytes:1
gbl_ccpr1h                       EQU    0x00000FBF ; bytes:1
gbl_adcon1                       EQU    0x00000FC1 ; bytes:1
gbl_adcon0                       EQU    0x00000FC2 ; bytes:1
gbl_adresl                       EQU    0x00000FC3 ; bytes:1
gbl_adresh                       EQU    0x00000FC4 ; bytes:1
gbl_sspcon2                      EQU    0x00000FC5 ; bytes:1
gbl_sspcon1                      EQU    0x00000FC6 ; bytes:1
gbl_sspstat                      EQU    0x00000FC7 ; bytes:1
gbl_sspadd                       EQU    0x00000FC8 ; bytes:1
gbl_sspbuf                       EQU    0x00000FC9 ; bytes:1
gbl_t2con                        EQU    0x00000FCA ; bytes:1
gbl_pr2                          EQU    0x00000FCB ; bytes:1
gbl_tmr2                         EQU    0x00000FCC ; bytes:1
gbl_t1con                        EQU    0x00000FCD ; bytes:1
gbl_tmr1l                        EQU    0x00000FCE ; bytes:1
gbl_tmr1h                        EQU    0x00000FCF ; bytes:1
gbl_rcon                         EQU    0x00000FD0 ; bytes:1
gbl_wdtcon                       EQU    0x00000FD1 ; bytes:1
gbl_lvdcon                       EQU    0x00000FD2 ; bytes:1
gbl_osccon                       EQU    0x00000FD3 ; bytes:1
gbl_t0con                        EQU    0x00000FD5 ; bytes:1
gbl_tmr0l                        EQU    0x00000FD6 ; bytes:1
gbl_tmr0h                        EQU    0x00000FD7 ; bytes:1
gbl_fsr2l                        EQU    0x00000FD9 ; bytes:1
gbl_fsr2h                        EQU    0x00000FDA ; bytes:1
gbl_plusw2                       EQU    0x00000FDB ; bytes:1
gbl_preinc2                      EQU    0x00000FDC ; bytes:1
gbl_postdec2                     EQU    0x00000FDD ; bytes:1
gbl_postinc2                     EQU    0x00000FDE ; bytes:1
gbl_indf2                        EQU    0x00000FDF ; bytes:1
gbl_bsr                          EQU    0x00000FE0 ; bytes:1
gbl_fsr1l                        EQU    0x00000FE1 ; bytes:1
gbl_fsr1h                        EQU    0x00000FE2 ; bytes:1
gbl_plusw1                       EQU    0x00000FE3 ; bytes:1
gbl_preinc1                      EQU    0x00000FE4 ; bytes:1
gbl_postdec1                     EQU    0x00000FE5 ; bytes:1
gbl_postinc1                     EQU    0x00000FE6 ; bytes:1
gbl_indf1                        EQU    0x00000FE7 ; bytes:1
gbl_wreg                         EQU    0x00000FE8 ; bytes:1
gbl_fsr0l                        EQU    0x00000FE9 ; bytes:1
gbl_fsr0h                        EQU    0x00000FEA ; bytes:1
gbl_plusw0                       EQU    0x00000FEB ; bytes:1
gbl_preinc0                      EQU    0x00000FEC ; bytes:1
gbl_postdec0                     EQU    0x00000FED ; bytes:1
gbl_postinc0                     EQU    0x00000FEE ; bytes:1
gbl_indf0                        EQU    0x00000FEF ; bytes:1
gbl_intcon3                      EQU    0x00000FF0 ; bytes:1
gbl_intcon2                      EQU    0x00000FF1 ; bytes:1
gbl_intcon                       EQU    0x00000FF2 ; bytes:1
gbl_tablat                       EQU    0x00000FF5 ; bytes:1
gbl_tblptrl                      EQU    0x00000FF6 ; bytes:1
gbl_tblptrh                      EQU    0x00000FF7 ; bytes:1
gbl_tblptru                      EQU    0x00000FF8 ; bytes:1
gbl_pcl                          EQU    0x00000FF9 ; bytes:1
gbl_pclath                       EQU    0x00000FFA ; bytes:1
gbl_pclatu                       EQU    0x00000FFB ; bytes:1
gbl_stkptr                       EQU    0x00000FFC ; bytes:1
gbl_tosl                         EQU    0x00000FFD ; bytes:1
gbl_tosh                         EQU    0x00000FFE ; bytes:1
gbl_tosu                         EQU    0x00000FFF ; bytes:1
CompTempVarRet489                EQU    0x0000000D ; bytes:1
send_00000_arg_c                 EQU    0x0000000D ; bytes:1
main_1_motors                    EQU    0x00000001 ; bytes:1
main_1_sensors                   EQU    0x00000002 ; bytes:1
main_1_leds                      EQU    0x00000003 ; bytes:1
main_1_count                     EQU    0x00000004 ; bytes:4
main_1_cas                       EQU    0x00000008 ; bytes:4
CompTempVar491                   EQU    0x0000000C ; bytes:1
CompTempVar492                   EQU    0x0000000D ; bytes:1
CompTempVar496                   EQU    0x0000000E ; bytes:1
        ORG 0x00000200
        GOTO    _startup
        ORG 0x00000204
send_00000
; { send ; function begin
label268438562
        BTFSS gbl_pir1,4
        BRA     label268438562
        MOVF send_00000_arg_c, W
        MOVWF gbl_txreg
        RETURN
; } send function end

        ORG 0x0000020E
receive_00000
; { receive ; function begin
        BTFSS gbl_rcsta,1
        BRA     label268438551
        BCF gbl_rcsta,4
        BSF gbl_rcsta,4
label268438551
        BTFSS gbl_pir1,5
        BRA     label268438551
        MOVF gbl_rcreg, W
        MOVWF CompTempVarRet489
        RETURN
; } receive function end

        ORG 0x00000220
main
; { main ; function begin
        SETF gbl_lata
        CLRF gbl_latb
        SETF gbl_latc
        MOVLW 0xF0
        MOVWF gbl_trisa
        MOVLW 0x3F
        MOVWF gbl_trisb
        MOVLW 0x9F
        MOVWF gbl_trisc
        MOVLW 0xC6
        MOVWF gbl_adcon1
        MOVLW 0xC0
        MOVWF gbl_adcon0
        MOVLW 0x40
        MOVWF gbl_spbrg
        MOVLW 0xFB
        ANDWF gbl_txsta, W
        MOVWF gbl_txsta
        MOVLW 0x20
        IORWF gbl_txsta, W
        MOVWF gbl_txsta
        MOVLW 0x10
        IORWF gbl_rcsta, W
        MOVWF gbl_rcsta
        MOVLW 0x80
        IORWF gbl_rcsta, W
        MOVWF gbl_rcsta
        CLRF main_1_motors
label268438599
        BTFSC gbl_portb,0
        BRA     label268438599
        MOVLW 0xF0
        MOVWF main_1_leds
        MOVLW 0x80
        MOVWF main_1_count
        MOVLW 0x1A
        MOVWF main_1_count+D'1'
        MOVLW 0x06
        MOVWF main_1_count+D'2'
        CLRF main_1_count+D'3'
label268438604
        MOVF main_1_count+D'3', W
        SUBLW 0x00
        BNZ     label268438605
        MOVF main_1_count+D'2', W
        SUBLW 0x00
        BNZ     label268438605
        MOVF main_1_count+D'1', W
        SUBLW 0x00
        BNZ     label268438605
        MOVF main_1_count, W
        SUBLW 0x00
label268438605
        BTFSC main_1_count+D'3',7
        BSF STATUS,C
        BC      label268438609
        MOVLW 0x01
        SUBWF main_1_count, W
        MOVWF CompTempVar492
        MOVLW 0x00
        MOVWF CompTempVar496
        BTFSS STATUS,C
        INCFSZ CompTempVar496, W
        SUBWF main_1_count+D'1', F
        MOVLW 0x00
        MOVWF CompTempVar496
        BTFSS STATUS,C
        INCFSZ CompTempVar496, W
        SUBWF main_1_count+D'2', F
        MOVLW 0x00
        MOVWF CompTempVar496
        BTFSS STATUS,C
        INCFSZ CompTempVar496, W
        SUBWF main_1_count+D'3', F
        MOVF CompTempVar492, W
        MOVWF main_1_count
        MOVLW 0x00
        SUBWF main_1_count+D'3', W
        BNZ     label268438621
        MOVLW 0x04
        SUBWF main_1_count+D'2', W
        BNZ     label268438621
        MOVLW 0x93
        SUBWF main_1_count+D'1', W
        BNZ     label268438621
        MOVLW 0xE0
        SUBWF main_1_count, W
label268438621
        BNC     label4026532557
        BTFSS main_1_count+D'3',7
        BRA     label268438625
label4026532557
        MOVLW 0x01
        IORWF main_1_leds, W
        MOVWF main_1_leds
label268438625
        MOVLW 0x00
        SUBWF main_1_count+D'3', W
        BNZ     label268438627
        MOVLW 0x03
        SUBWF main_1_count+D'2', W
        BNZ     label268438627
        MOVLW 0x0D
        SUBWF main_1_count+D'1', W
        BNZ     label268438627
        MOVLW 0x40
        SUBWF main_1_count, W
label268438627
        BNC     label4026532558
        BTFSS main_1_count+D'3',7
        BRA     label268438631
label4026532558
        MOVLW 0x02
        IORWF main_1_leds, W
        MOVWF main_1_leds
label268438631
        MOVLW 0x00
        SUBWF main_1_count+D'3', W
        BNZ     label268438633
        MOVLW 0x01
        SUBWF main_1_count+D'2', W
        BNZ     label268438633
        MOVLW 0x86
        SUBWF main_1_count+D'1', W
        BNZ     label268438633
        MOVLW 0xA0
        SUBWF main_1_count, W
label268438633
        BNC     label4026532559
        BTFSS main_1_count+D'3',7
        BRA     label268438637
label4026532559
        MOVLW 0x04
        IORWF main_1_leds, W
        MOVWF main_1_leds
label268438637
        MOVF main_1_leds, W
        MOVWF gbl_lata
        BRA     label268438604
label268438609
        SETF gbl_lata
label268438641
        CLRF main_1_cas
        CLRF main_1_cas+D'1'
        CLRF main_1_cas+D'2'
        CLRF main_1_cas+D'3'
        SETF main_1_sensors
        CALL receive_00000
        MOVF CompTempVarRet489, W
        MOVWF main_1_sensors
        CLRF CompTempVar491
        BTFSS main_1_sensors,1
        BRA     label268438647
        BTFSS main_1_sensors,0
        BRA     label268438647
        INCF CompTempVar491, F
label268438647
        MOVF CompTempVar491, F
        BNZ     label268438648
        MOVLW 0x77
        MOVWF main_1_motors
label268438648
        BTFSC main_1_sensors,2
        BRA     label268438651
        MOVLW 0x00
        SUBWF main_1_cas+D'3', W
        BNZ     label268438653
        MOVLW 0x06
        SUBWF main_1_cas+D'2', W
        BNZ     label268438653
        MOVLW 0x1A
        SUBWF main_1_cas+D'1', W
        BNZ     label268438653
        MOVLW 0x80
        SUBWF main_1_cas, W
label268438653
        BNC     label4026532563
        BTFSS main_1_cas+D'3',7
        BRA     label4026532566
label4026532563
        INCF main_1_cas, F
        BTFSC STATUS,Z
        INCF main_1_cas+D'1', F
        BTFSC STATUS,Z
        INCF main_1_cas+D'2', F
        BTFSC STATUS,Z
        INCF main_1_cas+D'3', F
label4026532566
        CLRF main_1_cas
        CLRF main_1_cas+D'1'
        CLRF main_1_cas+D'2'
        CLRF main_1_cas+D'3'
        MOVLW 0xF7
        MOVWF main_1_motors
label268438651
        BTFSC main_1_sensors,3
        BRA     label268438668
        MOVLW 0x00
        SUBWF main_1_cas+D'3', W
        BNZ     label268438670
        MOVLW 0x06
        SUBWF main_1_cas+D'2', W
        BNZ     label268438670
        MOVLW 0x1A
        SUBWF main_1_cas+D'1', W
        BNZ     label268438670
        MOVLW 0x80
        SUBWF main_1_cas, W
label268438670
        BNC     label4026532568
        BTFSS main_1_cas+D'3',7
        BRA     label4026532571
label4026532568
        INCF main_1_cas, F
        BTFSC STATUS,Z
        INCF main_1_cas+D'1', F
        BTFSC STATUS,Z
        INCF main_1_cas+D'2', F
        BTFSC STATUS,Z
        INCF main_1_cas+D'3', F
label4026532571
        CLRF main_1_cas
        CLRF main_1_cas+D'1'
        CLRF main_1_cas+D'2'
        CLRF main_1_cas+D'3'
        MOVLW 0x7F
        MOVWF main_1_motors
label268438668
        INCF main_1_cas, F
        BTFSC STATUS,Z
        INCF main_1_cas+D'1', F
        BTFSC STATUS,Z
        INCF main_1_cas+D'2', F
        BTFSC STATUS,Z
        INCF main_1_cas+D'3', F
        MOVF main_1_sensors, W
        MOVWF gbl_lata
        MOVF main_1_motors, W
        MOVWF send_00000_arg_c
        CALL send_00000
        BRA     label268438641
; } main function end

        ORG 0x000003D6
_startup
        GOTO    main
        ORG 0x00300000
        DW 0xFEFF
        DW 0xFEF6
        ORG 0x00300004
        DW 0xFEFF
        DW 0xFFFB
        ORG 0x00300008
        DW 0x3FF0
        DW 0x9FFF
        DW 0xBFFF
        END