comparison code_part1/OSTC_code_asm_part1/menu_logbook.asm @ 717:91ae251d379f

"ostc3-style" menu titles
author heinrichsweikamp
date Thu, 23 May 2013 10:59:34 +0200
parents 2129862bbfe6
children 4452837aff37
comparison
equal deleted inserted replaced
716:d333c8462844 717:91ae251d379f
57 clrf menupos2 ; Here: # of current displayed page 57 clrf menupos2 ; Here: # of current displayed page
58 clrf divenumber ; # of dive in list during search 58 clrf divenumber ; # of dive in list during search
59 59
60 60
61 menu_logbook1a: 61 menu_logbook1a:
62 WIN_INVERT .1 62 call DISP_divemask_color
63 DISPLAYTEXT .12 ;" Wait.." 63 DISPLAYTEXT .12 ;" Wait.."
64 WIN_INVERT .0 64 call DISP_standard_color
65 call I2CReset ; Reset I2C Bus 65 call I2CReset ; Reset I2C Bus
66 call get_free_EEPROM_location ; search from "here" backwards through the external memory 66 call get_free_EEPROM_location ; search from "here" backwards through the external memory
67 67
68 movff eeprom_address+0,logbook1_ptr+0 68 movff eeprom_address+0,logbook1_ptr+0
69 movff eeprom_address+1,logbook1_ptr+1 ; Store Pointer to 0xFE (From 0xFD, 0xFD, 0xFE sequence) for faster display 69 movff eeprom_address+1,logbook1_ptr+1 ; Store Pointer to 0xFE (From 0xFD, 0xFD, 0xFE sequence) for faster display
80 ; read header data and display it 80 ; read header data and display it
81 ; wait for user to confirm/exit 81 ; wait for user to confirm/exit
82 ; recopy data to search from here 82 ; recopy data to search from here
83 83
84 menu_logbook1b: 84 menu_logbook1b:
85 WIN_INVERT .1 85 call DISP_divemask_color
86 DISPLAYTEXT .12 ;" Wait.." 86 DISPLAYTEXT .12 ;" Wait.."
87 WIN_INVERT .0 87 call DISP_standard_color
88 88
89 ;---- fast loop: check every other byte ---------------------------------- 89 ;---- fast loop: check every other byte ----------------------------------
90 menu_logbook2: 90 menu_logbook2:
91 movlw d'2' 91 movlw d'2'
92 addwf divemins+0,F 92 addwf divemins+0,F
198 198
199 menu_logbook_display_loop2: 199 menu_logbook_display_loop2:
200 btfss logbook_page_not_empty ; Was there one dive at all? 200 btfss logbook_page_not_empty ; Was there one dive at all?
201 bra menu_logbook ; Yes, so reload the first page 201 bra menu_logbook ; Yes, so reload the first page
202 202
203 call DISP_topline_box ; Draw box 203 call DISP_topline_box_clear ; Clears Bar at the top
204 WIN_INVERT .1 204 call DISP_divemask_color
205 DISPLAYTEXT .26 ; "Logbook" 205 DISPLAYTEXT .26 ; "Logbook"
206 WIN_INVERT .0 206 call DISP_standard_color
207
208 DISPLAYTEXT .11 ; Displays "Exit" in the last row on the current page 207 DISPLAYTEXT .11 ; Displays "Exit" in the last row on the current page
209 208
210 call menu_pre_loop_common ; Clear some menu flags, timeout and switches 209 call menu_pre_loop_common ; Clear some menu flags, timeout and switches
211 210
212 movlw d'1' ; Set cursor to position 1... 211 movlw d'1' ; Set cursor to position 1...
1370 bsf logbook_page_not_empty ; Page not empty 1369 bsf logbook_page_not_empty ; Page not empty
1371 incf menupos3,F 1370 incf menupos3,F
1372 1371
1373 btfsc logbook_header_drawn ; "Logbook already displayed? 1372 btfsc logbook_header_drawn ; "Logbook already displayed?
1374 bra display_listdive1a 1373 bra display_listdive1a
1375 call DISP_topline_box ; Draw box 1374 call DISP_topline_box_clear ; Clears Bar at the top
1376 WIN_INVERT .1 1375 call DISP_divemask_color
1377 DISPLAYTEXT .26 ; "Logbook" 1376 DISPLAYTEXT .26 ; "Logbook"
1378 WIN_INVERT .0 1377 call DISP_standard_color
1379 bsf logbook_header_drawn 1378 bsf logbook_header_drawn
1380 1379
1381 display_listdive1a: 1380 display_listdive1a:
1382 WIN_LEFT .20 1381 WIN_LEFT .20
1383 1382