comparison code_part1/OSTC_code_asm_part1/pled_outputs.asm @ 164:999abb01c78f

+ Change data allocation scheme
author JeanDo
date Fri, 21 Jan 2011 01:44:38 +0100
parents 144822282fa3
children 8b5b848db4cd
comparison
equal deleted inserted replaced
163:144822282fa3 164:999abb01c78f
1181 ; list three SP in Gaslist 1181 ; list three SP in Gaslist
1182 movlw d'35' ; 36 = current SP position in EEPROM 1182 movlw d'35' ; 36 = current SP position in EEPROM
1183 movwf wait_temp ; here: stores eeprom address for gas list 1183 movwf wait_temp ; here: stores eeprom address for gas list
1184 movlw d'0' 1184 movlw d'0'
1185 movwf waitms_temp ; here: stores row for gas list 1185 movwf waitms_temp ; here: stores row for gas list
1186 clrf decoplan_index ; here: SP counter 1186 clrf apnoe_mins ; here: SP counter
1187 1187
1188 PLED_pre_dive_screen3_loop: 1188 PLED_pre_dive_screen3_loop:
1189 incf wait_temp,F ; EEPROM address 1189 incf wait_temp,F ; EEPROM address
1190 incf decoplan_index,F ; Increase SP 1190 incf apnoe_mins,F ; Increase SP
1191 1191
1192 movlw d'25' 1192 movlw d'25'
1193 addwf waitms_temp,F ; Increase row 1193 addwf waitms_temp,F ; Increase row
1194 WIN_LEFT .90 1194 WIN_LEFT .90
1195 movff waitms_temp,win_top ; Set Row 1195 movff waitms_temp,win_top ; Set Row
1196 1196
1197 STRCPY "SP" 1197 STRCPY "SP"
1198 movff decoplan_index,lo ; copy gas number 1198 movff apnoe_mins,lo ; copy gas number
1199 output_8 ; display gas number 1199 output_8 ; display gas number
1200 STRCAT ": " 1200 STRCAT ": "
1201 movff wait_temp, EEADR; SP #hi position 1201 movff wait_temp, EEADR ; SP #hi position
1202 call read_eeprom ; get byte (stored in EEDATA) 1202 call read_eeprom ; get byte (stored in EEDATA)
1203 movff EEDATA,lo ; copy to lo 1203 movff EEDATA,lo ; copy to lo
1204 clrf hi 1204 clrf hi
1205 output_16dp d'3' ; outputs into Postinc2! 1205 output_16dp d'3' ; outputs into Postinc2!
1206 call word_processor 1206 call word_processor
1207 1207
1208 movlw d'3' ; list all three SP 1208 movlw d'3' ; list all three SP
1209 cpfseq decoplan_index ; All gases shown? 1209 cpfseq apnoe_mins ; All gases shown?
1210 bra PLED_pre_dive_screen3_loop ;no 1210 bra PLED_pre_dive_screen3_loop ;no
1211 1211
1212 read_int_eeprom d'33' ; Read byte (stored in EEDATA) 1212 read_int_eeprom d'33' ; Read byte (stored in EEDATA)
1213 movff EEDATA,active_gas ; Read start gas (1-5) 1213 movff EEDATA,active_gas ; Read start gas (1-5)
1214 decf active_gas,W ; Gas 0-4 1214 decf active_gas,W ; Gas 0-4
2265 ;----------------------------------------------------------------------------- 2265 ;-----------------------------------------------------------------------------
2266 ; Display the decoplan (simulator or divemode) for GF model 2266 ; Display the decoplan (simulator or divemode) for GF model
2267 ; Inputs: char_O_deco_table (array of stop times, in minutes) 2267 ; Inputs: char_O_deco_table (array of stop times, in minutes)
2268 ; decoplan_page = page number. Displays 5 stop by page. 2268 ; decoplan_page = page number. Displays 5 stop by page.
2269 ; 2269 ;
2270 decoplan_index equ apnoe_mins ; within each page 2270 #define decoplan_index apnoe_mins ; within each page
2271 decoplan_gindex equ apnoe_secs ; global index 2271 #define decoplan_gindex apnoe_secs ; global index
2272 decoplan_last equ apnoe_max_pressure ; Depth of last stop (CF#29) 2272 #define decoplan_last apnoe_max_pressure ; Depth of last stop (CF#29)
2273 decoplan_max equ apnoe_max_pressure+1; Number of lines per page. 7 in planning, 5 in diving. 2273 #define decoplan_max apnoe_max_pressure+1; Number of lines per page. 7 in planning, 5 in diving.
2274 2274
2275 PLED_decoplan_gf: 2275 PLED_decoplan_gf:
2276 ostc_debug 'n' ; Sends debug-information to screen if debugmode active 2276 ostc_debug 'n' ; Sends debug-information to screen if debugmode active
2277 2277
2278 WIN_INVERT 0 2278 WIN_INVERT 0