Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/pled_outputs.asm @ 13:3b30cd739782
1.53 beta rc2
author | heinrichsweikamp |
---|---|
date | Thu, 25 Mar 2010 22:16:19 +0100 |
parents | 588a969a0cae |
children | 239cb2cdc0c9 |
comparison
equal
deleted
inserted
replaced
12:588a969a0cae | 13:3b30cd739782 |
---|---|
987 WIN_INVERT .0 ; Init new Wordprocessor | 987 WIN_INVERT .0 ; Init new Wordprocessor |
988 call PLED_standard_color | 988 call PLED_standard_color |
989 | 989 |
990 call word_processor | 990 call word_processor |
991 return | 991 return |
992 | |
993 PLED_pre_dive_screen: ;Display Pre-Dive Screen | |
994 movlw .0 | |
995 movff WREG,box_temp+0 ; Data | |
996 movlw .25 | |
997 movff WREG,box_temp+1 ; row top (0-239) | |
998 movlw .120 | |
999 movff WREG,box_temp+2 ; row bottom (0-239) | |
1000 movlw .82 | |
1001 movff WREG,box_temp+3 ; column left (0-159) | |
1002 movlw .159 | |
1003 movff WREG,box_temp+4 ; column right (0-159) | |
1004 call PLED_box | |
1005 | |
1006 ; List active gases/Setpoints | |
1007 | |
1008 btfsc FLAG_const_ppO2_mode ; in ppO2 mode? | |
1009 bra PLED_pre_dive_screen3 ; Yes, display SetPoint/Sensor result list | |
1010 | |
1011 PLED_pre_dive_screen2: | |
1012 ostc_debug 'm' ; Sends debug-information to screen if debugmode active | |
1013 | |
1014 WIN_LEFT .90 | |
1015 WIN_FONT FT_SMALL | |
1016 bsf leftbind | |
1017 | |
1018 movlw d'2' | |
1019 movwf wait_temp ; here: stores eeprom address for gas list | |
1020 movlw d'0' | |
1021 movwf waitms_temp ; here: stores row for gas list | |
1022 clrf hi ; here: Gas counter | |
1023 | |
1024 PLED_pre_dive_screen2_loop: | |
1025 incf hi,F ; Increase Gas | |
1026 movlw d'4' | |
1027 addwf wait_temp,F ; Increase eeprom address for gas list | |
1028 | |
1029 lfsr FSR2,letter | |
1030 movlw 'G' | |
1031 movwf POSTINC2 | |
1032 movff hi,lo ; copy gas number | |
1033 output_8 ; display gas number | |
1034 movlw ':' | |
1035 movwf POSTINC2 | |
1036 movlw ' ' | |
1037 movwf POSTINC2 | |
1038 movff wait_temp, EEADR; Gas #hi: %O2 - Set address in internal EEPROM | |
1039 call read_eeprom ; get byte (stored in EEDATA) | |
1040 movff EEDATA,lo ; copy to lo | |
1041 output_8 ; outputs into Postinc2! | |
1042 movlw '/' | |
1043 movwf POSTINC2 | |
1044 incf EEADR,F ; Gas #hi: %He - Set address in internal EEPROM | |
1045 call read_eeprom ; get byte (stored in EEDATA) | |
1046 movff EEDATA,lo ; copy to lo | |
1047 output_8 ; outputs into Postinc2! | |
1048 | |
1049 read_int_eeprom d'27' ; read flag register | |
1050 movff hi,lo ; copy gas number | |
1051 PLED_pre_dive_screen2_loop1: | |
1052 rrcf EEDATA ; roll flags into carry | |
1053 decfsz lo,F ; max. 5 times... | |
1054 bra PLED_pre_dive_screen2_loop1 | |
1055 | |
1056 btfss STATUS,C ; test carry | |
1057 bra PLED_pre_dive_white | |
1058 | |
1059 movlw color_grey | |
1060 call PLED_set_color ; grey out inactive gases! | |
1061 bra PLED_pre_dive_color_done | |
1062 | |
1063 PLED_pre_dive_white: | |
1064 GETCUSTOM8 d'35' ;movlw color_white | |
1065 call PLED_set_color ; grey out inactive gases! | |
1066 | |
1067 PLED_pre_dive_color_done: | |
1068 read_int_eeprom d'33' ; Read start gas (1-5) | |
1069 movf EEDATA,W | |
1070 cpfseq hi ; Current Gas the active gas? | |
1071 bra PLED_pre_dive_screen2a | |
1072 bra PLED_pre_dive_screen2b | |
1073 | |
1074 PLED_pre_dive_screen2a: | |
1075 movlw d'25' | |
1076 addwf waitms_temp,F ; Increase row | |
1077 WIN_LEFT .90 | |
1078 movff waitms_temp,win_top ; Set Row | |
1079 call word_processor ; No, display gas | |
1080 | |
1081 PLED_pre_dive_screen2b: | |
1082 GETCUSTOM8 d'35' ;movlw color_white | |
1083 call PLED_set_color ; grey out inactive gases! | |
1084 | |
1085 movlw d'5' ; list all four (remaining) gases | |
1086 cpfseq hi ; All gases shown? | |
1087 bra PLED_pre_dive_screen2_loop ; No | |
1088 | |
1089 return ; No, return (OC mode) | |
1090 | |
1091 PLED_pre_dive_screen3: | |
1092 WIN_LEFT .90 | |
1093 WIN_FONT FT_SMALL | |
1094 bsf leftbind | |
1095 | |
1096 ; list three SP in Gaslist | |
1097 movlw d'35' ; 36 = current SP position in EEPROM | |
1098 movwf wait_temp ; here: stores eeprom address for gas list | |
1099 movlw d'0' | |
1100 movwf waitms_temp ; here: stores row for gas list | |
1101 clrf temp5 ; here: SP counter | |
1102 | |
1103 PLED_pre_dive_screen3_loop: | |
1104 incf wait_temp,F ; EEPROM address | |
1105 incf temp5,F ; Increase SP | |
1106 | |
1107 movlw d'25' | |
1108 addwf waitms_temp,F ; Increase row | |
1109 WIN_LEFT .90 | |
1110 movff waitms_temp,win_top ; Set Row | |
1111 | |
1112 lfsr FSR2,letter | |
1113 movlw 'S' | |
1114 movwf POSTINC2 | |
1115 movlw 'P' | |
1116 movwf POSTINC2 | |
1117 movff temp5,lo ; copy gas number | |
1118 output_8 ; display gas number | |
1119 movlw ':' | |
1120 movwf POSTINC2 | |
1121 movlw ' ' | |
1122 movwf POSTINC2 | |
1123 movff wait_temp, EEADR; SP #hi position | |
1124 call read_eeprom ; get byte (stored in EEDATA) | |
1125 movff EEDATA,lo ; copy to lo | |
1126 clrf hi | |
1127 output_16dp d'3' ; outputs into Postinc2! | |
1128 call word_processor | |
1129 | |
1130 movlw d'3' ; list all three SP | |
1131 cpfseq temp5 ; All gases shown? | |
1132 bra PLED_pre_dive_screen3_loop ;no | |
1133 | |
1134 bcf leftbind | |
1135 return ; Return (CC Mode) | |
1136 | |
1137 | |
1138 | |
1139 | |
1140 | |
1141 | |
1142 | |
1143 | |
1144 | |
1145 | |
1146 | |
1147 | |
1148 | |
1149 | |
1150 | |
1151 ; | |
1152 ; | |
1153 ; WIN_LEFT .100 | |
1154 ; WIN_FONT FT_SMALL | |
1155 ; bsf leftbind | |
1156 ; | |
1157 ; movlw d'2' | |
1158 ; movwf wait_temp ; here: stores eeprom address for gas list | |
1159 ; movlw d'231' | |
1160 ; movwf waitms_temp ; here: stores row for gas list | |
1161 ; clrf hi ; here: Gas counter | |
1162 ; | |
1163 ;PLED_gas_list_loop: | |
1164 ; incf hi,F ; Increase Gas | |
1165 ; movlw d'4' | |
1166 ; addwf wait_temp,F ; Increase eeprom address for gas list | |
1167 ;; movlw d'25' | |
1168 ;; addwf waitms_temp,F ; Increase row | |
1169 ;; WIN_LEFT .100 | |
1170 ;; movff waitms_temp,win_top ; Set Row | |
1171 ; | |
1172 ; lfsr FSR2,letter | |
1173 ; movlw 'G' | |
1174 ; movwf POSTINC2 | |
1175 ; movff hi,lo ; copy gas number | |
1176 ; output_8 ; display gas number | |
1177 ; movlw ':' | |
1178 ; movwf POSTINC2 | |
1179 ; movff wait_temp, EEADR; Gas #hi: %O2 - Set address in internal EEPROM | |
1180 ; call read_eeprom ; get byte (stored in EEDATA) | |
1181 ; movff EEDATA,lo ; copy to lo | |
1182 ; output_8 ; outputs into Postinc2! | |
1183 ; movlw '/' | |
1184 ; movwf POSTINC2 | |
1185 ; incf EEADR,F ; Gas #hi: %He - Set address in internal EEPROM | |
1186 ; call read_eeprom ; get byte (stored in EEDATA) | |
1187 ; movff EEDATA,lo ; copy to lo | |
1188 ; output_8 ; outputs into Postinc2! | |
1189 ; | |
1190 ; | |
1191 ; read_int_eeprom d'27' ; read flag register | |
1192 ; movff hi,lo ; copy gas number | |
1193 ;PLED_gas_list_loop1: | |
1194 ; rrcf EEDATA ; roll flags into carry | |
1195 ; decfsz lo,F ; max. 5 times... | |
1196 ; bra PLED_gas_list_loop1 | |
1197 ; | |
1198 ; movlw .015 | |
1199 ; btfss STATUS,C ; test carry | |
1200 ; movlw .010 | |
1201 ; movwf grayvalue ; grey out inactive gases! | |
1202 ; | |
1203 ; call word_processor | |
1204 ; movlw .015 | |
1205 ; movwf grayvalue ; reset grey value for compatibility | |
1206 ; | |
1207 ; movlw d'5' ; list all five gases | |
1208 ; cpfseq hi ; All gases shown? | |
1209 ; bra PLED_gas_list_loop ; No | |
1210 ; | |
1211 ; return ; No, return (OC mode) | |
1212 ; | |
1213 ;PLED_splist_start: | |
1214 ; WIN_LEFT .100 | |
1215 ; WIN_FONT FT_SMALL | |
1216 ; bsf leftbind | |
1217 ; | |
1218 ; ; list three SP in Gaslist | |
1219 ; movlw d'35' ; 36 = current SP position in EEPROM | |
1220 ; movwf wait_temp ; here: stores eeprom address for gas list | |
1221 ; movlw d'231' | |
1222 ; movwf waitms_temp ; here: stores row for gas list | |
1223 ; clrf temp5 ; here: SP counter | |
1224 ; | |
1225 ;PLED_splist_loop: | |
1226 ; incf wait_temp,F ; EEPROM address | |
1227 ; incf temp5,F ; Increase SP | |
1228 ; | |
1229 ; movlw d'25' | |
1230 ; addwf waitms_temp,F ; Increase row | |
1231 ; movff waitms_temp,win_top ; Set Row | |
1232 ; WIN_LEFT .100 | |
1233 ; | |
1234 ; lfsr FSR2,letter | |
1235 ; movlw 'S' | |
1236 ; movwf POSTINC2 | |
1237 ; movlw 'P' | |
1238 ; movwf POSTINC2 | |
1239 ; movff temp5,lo ; copy gas number | |
1240 ; output_8 ; display gas number | |
1241 ; movlw ':' | |
1242 ; movwf POSTINC2 | |
1243 ; movff wait_temp, EEADR; SP #hi position | |
1244 ; call read_eeprom ; get byte (stored in EEDATA) | |
1245 ; movff EEDATA,lo ; copy to lo | |
1246 ; clrf hi | |
1247 ; output_16dp d'3' ; outputs into Postinc2! | |
1248 ; call word_processor | |
1249 ; | |
1250 ; movlw d'3' ; list all three SP | |
1251 ; cpfseq temp5 ; All gases shown? | |
1252 ; bra PLED_splist_loop ; No | |
1253 ; | |
1254 ; bcf leftbind | |
1255 ; return ; no, return | |
1256 ; | |
1257 ; | |
1258 ; | |
1259 ; | |
1260 | |
1261 | |
1262 | |
1263 | |
1264 | |
1265 | |
1266 | |
1267 | |
1268 | |
1269 | |
1270 | |
1271 | |
992 | 1272 |
993 | 1273 |
994 PLED_active_gas_surfmode: ; Displays start gas/SP 1 | 1274 PLED_active_gas_surfmode: ; Displays start gas/SP 1 |
995 ostc_debug 'q' ; Sends debug-information to screen if debugmode active | 1275 ostc_debug 'q' ; Sends debug-information to screen if debugmode active |
996 | 1276 |
2484 | 2764 |
2485 PLED_saturation_graph_divemode: | 2765 PLED_saturation_graph_divemode: |
2486 ostc_debug 'h' ; Sends debug-information to screen if debugmode active | 2766 ostc_debug 'h' ; Sends debug-information to screen if debugmode active |
2487 PLED_tissue_saturation_graph: | 2767 PLED_tissue_saturation_graph: |
2488 ostc_debug 'i' ; Sends debug-information to screen if debugmode active | 2768 ostc_debug 'i' ; Sends debug-information to screen if debugmode active |
2489 ; with dd_font2display | 2769 |
2770 ; Clear graph area... | |
2771 movlw .0 | |
2772 movff WREG,box_temp+0 ; Data | |
2773 movlw .25 | |
2774 movff WREG,box_temp+1 ; row top (0-239) | |
2775 movlw .120 | |
2776 movff WREG,box_temp+2 ; row bottom (0-239) | |
2777 movlw .82 | |
2778 movff WREG,box_temp+3 ; column left (0-159) | |
2779 movlw .159 | |
2780 movff WREG,box_temp+4 ; column right (0-159) | |
2781 call PLED_box | |
2782 | |
2490 | 2783 |
2491 GETCUSTOM8 d'35' ; Standard output color | 2784 GETCUSTOM8 d'35' ; Standard output color |
2492 movff WREG,box_temp+0 ; Data | 2785 movff WREG,box_temp+0 ; Data |
2493 movlw .25 | 2786 movlw .25 |
2494 movff WREG,box_temp+1 ; row top (0-239) | 2787 movff WREG,box_temp+1 ; row top (0-239) |