Subversion Repositories svnkaklik

Rev

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    0x0000000B ; 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    0x0000000A ; bytes:1
send_00000_arg_c                 EQU    0x0000000A ; 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_leds1                     EQU    0x00000004 ; bytes:1
main_1_buttons                   EQU    0x00000005 ; bytes:1
main_1_i                         EQU    0x00000006 ; bytes:4
        ORG 0x00000200
        GOTO    _startup
        ORG 0x00000204
send_00000
; { send ; function begin
label268438561
        BTFSS gbl_pir1,4
        BRA     label268438561
        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     label268438550
        BCF gbl_rcsta,4
        BSF gbl_rcsta,4
label268438550
        BTFSS gbl_pir1,5
        BRA     label268438550
        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
        SETF main_1_leds
        MOVLW 0x0F
        MOVWF main_1_leds1
        CLRF main_1_motors
label268438595
        MOVF gbl_portb, W
        MOVWF main_1_buttons
        BTFSC main_1_buttons,1
        BRA     label268438598
        CLRF main_1_i
        CLRF main_1_i+D'1'
        CLRF main_1_i+D'2'
        CLRF main_1_i+D'3'
        DECF main_1_leds1, W
        MOVWF main_1_leds1
        MOVF main_1_leds1, W
        MOVWF gbl_lata
label268438603
        MOVF main_1_i+D'3', W
        SUBLW 0x00
        BNZ     label268438604
        MOVF main_1_i+D'2', W
        SUBLW 0x07
        BNZ     label268438604
        MOVF main_1_i+D'1', W
        SUBLW 0xA1
        BNZ     label268438604
        MOVF main_1_i, W
        SUBLW 0x20
label268438604
        BC      label4026532463
        BTFSS main_1_i+D'3',7
        BRA     label268438608
label4026532463
        INCF main_1_i, F
        BTFSC STATUS,Z
        INCF main_1_i+D'1', F
        BTFSC STATUS,Z
        INCF main_1_i+D'2', F
        BTFSC STATUS,Z
        INCF main_1_i+D'3', F
        BRA     label268438603
label268438608
        MOVLW 0x11
        ADDWF main_1_motors, W
        MOVWF main_1_motors
        BRA     label268438619
label268438598
        BTFSC main_1_buttons,4
        BRA     label268438619
        CLRF main_1_i
        CLRF main_1_i+D'1'
        CLRF main_1_i+D'2'
        CLRF main_1_i+D'3'
        INCF main_1_leds1, W
        MOVWF main_1_leds1
        MOVF main_1_leds1, W
        MOVWF gbl_lata
label268438624
        MOVF main_1_i+D'3', W
        SUBLW 0x00
        BNZ     label268438625
        MOVF main_1_i+D'2', W
        SUBLW 0x07
        BNZ     label268438625
        MOVF main_1_i+D'1', W
        SUBLW 0xA1
        BNZ     label268438625
        MOVF main_1_i, W
        SUBLW 0x20
label268438625
        BC      label4026532468
        BTFSS main_1_i+D'3',7
        BRA     label268438629
label4026532468
        INCF main_1_i, F
        BTFSC STATUS,Z
        INCF main_1_i+D'1', F
        BTFSC STATUS,Z
        INCF main_1_i+D'2', F
        BTFSC STATUS,Z
        INCF main_1_i+D'3', F
        BRA     label268438624
label268438629
        MOVLW 0x11
        SUBWF main_1_motors, W
        MOVWF main_1_motors
label268438619
        SETF main_1_leds
        SETF main_1_sensors
        CALL receive_00000
        MOVF CompTempVarRet489, W
        MOVWF main_1_sensors
        BTFSC main_1_sensors,0
        BRA     label268438643
        MOVLW 0xFD
        ANDWF main_1_leds, W
        MOVWF main_1_leds
label268438643
        BTFSC main_1_sensors,1
        BRA     label268438646
        MOVLW 0xFB
        ANDWF main_1_leds, W
        MOVWF main_1_leds
label268438646
        BTFSC main_1_sensors,2
        BRA     label268438649
        MOVLW 0xFE
        ANDWF main_1_leds, W
        MOVWF main_1_leds
label268438649
        BTFSC main_1_sensors,3
        BRA     label268438652
        MOVLW 0xF7
        ANDWF main_1_leds, W
        MOVWF main_1_leds
label268438652
        MOVF main_1_leds, W
        MOVWF gbl_lata
        MOVF main_1_motors, W
        MOVWF send_00000_arg_c
        CALL send_00000
        BRA     label268438595
; } main function end

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