Subversion Repositories svnkaklik

Rev

Rev 322 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log

Rev Author Line No. Line
318 kaklik 1
;/////////////////////////////////////////////////////////////////////////////////
2
;// Code Generator: BoostBasic Compiler - http://www.sourceboost.com
3
;// Version       : 6.70
4
;// License Type  : Pro License
5
;// Limitations   : PIC18 max code size:Unlimited, max RAM banks:Unlimited
6
;/////////////////////////////////////////////////////////////////////////////////
7
 
8
	include "P18F252.inc"
323 kaklik 9
__HEAPSTART                      EQU	0x00000007 ; Start address of heap 
318 kaklik 10
__HEAPEND                        EQU	0x000005FF ; End address of heap 
11
gbl_status                       EQU	0x00000FD8 ; bytes:1
12
gbl_prodl                        EQU	0x00000FF3 ; bytes:1
13
gbl_prodh                        EQU	0x00000FF4 ; bytes:1
14
gbl_porta                        EQU	0x00000F80 ; bytes:1
15
gbl_portb                        EQU	0x00000F81 ; bytes:1
16
gbl_portc                        EQU	0x00000F82 ; bytes:1
17
gbl_lata                         EQU	0x00000F89 ; bytes:1
18
gbl_latb                         EQU	0x00000F8A ; bytes:1
19
gbl_latc                         EQU	0x00000F8B ; bytes:1
20
gbl_trisa                        EQU	0x00000F92 ; bytes:1
21
gbl_trisb                        EQU	0x00000F93 ; bytes:1
22
gbl_trisc                        EQU	0x00000F94 ; bytes:1
23
gbl_pie1                         EQU	0x00000F9D ; bytes:1
24
gbl_pir1                         EQU	0x00000F9E ; bytes:1
25
gbl_ipr1                         EQU	0x00000F9F ; bytes:1
26
gbl_pie2                         EQU	0x00000FA0 ; bytes:1
27
gbl_pir2                         EQU	0x00000FA1 ; bytes:1
28
gbl_ipr2                         EQU	0x00000FA2 ; bytes:1
29
gbl_eecon1                       EQU	0x00000FA6 ; bytes:1
30
gbl_eecon2                       EQU	0x00000FA7 ; bytes:1
31
gbl_eedata                       EQU	0x00000FA8 ; bytes:1
32
gbl_eeadr                        EQU	0x00000FA9 ; bytes:1
33
gbl_rcsta                        EQU	0x00000FAB ; bytes:1
34
gbl_txsta                        EQU	0x00000FAC ; bytes:1
35
gbl_txreg                        EQU	0x00000FAD ; bytes:1
36
gbl_rcreg                        EQU	0x00000FAE ; bytes:1
37
gbl_spbrg                        EQU	0x00000FAF ; bytes:1
38
gbl_t3con                        EQU	0x00000FB1 ; bytes:1
39
gbl_tmr3l                        EQU	0x00000FB2 ; bytes:1
40
gbl_tmr3h                        EQU	0x00000FB3 ; bytes:1
41
gbl_ccp2con                      EQU	0x00000FBA ; bytes:1
42
gbl_ccpr2l                       EQU	0x00000FBB ; bytes:1
43
gbl_ccpr2h                       EQU	0x00000FBC ; bytes:1
44
gbl_ccp1con                      EQU	0x00000FBD ; bytes:1
45
gbl_ccpr1l                       EQU	0x00000FBE ; bytes:1
46
gbl_ccpr1h                       EQU	0x00000FBF ; bytes:1
47
gbl_adcon1                       EQU	0x00000FC1 ; bytes:1
48
gbl_adcon0                       EQU	0x00000FC2 ; bytes:1
49
gbl_adresl                       EQU	0x00000FC3 ; bytes:1
50
gbl_adresh                       EQU	0x00000FC4 ; bytes:1
51
gbl_sspcon2                      EQU	0x00000FC5 ; bytes:1
52
gbl_sspcon1                      EQU	0x00000FC6 ; bytes:1
53
gbl_sspstat                      EQU	0x00000FC7 ; bytes:1
54
gbl_sspadd                       EQU	0x00000FC8 ; bytes:1
55
gbl_sspbuf                       EQU	0x00000FC9 ; bytes:1
56
gbl_t2con                        EQU	0x00000FCA ; bytes:1
57
gbl_pr2                          EQU	0x00000FCB ; bytes:1
58
gbl_tmr2                         EQU	0x00000FCC ; bytes:1
59
gbl_t1con                        EQU	0x00000FCD ; bytes:1
60
gbl_tmr1l                        EQU	0x00000FCE ; bytes:1
61
gbl_tmr1h                        EQU	0x00000FCF ; bytes:1
62
gbl_rcon                         EQU	0x00000FD0 ; bytes:1
63
gbl_wdtcon                       EQU	0x00000FD1 ; bytes:1
64
gbl_lvdcon                       EQU	0x00000FD2 ; bytes:1
65
gbl_osccon                       EQU	0x00000FD3 ; bytes:1
66
gbl_t0con                        EQU	0x00000FD5 ; bytes:1
67
gbl_tmr0l                        EQU	0x00000FD6 ; bytes:1
68
gbl_tmr0h                        EQU	0x00000FD7 ; bytes:1
69
gbl_fsr2l                        EQU	0x00000FD9 ; bytes:1
70
gbl_fsr2h                        EQU	0x00000FDA ; bytes:1
71
gbl_plusw2                       EQU	0x00000FDB ; bytes:1
72
gbl_preinc2                      EQU	0x00000FDC ; bytes:1
73
gbl_postdec2                     EQU	0x00000FDD ; bytes:1
74
gbl_postinc2                     EQU	0x00000FDE ; bytes:1
75
gbl_indf2                        EQU	0x00000FDF ; bytes:1
76
gbl_bsr                          EQU	0x00000FE0 ; bytes:1
77
gbl_fsr1l                        EQU	0x00000FE1 ; bytes:1
78
gbl_fsr1h                        EQU	0x00000FE2 ; bytes:1
79
gbl_plusw1                       EQU	0x00000FE3 ; bytes:1
80
gbl_preinc1                      EQU	0x00000FE4 ; bytes:1
81
gbl_postdec1                     EQU	0x00000FE5 ; bytes:1
82
gbl_postinc1                     EQU	0x00000FE6 ; bytes:1
83
gbl_indf1                        EQU	0x00000FE7 ; bytes:1
84
gbl_wreg                         EQU	0x00000FE8 ; bytes:1
85
gbl_fsr0l                        EQU	0x00000FE9 ; bytes:1
86
gbl_fsr0h                        EQU	0x00000FEA ; bytes:1
87
gbl_plusw0                       EQU	0x00000FEB ; bytes:1
88
gbl_preinc0                      EQU	0x00000FEC ; bytes:1
89
gbl_postdec0                     EQU	0x00000FED ; bytes:1
90
gbl_postinc0                     EQU	0x00000FEE ; bytes:1
91
gbl_indf0                        EQU	0x00000FEF ; bytes:1
92
gbl_intcon3                      EQU	0x00000FF0 ; bytes:1
93
gbl_intcon2                      EQU	0x00000FF1 ; bytes:1
94
gbl_intcon                       EQU	0x00000FF2 ; bytes:1
95
gbl_tablat                       EQU	0x00000FF5 ; bytes:1
96
gbl_tblptrl                      EQU	0x00000FF6 ; bytes:1
97
gbl_tblptrh                      EQU	0x00000FF7 ; bytes:1
98
gbl_tblptru                      EQU	0x00000FF8 ; bytes:1
99
gbl_pcl                          EQU	0x00000FF9 ; bytes:1
100
gbl_pclath                       EQU	0x00000FFA ; bytes:1
101
gbl_pclatu                       EQU	0x00000FFB ; bytes:1
102
gbl_stkptr                       EQU	0x00000FFC ; bytes:1
103
gbl_tosl                         EQU	0x00000FFD ; bytes:1
104
gbl_tosh                         EQU	0x00000FFE ; bytes:1
105
gbl_tosu                         EQU	0x00000FFF ; bytes:1
323 kaklik 106
CompTempVarRet489                EQU	0x00000006 ; bytes:1
107
send_00000_arg_c                 EQU	0x00000006 ; bytes:1
318 kaklik 108
main_1_motors                    EQU	0x00000001 ; bytes:1
109
main_1_sensors                   EQU	0x00000002 ; bytes:1
322 kaklik 110
main_1_leds                      EQU	0x00000003 ; bytes:1
323 kaklik 111
main_1_count                     EQU	0x00000004 ; bytes:1
112
CompTempVar491                   EQU	0x00000005 ; bytes:1
318 kaklik 113
	ORG 0x00000200
