Subversion Repositories svnkaklik

Compare Revisions

Ignore whitespace Rev 321 → Rev 322

/roboti/Robiada/2007/SW/robot/robot.asm
104,64 → 104,42
gbl_tosh EQU 0x00000FFE ; bytes:1
gbl_tosu EQU 0x00000FFF ; bytes:1
CompTempVarRet489 EQU 0x00000007 ; bytes:1
send_00000_arg_c EQU 0x00000004 ; bytes:1
delay_00000_arg_cas EQU 0x00000004 ; bytes:1
delay_00000_1_i EQU 0x00000005 ; bytes:1
delay_00000_1_x EQU 0x00000006 ; bytes:1
send_00000_arg_c EQU 0x00000007 ; bytes:1
main_1_motors EQU 0x00000001 ; bytes:1
main_1_sensors EQU 0x00000002 ; bytes:1
CompTempVar491 EQU 0x00000003 ; bytes:1
main_1_leds EQU 0x00000003 ; bytes:1
main_1_count EQU 0x00000004 ; bytes:2
CompTempVar491 EQU 0x00000006 ; bytes:1
CompTempVar492 EQU 0x00000007 ; 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 label268438550
BRA label268438551
BCF gbl_rcsta,4
BSF gbl_rcsta,4
label268438550
label268438551
BTFSS gbl_pir1,5
BRA label268438550
BRA label268438551
MOVF gbl_rcreg, W
MOVWF CompTempVarRet489
RETURN
; } receive function end
 
ORG 0x00000216
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 0x00000220
delay_00000
; { delay ; function begin
label268438570
MOVF delay_00000_1_i, W
SUBWF delay_00000_arg_cas, W
BTFSS STATUS,C
RETURN
label4026532417
MOVF delay_00000_1_x, W
SUBLW 0x64
BNC label268438574
CALL receive_00000
INCF delay_00000_1_x, W
MOVWF delay_00000_1_x
BRA label4026532417
label268438574
INCF delay_00000_1_i, W
MOVWF delay_00000_1_i
BRA label268438570
; } delay function end
 
ORG 0x0000023E
main
; { main ; function begin
SETF gbl_lata
192,32 → 170,44
IORWF gbl_rcsta, W
MOVWF gbl_rcsta
CLRF main_1_motors
MOVLW 0x0E
label268438598
BTFSC gbl_portb,0
BRA label268438598
MOVLW 0xF0
MOVWF main_1_leds
MOVLW 0x80
MOVWF main_1_count
MOVLW 0x1A
MOVWF main_1_count+D'1'
label268438603
MOVF main_1_count, W
SUBLW 0x00
BTFSC STATUS,C
MOVF main_1_count+D'1', W
BZ label268438605
MOVLW 0x01
SUBWF main_1_count, W
MOVWF CompTempVar492
BTFSS STATUS,C
DECF main_1_count+D'1', F
MOVF CompTempVar492, W
MOVWF main_1_count
MOVLW 0x01
IORWF main_1_leds, W
MOVWF main_1_leds
MOVLW 0x02
IORWF main_1_leds, W
MOVWF main_1_leds
MOVLW 0x04
IORWF main_1_leds, W
MOVWF main_1_leds
MOVF main_1_leds, W
MOVWF gbl_lata
MOVLW 0xC8
MOVWF delay_00000_arg_cas
CALL delay_00000
MOVLW 0x0D
MOVWF gbl_lata
MOVLW 0xC8
MOVWF delay_00000_arg_cas
CALL delay_00000
MOVLW 0x0B
MOVWF gbl_lata
MOVLW 0xC8
MOVWF delay_00000_arg_cas
CALL delay_00000
MOVLW 0x07
MOVWF gbl_lata
MOVLW 0xC8
MOVWF delay_00000_arg_cas
CALL delay_00000
MOVLW 0x77
MOVWF main_1_motors
MOVLW 0x64
MOVWF delay_00000_arg_cas
CALL delay_00000
label268438640
BRA label268438603
label268438605
SETF main_1_leds
SETF gbl_lata
label268438623
SETF main_1_sensors
CALL receive_00000
MOVF CompTempVarRet489, W
224,35 → 214,35
MOVWF main_1_sensors
CLRF CompTempVar491
BTFSS main_1_sensors,1
BRA label268438645
BRA label268438628
BTFSS main_1_sensors,0
BRA label268438645
BRA label268438628
INCF CompTempVar491, F
label268438645
label268438628
MOVF CompTempVar491, F
BNZ label268438646
BNZ label268438629
MOVLW 0x77
MOVWF main_1_motors
label268438646
label268438629
BTFSC main_1_sensors,2
BRA label268438649
BRA label268438632
MOVLW 0xF7
MOVWF main_1_motors
label268438649
label268438632
BTFSC main_1_sensors,3
BRA label268438652
BRA label268438635
MOVLW 0x7F
MOVWF main_1_motors
label268438652
label268438635
MOVF main_1_sensors, W
MOVWF gbl_lata
MOVF main_1_motors, W
MOVWF send_00000_arg_c
CALL send_00000
BRA label268438640
BRA label268438623
; } main function end
 
ORG 0x000002EE
ORG 0x000002D8
_startup
GOTO main
ORG 0x00300000