comparison code_part1/OSTC_code_asm_part1/start.asm @ 362:64da813d4726 64kByte Logbook

Logbook converter (Needs ~8Minutes and is called one time). Backup your dives before use!!
author Heinrichsweikamp
date Wed, 08 Jun 2011 19:47:18 +0200
parents 91352bb698cf
children 93a64a19728e
comparison
equal deleted inserted replaced
361:88660a400338 362:64da813d4726
38 btfsc divemode ; Reset from Divemode? 38 btfsc divemode ; Reset from Divemode?
39 call PLED_resetdebugger ; Yes! Something went wrong, show reset informations 39 call PLED_resetdebugger ; Yes! Something went wrong, show reset informations
40 start3: 40 start3:
41 clrf STKPTR ; Clear Stackpointer 41 clrf STKPTR ; Clear Stackpointer
42 lfsr FSR0,year+1 ; Clear rambank 1-9, do not delete RTC registers 42 lfsr FSR0,year+1 ; Clear rambank 1-9, do not delete RTC registers
43 delete RTC registers
43 clear_rambank: 44 clear_rambank:
44 clrf POSTINC0 45 clrf POSTINC0
45 movlw 0x0A 46 movlw 0x0A
46 cpfseq FSR0H ; Bank 9 done? 47 cpfseq FSR0H ; Bank 9 done?
47 bra clear_rambank ; clear... 48 bra clear_rambank ; clear...
222 bsf debug_mode 223 bsf debug_mode
223 movlw d'1' 224 movlw d'1'
224 cpfseq EEDATA 225 cpfseq EEDATA
225 bcf debug_mode ; clear flag if <> 1 226 bcf debug_mode ; clear flag if <> 1
226 227
228 ; Check if logbook has been converted already (Internal EEPROM 0x100=0xAA)
229 movlw LOW 0x100
230 movwf EEADR
231 movlw HIGH 0x100
232 movwf EEADRH
233 call read_eeprom ; read byte
234 movlw 0xAA
235 cpfseq EEDATA ; is 0xAA already?
236 call logbook_convert_64k ; No, convert now (And write 0xAA to internal EEPROM 0x100)
237
227 goto surfloop ; Jump to Surfaceloop! 238 goto surfloop ; Jump to Surfaceloop!
228 239
229 240
230 display_new_cf_installed: 241 display_new_cf_installed:
231 call PLED_new_cf_warning ; Display new CF warning screen 242 call PLED_new_cf_warning ; Display new CF warning screen