Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/menu_logbook.asm @ 384:904863f96582 64kByte Logbook
Work-Around for "Reset all" overwriting 0x00 to 0x04 in EEPROM Bank1
author | heinrichsweikamp |
---|---|
date | Sat, 18 Jun 2011 11:26:22 +0200 |
parents | f2d5d93b4ca3 |
children | ab962c4b19d6 |
comparison
equal
deleted
inserted
replaced
383:d7a70654d968 | 384:904863f96582 |
---|---|
1272 call PLED_boot | 1272 call PLED_boot |
1273 call PLED_ClearScreen ; Clear screen | 1273 call PLED_ClearScreen ; Clear screen |
1274 movlw color_red | 1274 movlw color_red |
1275 call PLED_set_color ; Set to Red | 1275 call PLED_set_color ; Set to Red |
1276 DISPLAYTEXTH d'303' ; Please wait! | 1276 DISPLAYTEXTH d'303' ; Please wait! |
1277 movlw LOW 0x100 | 1277 clrf EEADR |
1278 movwf EEADR | 1278 movlw d'1' |
1279 movlw HIGH 0x100 | |
1280 movwf EEADRH | 1279 movwf EEADRH |
1281 movlw 0xAA | 1280 movlw 0xAA |
1282 movwf EEDATA | 1281 movwf EEDATA |
1283 call write_eeprom ; write 0xAA to indicate the logbook is already converted | 1282 call write_eeprom ; write 0xAA to indicate the logbook is already converted |
1284 ;return | 1283 clrf EEADRH ; Restore EEADRH |
1285 ; convert logbook: | 1284 ; convert logbook: |
1286 ; Step 1: Copy 32k from 0xFE + 1 with bank switching to bank1 | 1285 ; Step 1: Copy 32k from 0xFE + 1 with bank switching to bank1 |
1287 ; Step 2: Copy 32k from bank1 to bank0 | 1286 ; Step 2: Copy 32k from bank1 to bank0 |
1288 ; Step 3: delete bank1 | 1287 ; Step 3: delete bank1 |
1289 call get_free_EEPROM_location ; Searches 0xFD, 0xFD, 0xFE and sets Pointer to 0xFE | 1288 call get_free_EEPROM_location ; Searches 0xFD, 0xFD, 0xFE and sets Pointer to 0xFE |