comparison src/compass_ops.asm @ 429:4b93354b7738

hardware_flag handling
author heinrichsweikamp
date Thu, 16 Jun 2016 13:21:46 +0200
parents eccae727702f
children 929feb0da4f5
comparison
equal deleted inserted replaced
428:eccae727702f 429:4b93354b7738
1122 1122
1123 TFT_dive_compass_label_proc: 1123 TFT_dive_compass_label_proc:
1124 movwf sub_a+1 1124 movwf sub_a+1
1125 movlw d'14' 1125 movlw d'14'
1126 movwf up ; cardinal width in px 1126 movwf up ; cardinal width in px
1127 ; Input:
1128 ; xHI: DD - display'a current position
1129 ; xRD: RD - ruler display offset
1130 ; sub_a: RP - item's ruler display offset
1131 ; get the RD abck to sub_b
1132 ; movff xHI,hi ; mH
1133 bcf print_compass_label 1127 bcf print_compass_label
1134 ; 1/a. check if it's viewable ? sub_a(RP) >= sub_b(RD) ? 1128 ; 1/a. check if it's viewable ? sub_a(RP) >= sub_b(RD) ?
1135 ; set the carry flag if sub_b(xRD) is equal to or greater than sub_a(xRP): 1129 ; set the carry flag if sub_b(xRD) is equal to or greater than sub_a(xRP):
1136 movff xRD+0,sub_b+0 1130 movff xRD+0,sub_b+0
1137 movff xRD+1,sub_b+1 1131 movff xRD+1,sub_b+1
1174 movff WREG,win_top 1168 movff WREG,win_top
1175 movff lo,win_leftx2 1169 movff lo,win_leftx2
1176 movlw FT_SMALL 1170 movlw FT_SMALL
1177 movff WREG,win_font 1171 movff WREG,win_font
1178 ; 6. retain the new display positions 1172 ; 6. retain the new display positions
1179 ; movff hi,divB ; old-hi will be used by the c_mk : clear+marker printing mH
1180 movff lo,hi 1173 movff lo,hi
1181 movff up,WREG 1174 movff up,WREG
1182 addwf hi,F 1175 addwf hi,F
1183 movff lo,xLO 1176 movff lo,xLO
1184 movff hi,xHI 1177 movff hi,xHI