comparison code_part1/OSTC_code_asm_part1/menu_gassetup.asm @ 50:c97c5514b165

1.70..
author heinrichsweikamp
date Thu, 29 Jul 2010 13:23:08 +0200
parents cd5b650920f6
children 6f8e3a08011e
comparison
equal deleted inserted replaced
49:cd5b650920f6 50:c97c5514b165
1090 movff xC+1,hi 1090 movff xC+1,hi
1091 1091
1092 WIN_LEFT .55 1092 WIN_LEFT .55
1093 WIN_TOP .35 1093 WIN_TOP .35
1094 lfsr FSR2,letter 1094 lfsr FSR2,letter
1095 movlw '(' 1095 OUTPUTTEXT d'149' ; (ppO2:
1096 movwf POSTINC2 1096 ; movlw '('
1097 movlw 'p' 1097 ; movwf POSTINC2
1098 movwf POSTINC2 1098 ; movlw 'p'
1099 movlw 'p' 1099 ; movwf POSTINC2
1100 movwf POSTINC2 1100 ; movlw 'p'
1101 movlw 'O' 1101 ; movwf POSTINC2
1102 movwf POSTINC2 1102 ; movlw 'O'
1103 movlw '2' 1103 ; movwf POSTINC2
1104 movwf POSTINC2 1104 ; movlw '2'
1105 movlw ':' 1105 ; movwf POSTINC2
1106 movwf POSTINC2 1106 ; movlw ':'
1107 ; movwf POSTINC2
1107 output_16dp d'3' 1108 output_16dp d'3'
1108 movlw 'B' 1109 OUTPUTTEXT d'150' ; Bar:
1109 movwf POSTINC2 1110 ; movlw 'B'
1110 movlw 'a' 1111 ; movwf POSTINC2
1111 movwf POSTINC2 1112 ; movlw 'a'
1112 movlw 'r' 1113 ; movwf POSTINC2
1113 movwf POSTINC2 1114 ; movlw 'r'
1114 movlw ')' 1115 ; movwf POSTINC2
1115 movwf POSTINC2 1116 ; movlw ')'
1116 movlw ' ' 1117 ; movwf POSTINC2
1117 movwf POSTINC2 1118 ; movlw ' '
1119 ; movwf POSTINC2
1118 call word_processor 1120 call word_processor
1119 return 1121 return
1120 1122
1121 1123
1122 gassetup_sort_gaslist: ; Sorts Gaslist according to change depth 1124 gassetup_sort_gaslist: ; Sorts Gaslist according to change depth
1322 movf PRODL,W ; x4 1324 movf PRODL,W ; x4
1323 addwf FSR2L,F 1325 addwf FSR2L,F
1324 movlw d'0' 1326 movlw d'0'
1325 addwfc FSR2H,F ; Point to Gas #logbook_temp3 (0-4) 1327 addwfc FSR2H,F ; Point to Gas #logbook_temp3 (0-4)
1326 1328
1327 btfsc menubit2 ; Change Start gas only 1x 1329 ; btfsc menubit2 ; Change Start gas only 1x
1328 bra gassetup_sort_store2 ; Skip 1330 ; bra gassetup_sort_store2 ; Skip
1329 ; First Gas: 33 (1-5) 1331 ;; First Gas: 33 (1-5)
1330 ; Was gas #logbook_temp3 first gas? 1332 ;; Was gas #logbook_temp3 first gas?
1331 read_int_eeprom d'33' ; Get old first gas (1-5) 1333 ; read_int_eeprom d'33' ; Get old first gas (1-5)
1332 incf logbook_temp3,W ; Gas 1-5 -> WREG 1334 ; incf logbook_temp3,W ; Gas 1-5 -> WREG
1333 cpfseq EEDATA ; Compare with EEDATA d'33' 1335 ; cpfseq EEDATA ; Compare with EEDATA d'33'
1334 bra gassetup_sort_store2 ; Was not first gas! 1336 ; bra gassetup_sort_store2 ; Was not first gas!
1335 movff logbook_temp5,EEDATA ; Copy new first gas 1337 ; movff logbook_temp5,EEDATA ; Copy new first gas
1336 write_int_eeprom d'123' ; Store 1338 ; write_int_eeprom d'123' ; Store
1337 bsf menubit2 ; Done. Do not change again. 1339 ; bsf menubit2 ; Done. Do not change again.
1338 1340
1339 gassetup_sort_store2: 1341 gassetup_sort_store2:
1340 ; Was Gas #logbook_temp3 active? 1342 ; Was Gas #logbook_temp3 active?
1341 ; Letter+26 holds active bits 25? 1343 ; Letter+26 holds active bits 25?
1342 movff logbook_temp3,logbook_temp6 ; Counter 0-4 1344 movff logbook_temp3,logbook_temp6 ; Counter 0-4
1357 ;call rs232_wait_tx ; wait for UART 1359 ;call rs232_wait_tx ; wait for UART
1358 1360
1359 movf logbook_temp5,W ; 1-5 1361 movf logbook_temp5,W ; 1-5
1360 mullw d'4' 1362 mullw d'4'
1361 movff PRODL,EEADR ; Point to EEPROM of Gas #logbook_temp5 1363 movff PRODL,EEADR ; Point to EEPROM of Gas #logbook_temp5
1362
1363 movlw d'90' ; +90 Offset to new... 1364 movlw d'90' ; +90 Offset to new...
1364 addwf EEADR,F ; ..sorted list! 1365 addwf EEADR,F ; ..sorted list!
1365 1366
1366 movff POSTINC2,EEDATA ; O2 Default 1367 movff POSTINC2,EEDATA ; O2 Default
1367 call write_eeprom ; store in internal EEPROM 1368 call write_eeprom ; store in internal EEPROM