comparison code_part1/OSTC_code_asm_part1/menu_custom.asm @ 167:cb055a7d75f3

+ Use overlay local vars. + Make all private functions static. + Merge calc_tissue 2sec and 1min + Merge sim_tissue 1min and 10min + Expose basic display utilities for c-code. + Prepare stand-alone utilities for p2_main.c testing platform. + New c utility: int read_custom_function(cf#)
author JeanDo
date Mon, 24 Jan 2011 23:31:57 +0100
parents 999abb01c78f
children 53b16a746166
comparison
equal deleted inserted replaced
166:80de93d72a17 167:cb055a7d75f3
102 call read_eeprom ; Lowbyte 102 call read_eeprom ; Lowbyte
103 movf EEDATA,W ; copied into wreg 103 movf EEDATA,W ; copied into wreg
104 clrf EEADRH 104 clrf EEADRH
105 return ; return 105 return ; return
106 106
107 GETCUSTOM15 macro custom15 107 GETCUSTOM15 macro number
108 movlw custom15 108 movlw number
109 call getcustom15_1 109 call getcustom15
110 endm 110 endm
111 111
112 getcustom15_1: 112 global getcustom15
113 getcustom15:
113 ; # number of requested custom function in wreg 114 ; # number of requested custom function in wreg
114 movwf customfunction_temp2 115 movwf customfunction_temp2
115 116
116 movlw d'31' 117 movlw d'31'
117 cpfsgt customfunction_temp2 118 cpfsgt customfunction_temp2
790 791
791 btfss cf_type,7 ; 15 or 8 bit value ? 792 btfss cf_type,7 ; 15 or 8 bit value ?
792 bra cf_check_8bit 793 bra cf_check_8bit
793 794
794 ; Implement the 15bit check, even if not displayed... 795 ; Implement the 15bit check, even if not displayed...
795 rcall getcustom15_1 ; Read into hi:lo 796 rcall getcustom15 ; Read into hi:lo
796 797
797 movf cf_min,W ; Compute (bound-value) -> hi:lo 798 movf cf_min,W ; Compute (bound-value) -> hi:lo
798 subwf lo,F 799 subwf lo,F
799 movf cf_max,W 800 movf cf_max,W
800 bcf WREG,7 ; Clear min/max bit 801 bcf WREG,7 ; Clear min/max bit