Subversion Repositories svnkaklik

Compare Revisions

Regard whitespace Rev 320 → Rev 321

/roboti/Robiada/2007/SW/robot/robot.asm
6,7 → 6,7
;/////////////////////////////////////////////////////////////////////////////////
 
include "P18F252.inc"
__HEAPSTART EQU 0x0000000B ; Start address of heap
__HEAPSTART EQU 0x00000008 ; Start address of heap
__HEAPEND EQU 0x000005FF ; End address of heap
gbl_status EQU 0x00000FD8 ; bytes:1
gbl_prodl EQU 0x00000FF3 ; bytes:1
103,28 → 103,17
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
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
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
CompTempVar491 EQU 0x00000003 ; bytes:1
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
139,7 → 128,40
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
169,132 → 191,68
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
MOVLW 0x0E
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
MOVLW 0xC8
MOVWF delay_00000_arg_cas
CALL delay_00000
MOVLW 0x0D
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
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
label268438619
SETF main_1_leds
MOVLW 0x64
MOVWF delay_00000_arg_cas
CALL delay_00000
label268438640
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
CLRF CompTempVar491
BTFSS main_1_sensors,1
BRA label268438645
BTFSS main_1_sensors,0
BRA label268438645
INCF CompTempVar491, F
label268438645
MOVF CompTempVar491, F
BNZ label268438646
MOVLW 0x77
MOVWF main_1_motors
label268438646
BTFSC main_1_sensors,2
BRA label268438649
MOVLW 0xFE
ANDWF main_1_leds, W
MOVWF main_1_leds
MOVLW 0xF7
MOVWF main_1_motors
label268438649
BTFSC main_1_sensors,3
BRA label268438652
MOVLW 0xF7
ANDWF main_1_leds, W
MOVWF main_1_leds
MOVLW 0x7F
MOVWF main_1_motors
label268438652
MOVF main_1_leds, W
MOVF main_1_sensors, W
MOVWF gbl_lata
MOVF main_1_motors, W
MOVWF send_00000_arg_c
CALL send_00000
BRA label268438595
BRA label268438640
; } main function end
 
ORG 0x00000332
ORG 0x000002EE
_startup
GOTO main
ORG 0x00300000