Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/simulator.asm @ 576:ab2686087bce
faster font display, code cleaning
author | heinrichsweikamp |
---|---|
date | Sun, 22 Apr 2012 14:38:10 +0200 |
parents | cbdcbbc91877 |
children | cda5b45b953f |
comparison
equal
deleted
inserted
replaced
575:cbdcbbc91877 | 576:ab2686087bce |
---|---|
43 movwf menupos | 43 movwf menupos |
44 clrf WREG ; Interval | 44 clrf WREG ; Interval |
45 movff WREG,char_I_dive_interval | 45 movff WREG,char_I_dive_interval |
46 | 46 |
47 menu_simulator1: | 47 menu_simulator1: |
48 clrf timeout_counter2 | |
49 bsf menubit | |
50 bsf cursor | |
51 call PLED_brightness_full ;max. brightness | 48 call PLED_brightness_full ;max. brightness |
52 call PLED_ClearScreen | 49 call PLED_ClearScreen |
53 call PLED_simulator_mask | 50 call PLED_simulator_mask |
54 | 51 |
55 menu_simulator2: | 52 menu_simulator2: |
56 bcf switch_left | 53 call menu_pre_loop_common ; Clear some menu flags, timeout and switches |
57 bcf switch_right | |
58 bcf menubit2 | |
59 bcf menubit3 | |
60 call PLED_simulator_data | 54 call PLED_simulator_data |
61 call PLED_menu_cursor | 55 call PLED_menu_cursor |
62 | 56 |
63 menu_simulator_loop: | 57 menu_simulator_loop: |
64 call check_switches_menu | 58 call check_switches_menu |
158 call comp_air_pressure0 ; Make sure to have depth in rel_pressure:2 | 152 call comp_air_pressure0 ; Make sure to have depth in rel_pressure:2 |
159 | 153 |
160 bcf menubit2 | 154 bcf menubit2 |
161 bcf menubit3 | 155 bcf menubit3 |
162 bcf menubit | 156 bcf menubit |
163 bcf switch_left | 157 call wait_switches ; Waits until switches are released, resets flag if button stays pressed! |
164 bcf switch_right | |
165 | 158 |
166 call simulator_save_tissue_data ; Stores 32 floats "pre_tissue" into bank3 | 159 call simulator_save_tissue_data ; Stores 32 floats "pre_tissue" into bank3 |
167 | 160 |
168 movff char_I_dive_interval,WREG ; Any interval ? | 161 movff char_I_dive_interval,WREG ; Any interval ? |
169 iorlw 0 ; Test for null | 162 iorlw 0 ; Test for null |
233 WIN_INVERT .1 ; Init new Wordprocessor | 226 WIN_INVERT .1 ; Init new Wordprocessor |
234 DISPLAYTEXT .188 ; Sim. Results: | 227 DISPLAYTEXT .188 ; Sim. Results: |
235 WIN_INVERT .0 ; Init new Wordprocessor | 228 WIN_INVERT .0 ; Init new Wordprocessor |
236 | 229 |
237 simulator_show_decoplan1: | 230 simulator_show_decoplan1: |
238 bcf switch_left | 231 call wait_switches ; Waits until switches are released, resets flag if button stays pressed! |
239 bcf switch_right | |
240 simulator_show_decoplan2: | 232 simulator_show_decoplan2: |
241 btfsc uart_dump_screen ; Asked to dump screen contains ? | 233 btfsc uart_dump_screen ; Asked to dump screen contains ? |
242 call dump_screen ; Yes! | 234 call dump_screen ; Yes! |
243 | 235 |
244 btfsc onesecupdate | 236 btfsc onesecupdate |