Subversion Repositories svnkaklik

Compare Revisions

Regard whitespace Rev 322 → Rev 323

/roboti/Robiada/2007/SW/robot/robot.casm
45,7 → 45,7
Loop
receive = rcreg
021A 50AE MOVF gbl_rcreg, W
021C 6E07 MOVWF CompTempVarRet489
021C 6E06 MOVWF CompTempVarRet489
 
End Function
60,7 → 60,7
0206 D7FE BRA label268438562
 
txreg = c
0208 5007 MOVF send_00000_arg_c, W
0208 5006 MOVF send_00000_arg_c, W
020A 6EAD MOVWF gbl_txreg
 
End Sub
73,7 → 73,7
Dim sensors As Byte
Dim buttons As Byte
Dim leds As Byte
Dim count As word
Dim count As Byte
Dim i As Long
 
'NASTAVENI IO
153,130 → 153,121
count = 400000
0260 0E80 MOVLW 0x80
0262 6E04 MOVWF main_1_count
0264 0E1A MOVLW 0x1A
0266 6E05 MOVWF main_1_count+D'1'
 
do while (count > 0)
0268 label268438603
0268 5004 MOVF main_1_count, W
026A 0800 SUBLW 0x00
026C B0D8 BTFSC STATUS,C
026E 5005 MOVF main_1_count+D'1', W
0270 E013 BZ label268438605
0264 label268438603
0264 5004 MOVF main_1_count, W
0266 0800 SUBLW 0x00
0268 E20E BC label268438604
 
count = count -1
0272 0E01 MOVLW 0x01
0274 5C04 SUBWF main_1_count, W
0276 6E07 MOVWF CompTempVar492
0278 A0D8 BTFSS STATUS,C
027A 0605 DECF main_1_count+D'1', F
027C 5007 MOVF CompTempVar492, W
027E 6E04 MOVWF main_1_count
026A 0404 DECF main_1_count, W
026C 6E04 MOVWF main_1_count
 
if count < 300000 then
leds = leds | 1
0280 0E01 MOVLW 0x01
0282 1003 IORWF main_1_leds, W
0284 6E03 MOVWF main_1_leds
026E 0E01 MOVLW 0x01
0270 1003 IORWF main_1_leds, W
0272 6E03 MOVWF main_1_leds
 
end if
if count < 200000 then
leds = leds | 2
0286 0E02 MOVLW 0x02
0288 1003 IORWF main_1_leds, W
028A 6E03 MOVWF main_1_leds
0274 0E02 MOVLW 0x02
0276 1003 IORWF main_1_leds, W
0278 6E03 MOVWF main_1_leds
 
end if
if count < 100000 then
leds = leds | 4
028C 0E04 MOVLW 0x04
028E 1003 IORWF main_1_leds, W
0290 6E03 MOVWF main_1_leds
027A 0E04 MOVLW 0x04
027C 1003 IORWF main_1_leds, W
027E 6E03 MOVWF main_1_leds
 
end if
lata = leds
0292 5003 MOVF main_1_leds, W
0294 6E89 MOVWF gbl_lata
0280 5003 MOVF main_1_leds, W
0282 6E89 MOVWF gbl_lata
 
loop
0296 D7E8 BRA label268438603
0298 label268438605
0284 D7EF BRA label268438603
0286 label268438604
 
leds = 0xFF
0298 6803 SETF main_1_leds
0286 6803 SETF main_1_leds
 
lata = 0xFF
029A 6889 SETF gbl_lata
0288 6889 SETF gbl_lata
 
 
Do while 1
029C label268438623
028A label268438619
 
 
sensors =0xFF
029C 6802 SETF main_1_sensors
028A 6802 SETF main_1_sensors
 
sensors = Call receive() 'prijmi stav cidel senzoru
029E EC07F001 CALL receive_00000
02A2 5007 MOVF CompTempVarRet489, W
02A4 6E02 MOVWF main_1_sensors
028C EC07F001 CALL receive_00000
0290 5006 MOVF CompTempVarRet489, W
0292 6E02 MOVWF main_1_sensors
 
If (!((sensors.0) and (sensors.1))) Then
02A6 6A06 CLRF CompTempVar491
02A8 A202 BTFSS main_1_sensors,1
02AA D003 BRA label268438628
02AC A002 BTFSS main_1_sensors,0
02AE D001 BRA label268438628
02B0 2A06 INCF CompTempVar491, F
02B2 label268438628
02B2 5206 MOVF CompTempVar491, F
02B4 E102 BNZ label268438629
02BA label268438629
0294 6A05 CLRF CompTempVar491
0296 A202 BTFSS main_1_sensors,1
0298 D003 BRA label268438624
029A A002 BTFSS main_1_sensors,0
029C D001 BRA label268438624
029E 2A05 INCF CompTempVar491, F
02A0 label268438624
02A0 5205 MOVF CompTempVar491, F
02A2 E102 BNZ label268438625
02A8 label268438625
 
motors = 0x77
02B6 0E77 MOVLW 0x77
02B8 6E01 MOVWF main_1_motors
02A4 0E77 MOVLW 0x77
02A6 6E01 MOVWF main_1_motors
 
End If
If (!(sensors.2)) Then
02BA B402 BTFSC main_1_sensors,2
02BC D002 BRA label268438632
02C2 label268438632
02A8 B402 BTFSC main_1_sensors,2
02AA D002 BRA label268438628
02B0 label268438628
 
motors = 0xF7
02BE 0EF7 MOVLW 0xF7
02C0 6E01 MOVWF main_1_motors
02AC 0EF7 MOVLW 0xF7
02AE 6E01 MOVWF main_1_motors
 
End If
If (!(sensors.3)) Then
02C2 B602 BTFSC main_1_sensors,3
02C4 D002 BRA label268438635
02CA label268438635
02B0 B602 BTFSC main_1_sensors,3
02B2 D002 BRA label268438631
02B8 label268438631
 
motors = 0x7F
02C6 0E7F MOVLW 0x7F
02C8 6E01 MOVWF main_1_motors
02B4 0E7F MOVLW 0x7F
02B6 6E01 MOVWF main_1_motors
 
End If
lata = sensors
02CA 5002 MOVF main_1_sensors, W
02CC 6E89 MOVWF gbl_lata
02B8 5002 MOVF main_1_sensors, W
02BA 6E89 MOVWF gbl_lata
 
call send(motors)
02CE 5001 MOVF main_1_motors, W
02D0 6E07 MOVWF send_00000_arg_c
02D2 EC02F001 CALL send_00000
02BC 5001 MOVF main_1_motors, W
02BE 6E06 MOVWF send_00000_arg_c
02C0 EC02F001 CALL send_00000
 
Loop
02D6 D7E2 BRA label268438623
02C4 D7E2 BRA label268438619
 
End Sub
285,11 → 276,11
////////////////////////////////////////
// Code with no source :-)
////////////////////////////////////////
0200 EF6CF001 GOTO _startup
0200 EF63F001 GOTO _startup
 
 
02D8 _startup
02D8 EF10F001 GOTO main
02C6 _startup
02C6 EF10F001 GOTO main
 
300000 FEFF DW 0xFEFF
300002 FEF6 DW 0xFEF6