Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/pled_outputs.asm @ 34:5dbdc08e5460
New Simulator results screen
author | heinrichsweikamp |
---|---|
date | Tue, 25 May 2010 18:10:51 +0200 |
parents | 6e5db85382a2 |
children | 016a2412d164 |
comparison
equal
deleted
inserted
replaced
33:6e5db85382a2 | 34:5dbdc08e5460 |
---|---|
3863 ; call word_processor | 3863 ; call word_processor |
3864 ; return | 3864 ; return |
3865 ; | 3865 ; |
3866 | 3866 |
3867 PLED_simdata_screen: ;Display Pre-Dive Screen | 3867 PLED_simdata_screen: ;Display Pre-Dive Screen |
3868 | |
3869 ; List active gases/Setpoints | 3868 ; List active gases/Setpoints |
3870 | |
3871 btfsc FLAG_const_ppO2_mode ; in ppO2 mode? | 3869 btfsc FLAG_const_ppO2_mode ; in ppO2 mode? |
3872 bra PLED_simdata_screen3 ; Yes, display SetPoint/Sensor result list | 3870 bra PLED_simdata_screen3 ; Yes, display SetPoint/Sensor result list |
3873 | 3871 |
3874 PLED_simdata_screen2: | 3872 PLED_simdata_screen2: |
3875 ostc_debug 'm' ; Sends debug-information to screen if debugmode active | 3873 ostc_debug 'm' ; Sends debug-information to screen if debugmode active |
3878 WIN_FONT FT_SMALL | 3876 WIN_FONT FT_SMALL |
3879 bsf leftbind | 3877 bsf leftbind |
3880 | 3878 |
3881 movlw d'2' | 3879 movlw d'2' |
3882 movwf wait_temp ; here: stores eeprom address for gas list | 3880 movwf wait_temp ; here: stores eeprom address for gas list |
3883 movlw d'0' | 3881 movlw d'10' |
3884 movwf waitms_temp ; here: stores row for gas list | 3882 movwf waitms_temp ; here: stores row for gas list |
3885 clrf hi ; here: Gas counter | 3883 clrf hi ; here: Gas counter |
3886 | 3884 |
3887 PLED_simdata_screen2_loop: | 3885 PLED_simdata_screen2_loop: |
3888 incf hi,F ; Increase Gas | 3886 incf hi,F ; Increase Gas |
3893 movlw 'G' | 3891 movlw 'G' |
3894 movwf POSTINC2 | 3892 movwf POSTINC2 |
3895 movff hi,lo ; copy gas number | 3893 movff hi,lo ; copy gas number |
3896 output_8 ; display gas number | 3894 output_8 ; display gas number |
3897 movlw ':' | 3895 movlw ':' |
3898 movwf POSTINC2 | |
3899 movlw ' ' | |
3900 movwf POSTINC2 | 3896 movwf POSTINC2 |
3901 movff wait_temp, EEADR; Gas #hi: %O2 - Set address in internal EEPROM | 3897 movff wait_temp, EEADR; Gas #hi: %O2 - Set address in internal EEPROM |
3902 call read_eeprom ; get byte (stored in EEDATA) | 3898 call read_eeprom ; get byte (stored in EEDATA) |
3903 movff EEDATA,lo ; copy to lo | 3899 movff EEDATA,lo ; copy to lo |
3904 output_8 ; outputs into Postinc2! | 3900 output_8 ; outputs into Postinc2! |
3906 movwf POSTINC2 | 3902 movwf POSTINC2 |
3907 incf EEADR,F ; Gas #hi: %He - Set address in internal EEPROM | 3903 incf EEADR,F ; Gas #hi: %He - Set address in internal EEPROM |
3908 call read_eeprom ; get byte (stored in EEDATA) | 3904 call read_eeprom ; get byte (stored in EEDATA) |
3909 movff EEDATA,lo ; copy to lo | 3905 movff EEDATA,lo ; copy to lo |
3910 output_8 ; outputs into Postinc2! | 3906 output_8 ; outputs into Postinc2! |
3911 | 3907 movlw ' ' |
3908 movwf POSTINC2 | |
3909 movf hi,W ; Gas number | |
3910 addlw d'27' ; -> Adress of change depth register | |
3911 call read_int_eeprom_1 | |
3912 movff EEDATA,lo ; Change depth in m | |
3913 output_99 ; outputs into Postinc2! | |
3914 movlw 'm' | |
3915 movwf POSTINC2 | |
3912 read_int_eeprom d'27' ; read flag register | 3916 read_int_eeprom d'27' ; read flag register |
3913 movff hi,lo ; copy gas number | 3917 movff hi,lo ; copy gas number |
3914 PLED_simdata_screen2_loop1: | 3918 PLED_simdata_screen2_loop1: |
3915 rrcf EEDATA ; roll flags into carry | 3919 rrcf EEDATA ; roll flags into carry |
3916 decfsz lo,F ; max. 5 times... | 3920 decfsz lo,F ; max. 5 times... |
3925 | 3929 |
3926 PLED_simdata_white: | 3930 PLED_simdata_white: |
3927 call PLED_standard_color | 3931 call PLED_standard_color |
3928 | 3932 |
3929 PLED_simdata_color_done: | 3933 PLED_simdata_color_done: |
3930 read_int_eeprom d'33' ; Read start gas (1-5) | |
3931 movf EEDATA,W | |
3932 cpfseq hi ; Current Gas the active gas? | |
3933 bra PLED_simdata_screen2a | |
3934 bra PLED_simdata_screen2b | |
3935 | |
3936 PLED_simdata_screen2a: | |
3937 movlw d'25' | 3934 movlw d'25' |
3938 addwf waitms_temp,F ; Increase row | 3935 addwf waitms_temp,F ; Increase row |
3939 WIN_LEFT .0 | 3936 WIN_LEFT .0 |
3940 movff waitms_temp,win_top ; Set Row | 3937 movff waitms_temp,win_top ; Set Row |
3941 call word_processor ; No, display gas | 3938 call word_processor ; display gas |
3942 | 3939 |
3943 PLED_simdata_screen2b: | 3940 PLED_simdata_screen2b: |
3944 call PLED_standard_color | 3941 call PLED_standard_color |
3945 | 3942 |
3946 movlw d'5' ; list all four (remaining) gases | 3943 movlw d'5' ; list all five gases |
3947 cpfseq hi ; All gases shown? | 3944 cpfseq hi ; All gases shown? |
3948 bra PLED_simdata_screen2_loop ; No | 3945 bra PLED_simdata_screen2_loop ; No |
3949 | 3946 |
3950 return ; No, return (OC mode) | 3947 return ; No, return (OC mode) |
3951 | 3948 |
3955 bsf leftbind | 3952 bsf leftbind |
3956 | 3953 |
3957 ; list three SP in Gaslist | 3954 ; list three SP in Gaslist |
3958 movlw d'35' ; 36 = current SP position in EEPROM | 3955 movlw d'35' ; 36 = current SP position in EEPROM |
3959 movwf wait_temp ; here: stores eeprom address for gas list | 3956 movwf wait_temp ; here: stores eeprom address for gas list |
3960 movlw d'0' | 3957 movlw d'10' |
3961 movwf waitms_temp ; here: stores row for gas list | 3958 movwf waitms_temp ; here: stores row for gas list |
3962 clrf temp5 ; here: SP counter | 3959 clrf temp5 ; here: SP counter |
3963 | 3960 |
3964 PLED_simdata_screen3_loop: | 3961 PLED_simdata_screen3_loop: |
3965 incf wait_temp,F ; EEPROM address | 3962 incf wait_temp,F ; EEPROM address |
4008 movwf EEADR | 4005 movwf EEADR |
4009 call read_eeprom ; Read O2 ratio | 4006 call read_eeprom ; Read O2 ratio |
4010 movff EEDATA, lo ; O2 ratio | 4007 movff EEDATA, lo ; O2 ratio |
4011 | 4008 |
4012 WIN_LEFT .0 | 4009 WIN_LEFT .0 |
4013 WIN_TOP .100 | 4010 WIN_TOP .110 |
4014 lfsr FSR2,letter | 4011 lfsr FSR2,letter |
4015 movlw 'D' | 4012 movlw 'D' |
4016 movwf POSTINC2 | 4013 movwf POSTINC2 |
4017 movlw 'i' | 4014 movlw 'i' |
4018 movwf POSTINC2 | 4015 movwf POSTINC2 |