comparison code_part1/OSTC_code_asm_part1/outputs.asm @ 765:aac1379d6983

BUGFIX: Show bailout list if first bailout gas <> gas
author heinrichsweikamp
date Mon, 16 Dec 2013 20:50:34 +0100
parents cc997dde80cf
children b23b43d6d50d
comparison
equal deleted inserted replaced
764:7bfefa82db12 765:aac1379d6983
1476 lfsr FSR2,letter 1476 lfsr FSR2,letter
1477 OUTPUTTEXT .137 ; Bailout 1477 OUTPUTTEXT .137 ; Bailout
1478 call word_processor 1478 call word_processor
1479 WIN_TOP .50 1479 WIN_TOP .50
1480 WIN_LEFT .90 1480 WIN_LEFT .90
1481 read_int_eeprom d'33' ; Read start gas (1-5)
1482 movff EEDATA,hi ; Store start gas
1481 bsf leftbind 1483 bsf leftbind
1482 lfsr FSR2,letter 1484 lfsr FSR2,letter
1483 STRCAT TXT_G1_3 1485 STRCPY TXT_GAS1
1484 movlw .6 ; Gas #1: %O2 - Set address in internal EEPROM 1486 movff hi,lo ; copy gas number
1487 output_8 ; display gas number
1488 STRCAT ": "
1489 movlw .4
1490 mulwf hi ; 1-5
1491 movf PRODL,W
1492 addlw .2 ; Gas #x: %O2 - Set address in internal EEPROM
1485 movwf EEADR 1493 movwf EEADR
1486 call read_eeprom ; get byte (stored in EEDATA) 1494 call read_eeprom ; get byte (stored in EEDATA)
1487 movff EEDATA,lo ; copy to lo 1495 movff EEDATA,lo ; copy to lo
1488 output_8 ; outputs into Postinc2! 1496 output_8 ; outputs into Postinc2!
1489 PUTC '/' 1497 PUTC '/'
1490 movlw .7 ; Gas #1: %He - Set address in internal EEPROM 1498 movlw .4
1499 mulwf hi,W ; 1-5
1500 movf PRODL,W
1501 addlw .3 ; Gas #x: %He - Set address in internal EEPROM
1491 movwf EEADR 1502 movwf EEADR
1492 call read_eeprom ; get byte (stored in EEDATA) 1503 call read_eeprom ; get byte (stored in EEDATA)
1493 movff EEDATA,lo ; copy to lo 1504 movff EEDATA,lo ; copy to lo
1494 output_8 ; outputs into Postinc2! 1505 output_8 ; outputs into Postinc2!
1495 bcf leftbind 1506 bcf leftbind
1512 ostc_debug 'm' ; Sends debug-information to screen if debugmode active 1523 ostc_debug 'm' ; Sends debug-information to screen if debugmode active
1513 1524
1514 WIN_LEFT .90 1525 WIN_LEFT .90
1515 WIN_FONT FT_SMALL 1526 WIN_FONT FT_SMALL
1516 bsf leftbind 1527 bsf leftbind
1517
1518 movlw d'2' 1528 movlw d'2'
1519 movwf wait_temp ; here: stores eeprom address for gas list 1529 movwf wait_temp ; here: stores eeprom address for gas list
1520 movlw d'0' 1530 movlw d'0'
1521 movwf waitms_temp ; here: stores row for gas list 1531 movwf waitms_temp ; here: stores row for gas list
1522 clrf hi ; here: Gas counter 1532 clrf hi ; here: Gas counter
1523 1533
1524 DISP_pre_dive_screen2_loop: 1534 DISP_pre_dive_screen2_loop:
1525 incf hi,F ; Increase Gas 1535 incf hi,F ; Increase Gas
1526 movlw d'4' 1536 movlw d'4'
1541 output_8 ; outputs into Postinc2! 1551 output_8 ; outputs into Postinc2!
1542 1552
1543 decf hi,W ; Gas # in 0..4 1553 decf hi,W ; Gas # in 0..4
1544 call DISP_grey_inactive_gas 1554 call DISP_grey_inactive_gas
1545 1555
1546 read_int_eeprom d'33' ; Read start gas (1-5) 1556 read_int_eeprom d'33' ; Read start gas (1-5)
1547 movf EEDATA,W 1557 movf EEDATA,W
1548 cpfseq hi ; Current Gas the active gas? 1558 cpfseq hi ; Current Gas the start gas?
1549 bra DISP_pre_dive_screen2a 1559 bra DISP_pre_dive_screen2a ; Yes
1550 bra DISP_pre_dive_screen2b 1560 bra DISP_pre_dive_screen2b ; No
1551 1561
1552 DISP_pre_dive_screen2a: 1562 DISP_pre_dive_screen2a:
1553 movlw d'25' 1563 movlw d'25'
1554 addwf waitms_temp,F ; Increase row 1564 addwf waitms_temp,F ; Increase row
1555 WIN_LEFT .90 1565 WIN_LEFT .90
1556 movff waitms_temp,win_top ; Set Row 1566 movff waitms_temp,win_top ; Set Row
1557 call word_processor ; No, display gas 1567 call word_processor ; Display gas
1558 1568
1559 DISP_pre_dive_screen2b: 1569 DISP_pre_dive_screen2b:
1560 movlw d'5' ; list all four (remaining) gases 1570 movlw d'5' ; list all four (remaining) gases
1561 cpfseq hi ; All gases shown? 1571 cpfseq hi ; All gases shown?
1562 bra DISP_pre_dive_screen2_loop ; No 1572 bra DISP_pre_dive_screen2_loop ; No
1563 1573
1564 return ; No, return (OC mode) 1574 return ; No, return (OC mode)
1565 1575
1566 DISP_pre_dive_screen3: 1576 DISP_pre_dive_screen3:
1567 WIN_LEFT .90 1577 WIN_LEFT .90
1568 WIN_FONT FT_SMALL 1578 WIN_FONT FT_SMALL
1569 bsf leftbind 1579 bsf leftbind