/roboti/Robiada/2007/SW/robot/_.obj |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/roboti/Robiada/2007/SW/robot/robot.asm |
---|
6,7 → 6,7 |
;///////////////////////////////////////////////////////////////////////////////// |
include "P18F252.inc" |
__HEAPSTART EQU 0x00000008 ; Start address of heap |
__HEAPSTART EQU 0x00000007 ; Start address of heap |
__HEAPEND EQU 0x000005FF ; End address of heap |
gbl_status EQU 0x00000FD8 ; bytes:1 |
gbl_prodl EQU 0x00000FF3 ; bytes:1 |
103,14 → 103,13 |
gbl_tosl EQU 0x00000FFD ; bytes:1 |
gbl_tosh EQU 0x00000FFE ; bytes:1 |
gbl_tosu EQU 0x00000FFF ; bytes:1 |
CompTempVarRet489 EQU 0x00000007 ; bytes:1 |
send_00000_arg_c EQU 0x00000007 ; bytes:1 |
CompTempVarRet489 EQU 0x00000006 ; bytes:1 |
send_00000_arg_c 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_count EQU 0x00000004 ; bytes:2 |
CompTempVar491 EQU 0x00000006 ; bytes:1 |
CompTempVar492 EQU 0x00000007 ; bytes:1 |
main_1_count EQU 0x00000004 ; bytes:1 |
CompTempVar491 EQU 0x00000005 ; bytes:1 |
ORG 0x00000200 |
GOTO _startup |
ORG 0x00000204 |
177,20 → 176,11 |
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 |
BC label268438604 |
DECF main_1_count, W |
MOVWF main_1_count |
MOVLW 0x01 |
IORWF main_1_leds, W |
204,10 → 194,10 |
MOVF main_1_leds, W |
MOVWF gbl_lata |
BRA label268438603 |
label268438605 |
label268438604 |
SETF main_1_leds |
SETF gbl_lata |
label268438623 |
label268438619 |
SETF main_1_sensors |
CALL receive_00000 |
MOVF CompTempVarRet489, W |
214,35 → 204,35 |
MOVWF main_1_sensors |
CLRF CompTempVar491 |
BTFSS main_1_sensors,1 |
BRA label268438628 |
BRA label268438624 |
BTFSS main_1_sensors,0 |
BRA label268438628 |
BRA label268438624 |
INCF CompTempVar491, F |
label268438628 |
label268438624 |
MOVF CompTempVar491, F |
BNZ label268438629 |
BNZ label268438625 |
MOVLW 0x77 |
MOVWF main_1_motors |
label268438629 |
label268438625 |
BTFSC main_1_sensors,2 |
BRA label268438632 |
BRA label268438628 |
MOVLW 0xF7 |
MOVWF main_1_motors |
label268438632 |
label268438628 |
BTFSC main_1_sensors,3 |
BRA label268438635 |
BRA label268438631 |
MOVLW 0x7F |
MOVWF main_1_motors |
label268438635 |
label268438631 |
MOVF main_1_sensors, W |
MOVWF gbl_lata |
MOVF main_1_motors, W |
MOVWF send_00000_arg_c |
CALL send_00000 |
BRA label268438623 |
BRA label268438619 |
; } main function end |
ORG 0x000002D8 |
ORG 0x000002C6 |
_startup |
GOTO main |
ORG 0x00300000 |
/roboti/Robiada/2007/SW/robot/robot.bas |
---|
38,7 → 38,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 |
/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 |
/roboti/Robiada/2007/SW/robot/robot.cof |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/roboti/Robiada/2007/SW/robot/robot.hex |
---|
1,18 → 1,17 |
:020000040000FA |
:100200006CEF01F09EA8FED70750AD6E1200ABA2B6 |
:1002100002D0AB98AB889EAAFED7AE50076E1200F4 |
:1002000063EF01F09EA8FED70650AD6E1200ABA2C0 |
:1002100002D0AB98AB889EAAFED7AE50066E1200F5 |
:1002200089688A6A8B68F00E926E3F0E936E9F0EFD |
:10023000946EC60EC16EC00EC26E400EAF6EFB0E47 |
:10024000AC14AC6E200EAC10AC6E100EAB10AB6EDE |
:10025000800EAB10AB6E016A81B0FED7F00E036E5C |
:10026000800E046E1A0E056E04500008D8B00550BA |
:1002700013E0010E045C076ED8A005060750046E5B |
:10028000010E0310036E020E0310036E040E031022 |
:10029000036E0350896EE8D703688968026807EC2B |
:1002A00001F00750026E066A02A203D002A001D03C |
:1002B000062A065202E1770E016E02B402D0F70E52 |
:1002C000016E02B602D07F0E016E0250896E01509F |
:0C02D000076E02EC01F0E2D710EF01F025 |
:10026000800E046E045000080EE20404046E010EB9 |
:100270000310036E020E0310036E040E0310036ED0 |
:100280000350896EEFD703688968026807EC01F0B4 |
:100290000650026E056A02A203D002A001D0052A10 |
:1002A000055202E1770E016E02B402D0F70E016E24 |
:1002B00002B602D07F0E016E0250896E0150066EAA |
:0A02C00002EC01F0E2D710EF01F0AC |
:020000040030CA |
:0E000000FFFEF6FEFFFEFBFFF03FFF9FFFBF7F |
:00000001FF |
/roboti/Robiada/2007/SW/robot/robot.lst |
---|
6,7 → 6,7 |
;///////////////////////////////////////////////////////////////////////////////// |
ORG 0x00000200 |
0200 EF6CF001 GOTO _startup |
0200 EF63F001 GOTO _startup |
ORG 0x00000204 |
0204 send_00000 |
0204 ; { send ; function begin |
13,7 → 13,7 |
0204 label268438562 |
0204 A89E BTFSS gbl_pir1,4 |
0206 D7FE BRA label268438562 |
0208 5007 MOVF send_00000_arg_c, W |
0208 5006 MOVF send_00000_arg_c, W |
020A 6EAD MOVWF gbl_txreg |
020C 0012 RETURN |
020E ; } send function end |
29,7 → 29,7 |
0216 AA9E BTFSS gbl_pir1,5 |
0218 D7FE BRA label268438551 |
021A 50AE MOVF gbl_rcreg, W |
021C 6E07 MOVWF CompTempVarRet489 |
021C 6E06 MOVWF CompTempVarRet489 |
021E 0012 RETURN |
0220 ; } receive function end |
71,74 → 71,65 |
025E 6E03 MOVWF main_1_leds |
0260 0E80 MOVLW 0x80 |
0262 6E04 MOVWF main_1_count |
0264 0E1A MOVLW 0x1A |
0266 6E05 MOVWF main_1_count+D'1' |
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 |
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 |
0280 0E01 MOVLW 0x01 |
0282 1003 IORWF main_1_leds, W |
0284 6E03 MOVWF main_1_leds |
0286 0E02 MOVLW 0x02 |
0288 1003 IORWF main_1_leds, W |
028A 6E03 MOVWF main_1_leds |
028C 0E04 MOVLW 0x04 |
028E 1003 IORWF main_1_leds, W |
0290 6E03 MOVWF main_1_leds |
0292 5003 MOVF main_1_leds, W |
0294 6E89 MOVWF gbl_lata |
0296 D7E8 BRA label268438603 |
0298 label268438605 |
0298 6803 SETF main_1_leds |
029A 6889 SETF gbl_lata |
029C label268438623 |
029C 6802 SETF main_1_sensors |
029E EC07F001 CALL receive_00000 |
02A2 5007 MOVF CompTempVarRet489, W |
02A4 6E02 MOVWF main_1_sensors |
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 |
02B6 0E77 MOVLW 0x77 |
02B8 6E01 MOVWF main_1_motors |
02BA label268438629 |
02BA B402 BTFSC main_1_sensors,2 |
02BC D002 BRA label268438632 |
02BE 0EF7 MOVLW 0xF7 |
02C0 6E01 MOVWF main_1_motors |
02C2 label268438632 |
02C2 B602 BTFSC main_1_sensors,3 |
02C4 D002 BRA label268438635 |
02C6 0E7F MOVLW 0x7F |
02C8 6E01 MOVWF main_1_motors |
02CA label268438635 |
02CA 5002 MOVF main_1_sensors, W |
02CC 6E89 MOVWF gbl_lata |
02CE 5001 MOVF main_1_motors, W |
02D0 6E07 MOVWF send_00000_arg_c |
02D2 EC02F001 CALL send_00000 |
02D6 D7E2 BRA label268438623 |
02D8 ; } main function end |
0264 label268438603 |
0264 5004 MOVF main_1_count, W |
0266 0800 SUBLW 0x00 |
0268 E20E BC label268438604 |
026A 0404 DECF main_1_count, W |
026C 6E04 MOVWF main_1_count |
026E 0E01 MOVLW 0x01 |
0270 1003 IORWF main_1_leds, W |
0272 6E03 MOVWF main_1_leds |
0274 0E02 MOVLW 0x02 |
0276 1003 IORWF main_1_leds, W |
0278 6E03 MOVWF main_1_leds |
027A 0E04 MOVLW 0x04 |
027C 1003 IORWF main_1_leds, W |
027E 6E03 MOVWF main_1_leds |
0280 5003 MOVF main_1_leds, W |
0282 6E89 MOVWF gbl_lata |
0284 D7EF BRA label268438603 |
0286 label268438604 |
0286 6803 SETF main_1_leds |
0288 6889 SETF gbl_lata |
028A label268438619 |
028A 6802 SETF main_1_sensors |
028C EC07F001 CALL receive_00000 |
0290 5006 MOVF CompTempVarRet489, W |
0292 6E02 MOVWF main_1_sensors |
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 |
02A4 0E77 MOVLW 0x77 |
02A6 6E01 MOVWF main_1_motors |
02A8 label268438625 |
02A8 B402 BTFSC main_1_sensors,2 |
02AA D002 BRA label268438628 |
02AC 0EF7 MOVLW 0xF7 |
02AE 6E01 MOVWF main_1_motors |
02B0 label268438628 |
02B0 B602 BTFSC main_1_sensors,3 |
02B2 D002 BRA label268438631 |
02B4 0E7F MOVLW 0x7F |
02B6 6E01 MOVWF main_1_motors |
02B8 label268438631 |
02B8 5002 MOVF main_1_sensors, W |
02BA 6E89 MOVWF gbl_lata |
02BC 5001 MOVF main_1_motors, W |
02BE 6E06 MOVWF send_00000_arg_c |
02C0 EC02F001 CALL send_00000 |
02C4 D7E2 BRA label268438619 |
02C6 ; } main function end |
ORG 0x000002D8 |
02D8 _startup |
02D8 EF10F001 GOTO main |
ORG 0x000002C6 |
02C6 _startup |
02C6 EF10F001 GOTO main |
ORG 0x00300000 |
300000 FEFF DW 0xFEFF |
300002 FEF6 DW 0xFEF6 |
/roboti/Robiada/2007/SW/robot/robot.stat |
---|
3,6 → 3,6 |
#GLOBAL:"global",line = 0,ram = 0.0,rom = 0; |
receive(void):"robot.bas",line = 21,ram = 1.0,rom = 18; |
send(unsigned char):"robot.bas",line = 32,ram = 0.0,rom = 10; |
main(void):"robot.bas",line = 45,ram = 7.4,rom = 184; |
main(void):"robot.bas",line = 45,ram = 5.4,rom = 166; |
_startup(void):"NoSourceFile",line = 0,ram = 0.0,rom = 4; |
#HEAP_BLOCK: 0, 8, 1528; |
#HEAP_BLOCK: 0, 7, 1529; |