Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/menu_gassetup.asm @ 445:6e57b5bb98ce
localisation part 1 from Sergei
author | heinrichsweikamp |
---|---|
date | Thu, 11 Aug 2011 20:01:55 +0200 |
parents | ab962c4b19d6 |
children | f5a06b9e2fef |
comparison
equal
deleted
inserted
replaced
444:f6cdd0079c36 | 445:6e57b5bb98ce |
---|---|
53 movlw d'30' | 53 movlw d'30' |
54 addwf waitms_temp,F ; Increase row | 54 addwf waitms_temp,F ; Increase row |
55 movf waitms_temp,W ; Load row into WREG | 55 movf waitms_temp,W ; Load row into WREG |
56 movff WREG,win_top | 56 movff WREG,win_top |
57 lfsr FSR2,letter | 57 lfsr FSR2,letter |
58 PUTC 'G' | 58 PUTC TXT_GAS_C |
59 movff decodata+0,lo | 59 movff decodata+0,lo |
60 incf lo,F | 60 incf lo,F |
61 bsf leftbind | 61 bsf leftbind |
62 output_99 | 62 output_99 |
63 PUTC ':' | 63 PUTC ':' |
129 output_8 | 129 output_8 |
130 bra menu_gassetup_list0 | 130 bra menu_gassetup_list0 |
131 | 131 |
132 ; New v1.44se | 132 ; New v1.44se |
133 menu_gassetup_O2: | 133 menu_gassetup_O2: |
134 STRCAT "O2 " | 134 STRCAT TXT_O2_3 |
135 output_8 | 135 output_8 |
136 bra menu_gassetup_list0 | 136 bra menu_gassetup_list0 |
137 | 137 |
138 ; New v1.44se | 138 ; New v1.44se |
139 menu_gassetup_Air: | 139 menu_gassetup_Air: |
140 cpfseq lo ; o2 = 21% | 140 cpfseq lo ; o2 = 21% |
141 call menu_gassetup_Err | 141 call menu_gassetup_Err |
142 | 142 |
143 STRCAT "AIR " | 143 STRCAT TXT_AIR4 |
144 output_8 | 144 output_8 |
145 bra menu_gassetup_list0 | 145 bra menu_gassetup_list0 |
146 | 146 |
147 ; New v1.44se | 147 ; New v1.44se |
148 menu_gassetup_Err: | 148 menu_gassetup_Err: |
149 STRCAT "ERR " | 149 STRCAT TXT_ERR4 |
150 output_8 | 150 output_8 |
151 | 151 |
152 ; Changed v1.44se | 152 ; Changed v1.44se |
153 menu_gassetup_list0: | 153 menu_gassetup_list0: |
154 movf decodata+0,W | 154 movf decodata+0,W |
158 WIN_LEFT .105 | 158 WIN_LEFT .105 |
159 movf waitms_temp,W ; Load row into WREG | 159 movf waitms_temp,W ; Load row into WREG |
160 movff WREG,win_top | 160 movff WREG,win_top |
161 lfsr FSR2,letter | 161 lfsr FSR2,letter |
162 | 162 |
163 STRCAT " in " | 163 STRCAT TXT_IN4 |
164 movf decodata+0,W ; read current value | 164 movf decodata+0,W ; read current value |
165 addlw d'28' ; offset in memory | 165 addlw d'28' ; offset in memory |
166 movwf EEADR | 166 movwf EEADR |
167 call read_eeprom ; Low-value | 167 call read_eeprom ; Low-value |
168 movff EEDATA,lo | 168 movff EEDATA,lo |
169 output_8 | 169 output_8 |
170 PUTC 'm' | 170 PUTC TXT_METER_C |
171 movf decodata+0,W | 171 movf decodata+0,W |
172 call PLED_grey_inactive_gas ; Sets Greyvalue for inactive gases | 172 call PLED_grey_inactive_gas ; Sets Greyvalue for inactive gases |
173 call word_processor | 173 call word_processor |
174 | 174 |
175 call PLED_standard_color | 175 call PLED_standard_color |
299 | 299 |
300 rcall gassetup_title_bar2 ; Displays the title bar with the current Gas info | 300 rcall gassetup_title_bar2 ; Displays the title bar with the current Gas info |
301 | 301 |
302 WIN_LEFT .20 | 302 WIN_LEFT .20 |
303 WIN_TOP .65 | 303 WIN_TOP .65 |
304 STRCPY "O2: " | 304 STRCPY TXT_O2_4 |
305 | 305 |
306 movf divemins+0,W | 306 movf divemins+0,W |
307 addlw 0x06 | 307 addlw 0x06 |
308 movwf EEADR | 308 movwf EEADR |
309 call read_eeprom ; O2 value | 309 call read_eeprom ; O2 value |
317 OUTPUTTEXTH .297 ; MOD: | 317 OUTPUTTEXTH .297 ; MOD: |
318 | 318 |
319 rcall gassetup_get_mod ; compute MOD based on CF18 into lo:hi | 319 rcall gassetup_get_mod ; compute MOD based on CF18 into lo:hi |
320 | 320 |
321 output_16 | 321 output_16 |
322 STRCAT_PRINT "m " | 322 STRCAT_PRINT TXT_METER3 |
323 | 323 |
324 WIN_LEFT .20 | 324 WIN_LEFT .20 |
325 WIN_TOP .95 | 325 WIN_TOP .95 |
326 STRCPY "He: " | 326 STRCPY TXT_HE4 |
327 movf divemins+0,W | 327 movf divemins+0,W |
328 addlw 0x07 | 328 addlw 0x07 |
329 movwf EEADR | 329 movwf EEADR |
330 call read_eeprom ; He value | 330 call read_eeprom ; He value |
331 movff EEDATA,lo | 331 movff EEDATA,lo |
382 movff xC+0,lo | 382 movff xC+0,lo |
383 movlw d'0' | 383 movlw d'0' |
384 subwfb xC+1,F | 384 subwfb xC+1,F |
385 movff xC+1,hi | 385 movff xC+1,hi |
386 output_16 | 386 output_16 |
387 STRCAT_PRINT "m " | 387 STRCAT_PRINT TXT_METER3 |
388 | 388 |
389 WIN_LEFT .20 | 389 WIN_LEFT .20 |
390 WIN_TOP .125 | 390 WIN_TOP .125 |
391 STRCPY "+/-: " | 391 STRCPY "+/-: " |
392 movlw '+' | 392 movlw '+' |
679 OUTPUTTEXT .108 ; Change: | 679 OUTPUTTEXT .108 ; Change: |
680 | 680 |
681 ; lo still holds change depth | 681 ; lo still holds change depth |
682 bsf leftbind | 682 bsf leftbind |
683 output_8 | 683 output_8 |
684 STRCAT_PRINT "m " | 684 STRCAT_PRINT TXT_METER2 |
685 | 685 |
686 ; Show ppO2 after change depth | 686 ; Show ppO2 after change depth |
687 WIN_TOP .125 | 687 WIN_TOP .125 |
688 WIN_LEFT .110 | 688 WIN_LEFT .110 |
689 lfsr FSR2,letter | 689 lfsr FSR2,letter |
727 clrf lo ; Yes, display 0m | 727 clrf lo ; Yes, display 0m |
728 btfsc second_FA ; Is first gas? | 728 btfsc second_FA ; Is first gas? |
729 clrf hi ; Yes, display 0m | 729 clrf hi ; Yes, display 0m |
730 | 730 |
731 output_16 | 731 output_16 |
732 STRCAT_PRINT "m " | 732 STRCAT_PRINT TXT_METER3 |
733 | 733 |
734 WIN_TOP .35 | 734 WIN_TOP .35 |
735 WIN_LEFT .20 | 735 WIN_LEFT .20 |
736 lfsr FSR2,letter | 736 lfsr FSR2,letter |
737 OUTPUTTEXT .105 ; "Active Gas? " | 737 OUTPUTTEXT .105 ; "Active Gas? " |
985 output_8 | 985 output_8 |
986 bra gassetup_title_bar7 | 986 bra gassetup_title_bar7 |
987 | 987 |
988 ; New v1.44se | 988 ; New v1.44se |
989 gassetup_title_bar4: | 989 gassetup_title_bar4: |
990 STRCAT "O2 " | 990 STRCAT TXT_O2_3 |
991 output_8 | 991 output_8 |
992 bra gassetup_title_bar7 | 992 bra gassetup_title_bar7 |
993 | 993 |
994 ; New v1.44se | 994 ; New v1.44se |
995 gassetup_title_bar5: | 995 gassetup_title_bar5: |
996 cpfseq lo ; o2 = 21% | 996 cpfseq lo ; o2 = 21% |
997 bra gassetup_title_bar6 | 997 bra gassetup_title_bar6 |
998 | 998 |
999 STRCAT "AIR " | 999 STRCAT TXT_AIR4 |
1000 output_8 | 1000 output_8 |
1001 bra gassetup_title_bar7 | 1001 bra gassetup_title_bar7 |
1002 | 1002 |
1003 ; New v1.44se | 1003 ; New v1.44se |
1004 gassetup_title_bar6: ; ERROR | 1004 gassetup_title_bar6: ; ERROR |
1005 STRCAT "ERR " | 1005 STRCAT TXT_ERR4 |
1006 output_8 | 1006 output_8 |
1007 bra gassetup_title_bar7 | 1007 bra gassetup_title_bar7 |
1008 | 1008 |
1009 gassetup_title_bar7: | 1009 gassetup_title_bar7: |
1010 STRCAT " in " | 1010 STRCAT TXT_IN4 |
1011 movf decodata+0,W ; read current value | 1011 movf decodata+0,W ; read current value |
1012 addlw d'28' ; offset in memory | 1012 addlw d'28' ; offset in memory |
1013 movwf EEADR | 1013 movwf EEADR |
1014 call read_eeprom ; Low-value | 1014 call read_eeprom ; Low-value |
1015 movff EEDATA,lo | 1015 movff EEDATA,lo |
1016 output_8 | 1016 output_8 |
1017 STRCAT_PRINT "m " | 1017 STRCAT_PRINT TXT_METER2 |
1018 | 1018 |
1019 WIN_INVERT .0 ; Init new Wordprocessor | 1019 WIN_INVERT .0 ; Init new Wordprocessor |
1020 return | 1020 return |
1021 | 1021 |
1022 ; New v1.44se | 1022 ; New v1.44se |
1023 gassetup_write_Nx: | 1023 gassetup_write_Nx: |
1024 STRCAT "NX " | 1024 STRCAT TXT_NX3 |
1025 return | 1025 return |
1026 | 1026 |
1027 ; New v1.44se | 1027 ; New v1.44se |
1028 gassetup_write_Tx: | 1028 gassetup_write_Tx: |
1029 STRCAT "TX " | 1029 STRCAT TXT_TX3 |
1030 return | 1030 return |
1031 | 1031 |
1032 gassetup_show_ppO2: | 1032 gassetup_show_ppO2: |
1033 movf divemins+0,W | 1033 movf divemins+0,W |
1034 addlw 0x06 | 1034 addlw 0x06 |