114
	GOTO	_startup
115
	ORG 0x00000204
322 kaklik 116
send_00000
117
; { send ; function begin
118
label268438562
119
	BTFSS gbl_pir1,4
120
	BRA	label268438562
121
	MOVF send_00000_arg_c, W
122
	MOVWF gbl_txreg
123
	RETURN
124
; } send function end
125
 
126
	ORG 0x0000020E
318 kaklik 127
receive_00000
128
; { receive ; function begin
129
	BTFSS gbl_rcsta,1
322 kaklik 130
	BRA	label268438551
318 kaklik 131
	BCF gbl_rcsta,4
132
	BSF gbl_rcsta,4
322 kaklik 133
label268438551
318 kaklik 134
	BTFSS gbl_pir1,5
322 kaklik 135
	BRA	label268438551
318 kaklik 136
	MOVF gbl_rcreg, W
137
	MOVWF CompTempVarRet489
138
	RETURN
139
; } receive function end
140
 
141
	ORG 0x00000220
142
main
143
; { main ; function begin
144
	SETF gbl_lata
145
	CLRF gbl_latb
146
	SETF gbl_latc
147
	MOVLW 0xF0
148
	MOVWF gbl_trisa
149
	MOVLW 0x3F
150
	MOVWF gbl_trisb
151
	MOVLW 0x9F
152
	MOVWF gbl_trisc
153
	MOVLW 0xC6
154
	MOVWF gbl_adcon1
155
	MOVLW 0xC0
156
	MOVWF gbl_adcon0
157
	MOVLW 0x40
158
	MOVWF gbl_spbrg
159
	MOVLW 0xFB
160
	ANDWF gbl_txsta, W
161
	MOVWF gbl_txsta
162
	MOVLW 0x20
163
	IORWF gbl_txsta, W
164
	MOVWF gbl_txsta
165
	MOVLW 0x10
166
	IORWF gbl_rcsta, W
167
	MOVWF gbl_rcsta
168
	MOVLW 0x80
169
	IORWF gbl_rcsta, W
170
	MOVWF gbl_rcsta
171
	CLRF main_1_motors
322 kaklik 172
label268438598
173
	BTFSC gbl_portb,0
174
	BRA	label268438598
175
	MOVLW 0xF0
176
	MOVWF main_1_leds
177
	MOVLW 0x80
178
	MOVWF main_1_count
179
label268438603
180
	MOVF main_1_count, W
181
	SUBLW 0x00
323 kaklik 182
	BC	label268438604
183
	DECF main_1_count, W
322 kaklik 184
	MOVWF main_1_count
185
	MOVLW 0x01
186
	IORWF main_1_leds, W
187
	MOVWF main_1_leds
188
	MOVLW 0x02
189
	IORWF main_1_leds, W
190
	MOVWF main_1_leds
191
	MOVLW 0x04
192
	IORWF main_1_leds, W
193
	MOVWF main_1_leds
194
	MOVF main_1_leds, W
318 kaklik 195
	MOVWF gbl_lata
322 kaklik 196
	BRA	label268438603
323 kaklik 197
label268438604
322 kaklik 198
	SETF main_1_leds
199
	SETF gbl_lata
323 kaklik 200
label268438619
318 kaklik 201
	SETF main_1_sensors
202
	CALL receive_00000
203
	MOVF CompTempVarRet489, W
204
	MOVWF main_1_sensors
321 kaklik 205
	CLRF CompTempVar491
206
	BTFSS main_1_sensors,1
323 kaklik 207
	BRA	label268438624
321 kaklik 208
	BTFSS main_1_sensors,0
323 kaklik 209
	BRA	label268438624
321 kaklik 210
	INCF CompTempVar491, F
323 kaklik 211
label268438624
321 kaklik 212
	MOVF CompTempVar491, F
323 kaklik 213
	BNZ	label268438625
321 kaklik 214
	MOVLW 0x77
215
	MOVWF main_1_motors
323 kaklik 216
label268438625
318 kaklik 217
	BTFSC main_1_sensors,2
323 kaklik 218
	BRA	label268438628
321 kaklik 219
	MOVLW 0xF7
220
	MOVWF main_1_motors
323 kaklik 221
label268438628
318 kaklik 222
	BTFSC main_1_sensors,3
323 kaklik 223
	BRA	label268438631
321 kaklik 224
	MOVLW 0x7F
225
	MOVWF main_1_motors
323 kaklik 226
label268438631
321 kaklik 227
	MOVF main_1_sensors, W
318 kaklik 228
	MOVWF gbl_lata
229
	MOVF main_1_motors, W
230
	MOVWF send_00000_arg_c
231
	CALL send_00000
323 kaklik 232
	BRA	label268438619
318 kaklik 233
; } main function end
234
 
323 kaklik 235
	ORG 0x000002C6
318 kaklik 236
_startup
237
	GOTO	main
238
	ORG 0x00300000
239
	DW 0xFEFF
240
	DW 0xFEF6
241
	ORG 0x00300004
242
	DW 0xFEFF
243
	DW 0xFFFB
244
	ORG 0x00300008
245
	DW 0x3FF0
246
	DW 0x9FFF
247
	DW 0xBFFF
248
	END