;============================================================================ ; PROJECT : UPS'SPECTRUM ; ; FILE : IRQ.INC ; ; VERSION : 1.0 ; ; DESCRIPTION : ; ; Handler of the timer0 interrupt, in charge of all real time tasks, ; mainly analog signal acquisition and software video generation... ; ; WARNING : These routines are VERY time critical, in particular for the ; video generation. Do not change the duration of any routine (even by adding ; or deleting only one instruction) without a deep analysis. Effects can go ; from misaligned pixels to... loss of video synchronisation. ; The main time dependencies are indicated in the source (see "PT" checkpoints ; and "RT" comments) but I'm not sure that the list is complete ! ; ; Comment : Some of the routines may seems a little "bulk force" and ; excessively rom expensive, but think twice about the performances required ; before replacing everything by loop ! In fact, we only do manually what ; modern compilers do as part as their optimization phase... loop unrolling ! ; ;============================================================================ ; Developped & Copyrighted by Robert LACOSTE ;============================================================================ ;---------------------------------------------------------------------------- ; Management of analog acquisitions and generation of Hsync signal ; ; Check if an analog acquisition is requested by the main program. ; If so do the acquisition of 256 samples (one each 2 video scan lines, ; giving a sample rate of 31.5KHz/2=15.75KHz) ; ; Synchronisation with the main program is done through acq_request flag ; and num_sample register : ; ; Main program : ; - To launch a sampling, put acq_request=1 and reset num_sample ; - wait for acq_request to be back 0 ; ; This interrupt routine : ; - if acq_request=0 => Nothing to do ; - if acq_request=1 => Launch acquisition and put acq_request=2 ; - if acq_request=2 => Get result and store it in (num_sample) ; Increment num_sample ; If <256, put acq_request=1 (sampling period) ; else put acq_request=0 ; ; The HSync signal is generated within this routine, insuring that its length ; is constant (=30 clock cycles) and its position fixed. ; ; Warning : The duration of this routine must be CONSTANT, whatever tests ; results are ! (now, its 37 cycles) ; ; Warning : on input, bankselect should be on zone_irq ;---------------------------------------------------------------------------- manage_adc macro bsf PORTC,4 ; set RC4 (HSync signal active) ;--> RT constraint !!! From PT1, delay >= 0.94µS=8 instr (pre-HSync blanking) ; and fixed (whatever test & branch are executed) ;--> RT checkpoint PT2 (start of HSync signal) ;--> RT checkpoint PT0A (start of ADC management) movlw 2 ; acq_request = 2 ? cpfseq acq_request goto adc_not2 ;--> Acq_request=2 ; save RA (because we must use a non banked memory) movpf ra, tmpi movpf ra+1, tmpi+1 ; scale ADC value (0 to 653536 -> -8192 to +8192) movlb 5 movpf ADRESL,ra+1 ; get ADC value movpf ADRESH,ra ; and scale it to our floating format bcf ALUSTA,C rrcf ra,F ; divide by 4 rrcf ra+1,F bcf ALUSTA,C rrcf ra,F rrcf ra+1,F movlw H'20' ; substract H'2000' subwf ra,F ; it's now from -1.0 to +1.0 ; store ADC value in data(num_sample) movlb 5 ; select register bank 5 movfp num_sample, WREG movlr 0 ; start with bank 0 btfsc WREG,7 ; select the good bank bsf BSR,5 btfsc WREG,6 ; based on 2 first bits of WREG bsf BSR,4 bcf ALUSTA,C ; multiply by 2 rlcf WREG,1 bsf WREG,7 ; and set high bit (data start at $80) movwf FSR0 ; and use it as an index movfp ra,INDF0 ; to store msb value... movlb 1 bcf PORTC,4 ; clear RC4 (HSync signal inactive) ;--> RT constraint !!! From PT2, delay = 3.77µS=30 instr (HSync duration) ; and fixed (whatever test & branch are executed) ;--> RT checkpoint PT3 (end of HSync signal) incf FSR0,1 movfp ra+1,INDF0 ; ... and lsb value BANKSEL zone_irq ; reset bank register ; increment num_sample and update aca_request clrf acq_request,F ; acq_request=0 movlw 1 incfsz num_sample,F ; increment num_sample movwf acq_request ; if <>0, acq_request=1 ; restore RA movfp tmpi, ra movfp tmpi+1, ra+1 goto end_manage_adc adc_not2 nop ; acq_request <> 2 nop nop nop nop nop nop ; delay nop's in order to be in nop ; synch with the switch case above nop nop nop nop movlw 1 cpfseq acq_request ; acq_request=1 ? goto adc_0 goto adc_1 ;--> Acq_request=0 adc_0 nop ; acq=request is 0. Nothing to do nop ; except wait... nop nop nop nop nop nop movlb 1 bcf PORTC,4 ; clear RC4 (HSync signal inactive) ;--> RT constraint !!! From PT2, delay = 3.77µS=30 instr (HSync duration) ; and fixed (whatever test & branch are executed) ;--> RT checkpoint PT3 (end of HSync signal) nop nop nop nop nop nop nop nop nop goto end_manage_adc ;--> Acq_request=1 adc_1 nop movlb 5 ; start ADC conversion bsf ADCON0,GO movlw 2 ; acq_request=2 movwf acq_request nop nop movlb 1 bcf PORTC,4 ; clear RC4 (HSync signal inactive) ;--> RT constraint !!! From PT2, delay = 3.77µS=30 instr (HSync duration) ; and fixed (whatever test & branch are executed) ;--> RT checkpoint PT3 (end of HSync signal) nop nop nop nop nop nop nop nop nop nop nop ; and wait end_manage_adc nop endm ;--> RT constraint !!! From PT0A, delay FIXED (now 42 instructions cycles) ;---------------------------------------------------------------------------- ; Routine called on timer0 interrupt ; ; This routine is called at 31.5KHz (horizontal refresh rate for 640x350) ; and do the main real time tasks : ; ; - Registers saving ; - Analog acquisition ; - Video generation ; - Registers restoring ; ; Warning : Time from interrupt to video generation must be rigourously ; stable. ;---------------------------------------------------------------------------- it_timer movpf BSR,sv_bsr ; save BSR ;--> RT checkpoint PT0 (start of interrupt routine) BANKSEL zone_irq movpf ALUSTA,sv_alusta ; save ALUSTA movwf sv_wreg ; save WREG movpf FSR0,sv_fsr0 ; save FSR0 movlb 0 clrf PORTB,F ; switch video off ;--> RT checkpoint PT1 (start of horizontal blanking zone) movlb 1 bsf PORTD,2 ; set RD2 (debug line : IRQ going on) movlw high INITTIM ; reload timer movwf tmpi movlw low INITTIM movwf TMR0L movfp tmpi,TMR0H manage_adc ; ADC management, 35 clock cycles movlw 1 ; increment scan_line addwf scan_line+1,F ; (rollback to 0 done in the last's clrf WREG,W ; line sub-routine) addwfc scan_line,F movlb 0 ; select registers bank 0 for video ; Based on scan_line value (from 1 to 449), calculate ; the address of the line management routine movlw low jump_table ; calculate jump address addwf scan_line+1,W movwf tmpi movlw high jump_table addwfc scan_line,W movwf PCLATH ;--> RT constraint !!! From PT3 to first pixel display, ; delay > 1.89µS=15 instr (post HSync blanking) movfp tmpi, PCL ; and jump to it ! ; at the end of the scan line display, the called routine ; will jump back to resume_irq resume_irq movlb 1 bcf PORTD,2 ; clear RD2 (debug line : IRQ going on) BANKSEL zone_irq movfp sv_alusta,ALUSTA ; restore ALUSTA movfp sv_fsr0,FSR0 ; and FSR0 movfp sv_wreg,WREG ; and WREG movfp sv_bsr,BSR ; and BSR retfie ; return from interrupt ;--> RT constraint !!! From PT0, delay < 30µS=240 instr (Timer0 irq period) ; it lets 240-71=169 instructions for the scan_x routines ;---------------------------------------------------------------------------- ; Jump address table ; ; For each scan line (1 to 449), calculated jump to the good management ; routine, depending on the scan line number ;---------------------------------------------------------------------------- jump_table goto scan_blanking ; scan 000, should not occur goto scan_vsynch_on ; scan 001, switch on VSynch goto scan_blanking ; scan 002, vertical blanking goto scan_vsynch_off ; scan 003, switch off VSynch goto scan_blanking ; scan 004, vertical blanking goto scan_blanking ; scan 005, vertical blanking goto scan_blanking ; scan 006, vertical blanking goto scan_blanking ; scan 007, vertical blanking goto scan_blanking ; scan 008, vertical blanking goto scan_blanking ; scan 009, vertical blanking goto scan_blanking ; scan 010, vertical blanking goto scan_blanking ; scan 011, vertical blanking goto scan_blanking ; scan 012, vertical blanking goto scan_blanking ; scan 013, vertical blanking goto scan_blanking ; scan 014, vertical blanking goto scan_blanking ; scan 015, vertical blanking goto scan_blanking ; scan 016, vertical blanking goto scan_blanking ; scan 017, vertical blanking goto scan_blanking ; scan 018, vertical blanking goto scan_blanking ; scan 019, vertical blanking goto scan_blanking ; scan 020, vertical blanking goto scan_blanking ; scan 021, vertical blanking goto scan_blanking ; scan 022, vertical blanking goto scan_blanking ; scan 023, vertical blanking goto scan_blanking ; scan 024, vertical blanking goto scan_blanking ; scan 025, vertical blanking goto scan_blanking ; scan 026, vertical blanking goto scan_blanking ; scan 027, vertical blanking goto scan_blanking ; scan 028, vertical blanking goto scan_blanking ; scan 029, vertical blanking goto scan_blanking ; scan 030, vertical blanking goto scan_blanking ; scan 031, vertical blanking goto scan_blanking ; scan 032, vertical blanking goto scan_blanking ; scan 033, vertical blanking goto scan_blanking ; scan 034, vertical blanking goto scan_blanking ; scan 035, vertical blanking goto scan_blanking ; scan 036, vertical blanking goto scan_blanking ; scan 037, vertical blanking goto scan_blanking ; scan 038, vertical blanking goto scan_blanking ; scan 039, vertical blanking goto scan_blanking ; scan 040, vertical blanking goto scan_blanking ; scan 041, vertical blanking goto scan_blanking ; scan 042, vertical blanking goto scan_blanking ; scan 043, vertical blanking goto scan_blanking ; scan 044, vertical blanking goto scan_blanking ; scan 045, vertical blanking goto scan_blanking ; scan 046, vertical blanking goto scan_blanking ; scan 047, vertical blanking goto scan_blanking ; scan 048, vertical blanking goto scan_blanking ; scan 049, vertical blanking goto scan_blanking ; scan 050, vertical blanking goto scan_blanking ; scan 051, vertical blanking goto scan_blanking ; scan 052, vertical blanking goto scan_blanking ; scan 053, vertical blanking goto scan_blanking ; scan 054, vertical blanking goto scan_blanking ; scan 055, vertical blanking goto scan_blanking ; scan 056, vertical blanking goto scan_blanking ; scan 057, vertical blanking goto scan_blanking ; scan 058, vertical blanking goto scan_blanking ; scan 059, vertical blanking goto scan_blanking ; scan 060, vertical blanking goto scan_blanking ; scan 061, vertical blanking goto scan_empty ; scan 062 (sl 000), empty line goto scan_empty ; scan 063 (sl 001), empty line goto scan_empty ; scan 064 (sl 002), empty line goto scan_empty ; scan 065 (sl 003), empty line goto scan_empty ; scan 066 (sl 004), empty line goto scan_empty ; scan 067 (sl 005), empty line goto scan_empty ; scan 068 (sl 006), empty line goto scan_empty ; scan 069 (sl 007), empty line goto scan_empty ; scan 070 (sl 008), empty line goto scan_empty ; scan 071 (sl 009), empty line goto scan_empty ; scan 072 (sl 010), empty line goto scan_empty ; scan 073 (sl 011), empty line goto scan_empty ; scan 074 (sl 012), empty line goto scan_empty ; scan 075 (sl 013), empty line goto scan_empty ; scan 076 (sl 014), empty line goto scan_empty ; scan 077 (sl 015), empty line goto scan_empty ; scan 078 (sl 016), empty line goto scan_empty ; scan 079 (sl 017), empty line goto scan_empty ; scan 080 (sl 018), empty line goto scan_empty ; scan 081 (sl 019), empty line goto scan_empty ; scan 082 (sl 020), empty line goto scan_empty ; scan 083 (sl 021), empty line goto scan_empty ; scan 084 (sl 022), empty line goto scan_hscalelong ; scan 085 (sl 023), h.scale long sep goto scan_hscalelong ; scan 086 (sl 024), h.scale long sep goto scan_hscalelong ; scan 087 (sl 025), h.scale long sep goto scan_hscalelong ; scan 088 (sl 026), h.scale long sep goto scan_hscalelong ; scan 089 (sl 027), h.scale long sep goto scan_hscalelong ; scan 090 (sl 028), h.scale long sep goto scan_hscalelong ; scan 091 (sl 029), h.scale long sep goto scan_hscalelong ; scan 092 (sl 030), h.scale long sep goto scan_hscaleshort ; scan 093 (sl 031), h.scale short sep goto scan_hscaleshort ; scan 094 (sl 032), h.scale short sep goto scan_hscaleshort ; scan 095 (sl 033), h.scale short sep goto scan_hscaleshort ; scan 096 (sl 034), h.scale short sep goto scan_hscaleshort ; scan 097 (sl 035), h.scale short sep goto scan_hscaleshort ; scan 098 (sl 036), h.scale short sep goto scan_hscaleshort ; scan 099 (sl 037), h.scale short sep goto scan_empty ; scan 100 (sl 038), empty line goto scan_empty ; scan 101 (sl 039), empty line goto scan_empty ; scan 102 (sl 040), empty line goto scan_hscaleline ; scan 103 (sl 041), h. plain line goto scan_sepline ; scan 104 (sl 042), frequencies sep. goto scan_freqline ; scan 105 (sl 043), freq 001 goto scan_sepline ; scan 106 (sl 044), frequencies sep. goto scan_freqline ; scan 107 (sl 045), freq 002 goto scan_sepline ; scan 108 (sl 046), frequencies sep. goto scan_freqline ; scan 109 (sl 047), freq 003 goto scan_sepline ; scan 110 (sl 048), frequencies sep. goto scan_freqline ; scan 111 (sl 049), freq 004 goto scan_sepline ; scan 112 (sl 050), frequencies sep. goto scan_freqline ; scan 113 (sl 051), freq 005 goto scan_sepline ; scan 114 (sl 052), frequencies sep. goto scan_freqline ; scan 115 (sl 053), freq 006 goto scan_sepline ; scan 116 (sl 054), frequencies sep. goto scan_freqline ; scan 117 (sl 055), freq 007 goto scan_sepline ; scan 118 (sl 056), frequencies sep. goto scan_freqline ; scan 119 (sl 057), freq 008 goto scan_sepline ; scan 120 (sl 058), frequencies sep. goto scan_freqline ; scan 121 (sl 059), freq 009 goto scan_sepline ; scan 122 (sl 060), frequencies sep. goto scan_freqline ; scan 123 (sl 061), freq 010 goto scan_sepline ; scan 124 (sl 062), frequencies sep. goto scan_freqline ; scan 125 (sl 063), freq 011 goto scan_sepline ; scan 126 (sl 064), frequencies sep. goto scan_freqline ; scan 127 (sl 065), freq 012 goto scan_sepline ; scan 128 (sl 066), frequencies sep. goto scan_freqline ; scan 129 (sl 067), freq 013 goto scan_sepline ; scan 130 (sl 068), frequencies sep. goto scan_freqline ; scan 131 (sl 069), freq 014 goto scan_sepline ; scan 132 (sl 070), frequencies sep. goto scan_freqline ; scan 133 (sl 071), freq 015 goto scan_sepline ; scan 134 (sl 072), frequencies sep. goto scan_freqline ; scan 135 (sl 073), freq 016 goto scan_vscaleshort ; scan 136 (sl 074), v.scale short s. goto scan_freqline ; scan 137 (sl 075), freq 017 goto scan_sepline ; scan 138 (sl 076), frequencies sep. goto scan_freqline ; scan 139 (sl 077), freq 018 goto scan_sepline ; scan 140 (sl 078), frequencies sep. goto scan_freqline ; scan 141 (sl 079), freq 019 goto scan_sepline ; scan 142 (sl 080), frequencies sep. goto scan_freqline ; scan 143 (sl 081), freq 020 goto scan_sepline ; scan 144 (sl 082), frequencies sep. goto scan_freqline ; scan 145 (sl 083), freq 021 goto scan_sepline ; scan 146 (sl 084), frequencies sep. goto scan_freqline ; scan 147 (sl 085), freq 022 goto scan_sepline ; scan 148 (sl 086), frequencies sep. goto scan_freqline ; scan 149 (sl 087), freq 023 goto scan_sepline ; scan 150 (sl 088), frequencies sep. goto scan_freqline ; scan 151 (sl 089), freq 024 goto scan_sepline ; scan 152 (sl 090), frequencies sep. goto scan_freqline ; scan 153 (sl 091), freq 025 goto scan_sepline ; scan 154 (sl 092), frequencies sep. goto scan_freqline ; scan 155 (sl 093), freq 026 goto scan_sepline ; scan 156 (sl 094), frequencies sep. goto scan_freqline ; scan 157 (sl 095), freq 027 goto scan_sepline ; scan 158 (sl 096), frequencies sep. goto scan_freqline ; scan 159 (sl 097), freq 028 goto scan_sepline ; scan 160 (sl 098), frequencies sep. goto scan_freqline ; scan 161 (sl 099), freq 029 goto scan_sepline ; scan 162 (sl 100), frequencies sep. goto scan_freqline ; scan 163 (sl 101), freq 030 goto scan_sepline ; scan 164 (sl 102), frequencies sep. goto scan_freqline ; scan 165 (sl 103), freq 031 goto scan_sepline ; scan 166 (sl 104), frequencies sep. goto scan_freqline ; scan 167 (sl 105), freq 032 goto scan_vscaleshort ; scan 168 (sl 106), v.scale short s. goto scan_freqline ; scan 169 (sl 107), freq 033 goto scan_sepline ; scan 170 (sl 108), frequencies sep. goto scan_freqline ; scan 171 (sl 109), freq 034 goto scan_sepline ; scan 172 (sl 110), frequencies sep. goto scan_freqline ; scan 173 (sl 111), freq 035 goto scan_sepline ; scan 174 (sl 112), frequencies sep. goto scan_freqline ; scan 175 (sl 113), freq 036 goto scan_sepline ; scan 176 (sl 114), frequencies sep. goto scan_freqline ; scan 177 (sl 115), freq 037 goto scan_sepline ; scan 178 (sl 116), frequencies sep. goto scan_freqline ; scan 179 (sl 117), freq 038 goto scan_sepline ; scan 180 (sl 118), frequencies sep. goto scan_freqline ; scan 181 (sl 119), freq 039 goto scan_sepline ; scan 182 (sl 120), frequencies sep. goto scan_freqline ; scan 183 (sl 121), freq 040 goto scan_sepline ; scan 184 (sl 122), frequencies sep. goto scan_freqline ; scan 185 (sl 123), freq 041 goto scan_sepline ; scan 186 (sl 124), frequencies sep. goto scan_freqline ; scan 187 (sl 125), freq 042 goto scan_sepline ; scan 188 (sl 126), frequencies sep. goto scan_freqline ; scan 189 (sl 127), freq 043 goto scan_sepline ; scan 190 (sl 128), frequencies sep. goto scan_freqline ; scan 191 (sl 129), freq 044 goto scan_sepline ; scan 192 (sl 130), frequencies sep. goto scan_freqline ; scan 193 (sl 131), freq 045 goto scan_sepline ; scan 194 (sl 132), frequencies sep. goto scan_freqline ; scan 195 (sl 133), freq 046 goto scan_sepline ; scan 196 (sl 134), frequencies sep. goto scan_freqline ; scan 197 (sl 135), freq 047 goto scan_sepline ; scan 198 (sl 136), frequencies sep. goto scan_freqline ; scan 199 (sl 137), freq 048 goto scan_vscaleshort ; scan 200 (sl 138), v.scale short s. goto scan_freqline ; scan 201 (sl 139), freq 049 goto scan_sepline ; scan 202 (sl 140), frequencies sep. goto scan_freqline ; scan 203 (sl 141), freq 050 goto scan_sepline ; scan 204 (sl 142), frequencies sep. goto scan_freqline ; scan 205 (sl 143), freq 051 goto scan_sepline ; scan 206 (sl 144), frequencies sep. goto scan_freqline ; scan 207 (sl 145), freq 052 goto scan_sepline ; scan 208 (sl 146), frequencies sep. goto scan_freqline ; scan 209 (sl 147), freq 053 goto scan_sepline ; scan 210 (sl 148), frequencies sep. goto scan_freqline ; scan 211 (sl 149), freq 054 goto scan_sepline ; scan 212 (sl 150), frequencies sep. goto scan_freqline ; scan 213 (sl 151), freq 055 goto scan_sepline ; scan 214 (sl 152), frequencies sep. goto scan_freqline ; scan 215 (sl 153), freq 056 goto scan_sepline ; scan 216 (sl 154), frequencies sep. goto scan_freqline ; scan 217 (sl 155), freq 057 goto scan_sepline ; scan 218 (sl 156), frequencies sep. goto scan_freqline ; scan 219 (sl 157), freq 058 goto scan_sepline ; scan 220 (sl 158), frequencies sep. goto scan_freqline ; scan 221 (sl 159), freq 059 goto scan_sepline ; scan 222 (sl 160), frequencies sep. goto scan_freqline ; scan 223 (sl 161), freq 060 goto scan_sepline ; scan 224 (sl 162), frequencies sep. goto scan_freqline ; scan 225 (sl 163), freq 061 goto scan_sepline ; scan 226 (sl 164), frequencies sep. goto scan_freqline ; scan 227 (sl 165), freq 062 goto scan_sepline ; scan 228 (sl 166), frequencies sep. goto scan_freqline ; scan 229 (sl 167), freq 063 goto scan_sepline ; scan 230 (sl 168), frequencies sep. goto scan_freqline ; scan 231 (sl 169), freq 064 goto scan_vscaleshort ; scan 232 (sl 170), v.scale short s. goto scan_freqline ; scan 233 (sl 171), freq 065 goto scan_sepline ; scan 234 (sl 172), frequencies sep. goto scan_freqline ; scan 235 (sl 173), freq 066 goto scan_sepline ; scan 236 (sl 174), frequencies sep. goto scan_freqline ; scan 237 (sl 175), freq 067 goto scan_sepline ; scan 238 (sl 176), frequencies sep. goto scan_freqline ; scan 239 (sl 177), freq 068 goto scan_sepline ; scan 240 (sl 178), frequencies sep. goto scan_freqline ; scan 241 (sl 179), freq 069 goto scan_sepline ; scan 242 (sl 180), frequencies sep. goto scan_freqline ; scan 243 (sl 181), freq 070 goto scan_sepline ; scan 244 (sl 182), frequencies sep. goto scan_freqline ; scan 245 (sl 183), freq 071 goto scan_sepline ; scan 246 (sl 184), frequencies sep. goto scan_freqline ; scan 247 (sl 185), freq 072 goto scan_sepline ; scan 248 (sl 186), frequencies sep. goto scan_freqline ; scan 249 (sl 187), freq 073 goto scan_sepline ; scan 250 (sl 188), frequencies sep. goto scan_freqline ; scan 251 (sl 189), freq 074 goto scan_sepline ; scan 252 (sl 190), frequencies sep. goto scan_freqline ; scan 253 (sl 191), freq 075 goto scan_sepline ; scan 254 (sl 192), frequencies sep. goto scan_freqline ; scan 255 (sl 193), freq 076 goto scan_sepline ; scan 256 (sl 194), frequencies sep. goto scan_freqline ; scan 257 (sl 195), freq 077 goto scan_sepline ; scan 258 (sl 196), frequencies sep. goto scan_freqline ; scan 259 (sl 197), freq 078 goto scan_sepline ; scan 260 (sl 198), frequencies sep. goto scan_freqline ; scan 261 (sl 199), freq 079 goto scan_sepline ; scan 262 (sl 200), frequencies sep. goto scan_freqline ; scan 263 (sl 201), freq 080 goto scan_vscalelong ; scan 264 (sl 202), v.scale long s. goto scan_freqline ; scan 265 (sl 203), freq 081 goto scan_sepline ; scan 266 (sl 204), frequencies sep. goto scan_freqline ; scan 267 (sl 205), freq 082 goto scan_sepline ; scan 268 (sl 206), frequencies sep. goto scan_freqline ; scan 269 (sl 207), freq 083 goto scan_sepline ; scan 270 (sl 208), frequencies sep. goto scan_freqline ; scan 271 (sl 209), freq 084 goto scan_sepline ; scan 272 (sl 210), frequencies sep. goto scan_freqline ; scan 273 (sl 211), freq 085 goto scan_sepline ; scan 274 (sl 212), frequencies sep. goto scan_freqline ; scan 275 (sl 213), freq 086 goto scan_sepline ; scan 276 (sl 214), frequencies sep. goto scan_freqline ; scan 277 (sl 215), freq 087 goto scan_sepline ; scan 278 (sl 216), frequencies sep. goto scan_freqline ; scan 279 (sl 217), freq 088 goto scan_sepline ; scan 280 (sl 218), frequencies sep. goto scan_freqline ; scan 281 (sl 219), freq 089 goto scan_sepline ; scan 282 (sl 220), frequencies sep. goto scan_freqline ; scan 283 (sl 221), freq 090 goto scan_sepline ; scan 284 (sl 222), frequencies sep. goto scan_freqline ; scan 285 (sl 223), freq 091 goto scan_sepline ; scan 286 (sl 224), frequencies sep. goto scan_freqline ; scan 287 (sl 225), freq 092 goto scan_sepline ; scan 288 (sl 226), frequencies sep. goto scan_freqline ; scan 289 (sl 227), freq 093 goto scan_sepline ; scan 290 (sl 228), frequencies sep. goto scan_freqline ; scan 291 (sl 229), freq 094 goto scan_sepline ; scan 292 (sl 230), frequencies sep. goto scan_freqline ; scan 293 (sl 231), freq 095 goto scan_sepline ; scan 294 (sl 232), frequencies sep. goto scan_freqline ; scan 295 (sl 233), freq 096 goto scan_vscaleshort ; scan 296 (sl 234), v.scale short s. goto scan_freqline ; scan 297 (sl 235), freq 097 goto scan_sepline ; scan 298 (sl 236), frequencies sep. goto scan_freqline ; scan 299 (sl 237), freq 098 goto scan_sepline ; scan 300 (sl 238), frequencies sep. goto scan_freqline ; scan 301 (sl 239), freq 099 goto scan_sepline ; scan 302 (sl 240), frequencies sep. goto scan_freqline ; scan 303 (sl 241), freq 100 goto scan_sepline ; scan 304 (sl 242), frequencies sep. goto scan_freqline ; scan 305 (sl 243), freq 101 goto scan_sepline ; scan 306 (sl 244), frequencies sep. goto scan_freqline ; scan 307 (sl 245), freq 102 goto scan_sepline ; scan 308 (sl 246), frequencies sep. goto scan_freqline ; scan 309 (sl 247), freq 103 goto scan_sepline ; scan 310 (sl 248), frequencies sep. goto scan_freqline ; scan 311 (sl 249), freq 104 goto scan_sepline ; scan 312 (sl 250), frequencies sep. goto scan_freqline ; scan 313 (sl 251), freq 105 goto scan_sepline ; scan 314 (sl 252), frequencies sep. goto scan_freqline ; scan 315 (sl 253), freq 106 goto scan_sepline ; scan 316 (sl 254), frequencies sep. goto scan_freqline ; scan 317 (sl 255), freq 107 goto scan_sepline ; scan 318 (sl 256), frequencies sep. goto scan_freqline ; scan 319 (sl 257), freq 108 goto scan_sepline ; scan 320 (sl 258), frequencies sep. goto scan_freqline ; scan 321 (sl 259), freq 109 goto scan_sepline ; scan 322 (sl 260), frequencies sep. goto scan_freqline ; scan 323 (sl 261), freq 110 goto scan_sepline ; scan 324 (sl 262), frequencies sep. goto scan_freqline ; scan 325 (sl 263), freq 111 goto scan_sepline ; scan 326 (sl 264), frequencies sep. goto scan_freqline ; scan 327 (sl 265), freq 112 goto scan_vscaleshort ; scan 328 (sl 266), v.scale short s. goto scan_freqline ; scan 329 (sl 267), freq 113 goto scan_sepline ; scan 330 (sl 268), frequencies sep. goto scan_freqline ; scan 331 (sl 269), freq 114 goto scan_sepline ; scan 332 (sl 270), frequencies sep. goto scan_freqline ; scan 333 (sl 271), freq 115 goto scan_sepline ; scan 334 (sl 272), frequencies sep. goto scan_freqline ; scan 335 (sl 273), freq 116 goto scan_sepline ; scan 336 (sl 274), frequencies sep. goto scan_freqline ; scan 337 (sl 275), freq 117 goto scan_sepline ; scan 338 (sl 276), frequencies sep. goto scan_freqline ; scan 339 (sl 277), freq 118 goto scan_sepline ; scan 340 (sl 278), frequencies sep. goto scan_freqline ; scan 341 (sl 279), freq 119 goto scan_sepline ; scan 342 (sl 280), frequencies sep. goto scan_freqline ; scan 343 (sl 281), freq 120 goto scan_sepline ; scan 344 (sl 282), frequencies sep. goto scan_freqline ; scan 345 (sl 283), freq 121 goto scan_sepline ; scan 346 (sl 284), frequencies sep. goto scan_freqline ; scan 347 (sl 285), freq 122 goto scan_sepline ; scan 348 (sl 286), frequencies sep. goto scan_freqline ; scan 349 (sl 287), freq 123 goto scan_sepline ; scan 350 (sl 288), frequencies sep. goto scan_freqline ; scan 351 (sl 289), freq 124 goto scan_sepline ; scan 352 (sl 290), frequencies sep. goto scan_freqline ; scan 353 (sl 291), freq 125 goto scan_sepline ; scan 354 (sl 292), frequencies sep. goto scan_freqline ; scan 355 (sl 293), freq 126 goto scan_sepline ; scan 356 (sl 294), frequencies sep. goto scan_freqline ; scan 357 (sl 295), freq 127 goto scan_sepline ; scan 358 (sl 296), frequencies sep. goto scan_empty ; scan 359 (sl 297), empty line goto scan_empty ; scan 360 (sl 298), empty line goto scan_empty ; scan 361 (sl 299), empty line goto scan_empty ; scan 362 (sl 300), empty line goto scan_empty ; scan 363 (sl 301), empty line goto scan_empty ; scan 364 (sl 302), empty line goto scan_empty ; scan 365 (sl 303), empty line goto scan_empty ; scan 366 (sl 304), empty line goto scan_empty ; scan 367 (sl 305), empty line goto scan_empty ; scan 368 (sl 306), empty line goto scan_empty ; scan 369 (sl 307), empty line goto scan_empty ; scan 370 (sl 308), empty line goto scan_empty ; scan 371 (sl 309), empty line goto scan_empty ; scan 372 (sl 310), empty line goto scan_empty ; scan 373 (sl 311), empty line goto scan_empty ; scan 374 (sl 312), empty line goto scan_empty ; scan 375 (sl 313), empty line goto scan_empty ; scan 376 (sl 314), empty line goto scan_empty ; scan 377 (sl 315), empty line goto scan_empty ; scan 378 (sl 316), empty line goto scan_empty ; scan 379 (sl 317), empty line goto scan_empty ; scan 380 (sl 318), empty line goto scan_empty ; scan 381 (sl 319), empty line goto scan_empty ; scan 382 (sl 320), empty line goto scan_empty ; scan 383 (sl 321), empty line goto scan_empty ; scan 384 (sl 322), empty line goto scan_empty ; scan 385 (sl 323), empty line goto scan_empty ; scan 386 (sl 324), empty line goto scan_titlempty ; scan 387 (sl 325), empty title goto scan_titlempty ; scan 388 (sl 326), empty title goto scan_titlempty ; scan 389 (sl 327), empty title goto scan_titlempty ; scan 390 (sl 328), empty title goto scan_titlempty ; scan 391 (sl 329), empty title goto scan_titlempty ; scan 392 (sl 330), empty title goto scan_title0 ; scan 393 (sl 331), title line 0 goto scan_title0 ; scan 394 (sl 332), title line 0 goto scan_title1 ; scan 395 (sl 333), title line 1 goto scan_title1 ; scan 396 (sl 334), title line 1 goto scan_title2 ; scan 397 (sl 335), title line 2 goto scan_title2 ; scan 398 (sl 336), title line 2 goto scan_title3 ; scan 399 (sl 337), title line 3 goto scan_title3 ; scan 400 (sl 338), title line 3 goto scan_title4 ; scan 401 (sl 339), title line 4 goto scan_title4 ; scan 402 (sl 340), title line 4 goto scan_title5 ; scan 403 (sl 341), title line 5 goto scan_title5 ; scan 404 (sl 342), title line 5 goto scan_title6 ; scan 405 (sl 343), title line 6 goto scan_title6 ; scan 406 (sl 344), title line 6 goto scan_titlempty ; scan 407 (sl 345), empty title goto scan_titlempty ; scan 408 (sl 346), empty title goto scan_titlempty ; scan 409 (sl 347), empty title goto scan_titlempty ; scan 410 (sl 348), empty title goto scan_titlempty ; scan 411 (sl 349), empty title goto scan_blanking ; scan 412, vertical blanking goto scan_blanking ; scan 413, vertical blanking goto scan_blanking ; scan 414, vertical blanking goto scan_blanking ; scan 415, vertical blanking goto scan_blanking ; scan 416, vertical blanking goto scan_blanking ; scan 417, vertical blanking goto scan_blanking ; scan 418, vertical blanking goto scan_blanking ; scan 419, vertical blanking goto scan_blanking ; scan 420, vertical blanking goto scan_blanking ; scan 421, vertical blanking goto scan_blanking ; scan 422, vertical blanking goto scan_blanking ; scan 423, vertical blanking goto scan_blanking ; scan 424, vertical blanking goto scan_blanking ; scan 425, vertical blanking goto scan_blanking ; scan 426, vertical blanking goto scan_blanking ; scan 427, vertical blanking goto scan_blanking ; scan 428, vertical blanking goto scan_blanking ; scan 429, vertical blanking goto scan_blanking ; scan 430, vertical blanking goto scan_blanking ; scan 431, vertical blanking goto scan_blanking ; scan 432, vertical blanking goto scan_blanking ; scan 433, vertical blanking goto scan_blanking ; scan 434, vertical blanking goto scan_blanking ; scan 435, vertical blanking goto scan_blanking ; scan 436, vertical blanking goto scan_blanking ; scan 437, vertical blanking goto scan_blanking ; scan 438, vertical blanking goto scan_blanking ; scan 439, vertical blanking goto scan_blanking ; scan 440, vertical blanking goto scan_blanking ; scan 441, vertical blanking goto scan_blanking ; scan 442, vertical blanking goto scan_blanking ; scan 443, vertical blanking goto scan_blanking ; scan 444, vertical blanking goto scan_blanking ; scan 445, vertical blanking goto scan_blanking ; scan 446, vertical blanking goto scan_blanking ; scan 447, vertical blanking goto scan_blanking ; scan 448, vertical blanking goto scan_rstscanl ; scan 449, reset scan_line ;---------------------------------------------------------------------------- ; Soft generation of a vertical blanking line ; ; Warning : all scan_X routines should execute in less than 169 instructions ;---------------------------------------------------------------------------- scan_blanking goto resume_irq ; Nothing to do as video already off ! ;---------------------------------------------------------------------------- ; Soft generation of a vertical blanking line with switch on of Vsynch ; ; Warning : all scan_X routines should execute in less than 169 instructions ;---------------------------------------------------------------------------- scan_vsynch_on movlb 1 bcf PORTC,6 ; RC6=0 (Vsynch active) incf frame_num,F ; increment frame number goto resume_irq ;---------------------------------------------------------------------------- ; Soft generation of a vertical blanking line with switch off of Vsynch ; ; Warning : all scan_X routines should execute in less than 169 instructions ;---------------------------------------------------------------------------- scan_vsynch_off movlb 1 bsf PORTC,6 ; RC6=1 (Vsynch inactive) goto resume_irq ;---------------------------------------------------------------------------- ; Soft generation of a blank screen line (background color) ; ; Warning : all scan_X routines should execute in less than 169 instructions ;---------------------------------------------------------------------------- scan_empty movlb 0 movlw BKG_COLOR movwf PORTB ; set background color goto resume_irq ;---------------------------------------------------------------------------- ; Soft generation of a frequency line ; ; Warning : all scan_X routines should execute in less than 169 instructions ;---------------------------------------------------------------------------- scan_freqline movlb 0 movlw BKG_COLOR movwf PORTB ; set background color movlw D'103' ; calculate frequency number subwf scan_line+1,W ; (=(scan_line-103)/2) movwf tmpi bcf ALUSTA,C rrcf tmpi,W dispbufrd ; read display buffer value (8 cycles) andlw B'01111111' ; be sure it is <128 movwf tmpi ; and store it in tmpi sublw low endfreqline ; calculate jump address movwf tmpi2+1 ; (endfreqline-freq value) movlw high endfreqline ; store msb in PCLATH and lsb in tmpi2+1 movwf tmpi2 clrf WREG,W subwfb tmpi2,F movfp tmpi2,PCLATH movlw BKG_COLOR movwf tmpcolor movlw SLINE_COLOR movwf PORTB ; draw vertical line movfp tmpcolor,PORTB ; and return to background color clrf WREG,W cpfsgt tmpi ; if value 0 goto resume_irq ; return movlw FREQ_COLOR ; else movwf PORTB ; draw frequency line movfp tmpi2+1,PCL ; and jump to precalculated address nop nop start_wait128 nop nop ; 128 nop's nop ; in order to have a cycle per cycle nop ; delay, a jump is done to the nop ; precalculated nop in this list ! nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop endfreqline movlw BKG_COLOR movwf PORTB ; and return to background color goto resume_irq ;---------------------------------------------------------------------------- ; Soft generation of a separating line between 2 frequency lines ; ; Warning : all scan_X routines should execute in less than 169 instructions ;---------------------------------------------------------------------------- scan_sepline movlb 0 movlw BKG_COLOR movwf PORTB ; set background color nop nop nop ; serie of nop's in order to nop ; be sure that the vertical nop ; line will be aligned with ; the one for frequency lines ! nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop movlw BKG_COLOR movwf tmpcolor movlw SLINE_COLOR movwf PORTB ; draw vertical line movfp tmpcolor,PORTB ; and return to background color goto resume_irq ;---------------------------------------------------------------------------- ; Soft generation of a separating line with a "short" scale indicator ; ; Warning : all scan_X routines should execute in less than 169 instructions ;---------------------------------------------------------------------------- scan_vscaleshort movlb 0 movlw BKG_COLOR movwf PORTB ; set background color nop nop nop ; serie of nop's in order to nop ; be sure that the vertical nop ; line will be aligned with ; the one for frequency lines ! nop nop nop nop nop nop nop nop nop nop nop nop nop movlw SHORTS_COLOR movwf PORTB ; draw the small indicator nop movlw BKG_COLOR movwf tmpcolor movwf PORTB ; return to background color movlw SLINE_COLOR movwf PORTB ; draw vertical line movfp tmpcolor,PORTB ; and return to background color goto resume_irq ;---------------------------------------------------------------------------- ; Soft generation of a separating line with a "long" scale indicator ; ; Warning : all scan_X routines should execute in less than 169 instructions ;---------------------------------------------------------------------------- scan_vscalelong movlb 0 movlw BKG_COLOR movwf PORTB ; set background color nop nop nop ; serie of nop's in order to nop ; be sure that the vertical nop ; line will be aligned with ; the one for frequency lines ! nop nop nop nop nop nop nop nop nop nop nop movlw LONGS_COLOR movwf PORTB ; draw the long indicator nop nop nop movlw BKG_COLOR movwf tmpcolor movwf PORTB ; return to background color movlw SLINE_COLOR movwf PORTB ; draw vertical line movfp tmpcolor,PORTB ; and return to background color goto resume_irq ;---------------------------------------------------------------------------- ; Soft generation of the horizontal scale "long" steps ; ; Warning : all scan_X routines should execute in less than 169 instructions ;---------------------------------------------------------------------------- scan_hscalelong movlb 0 movlw BKG_COLOR movwf PORTB ; set background color movwf tmpi2 ; save color for background movlw LONGS_COLOR movwf tmpi ; save color for long steps drawing movlw BKG_COLOR movwf tmpi+1 ; save color for short steps drawing movlb 0 btfsc PORTB,7 ; log mode ? goto scale_lin_m ; if not, draw lin scale goto scale_log_m ; else draw log scale scale_lin_m nop ; time correction for btfsc scale_lin_m2 nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop movfp tmpi,PORTB ;col 0 -> long movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB ;col 10 movfp tmpi2,PORTB movfp tmpi+1,PORTB ;-> short movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB ;col20 movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi+1,PORTB ;->short movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB ;col30 movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi+1,PORTB ;->short movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB ;col 40 movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi+1,PORTB ;->short movfp tmpi2,PORTB movfp tmpi2,PORTB ;col 50 movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi,PORTB ;col 60->long movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB ;col 70 movfp tmpi2,PORTB movfp tmpi+1,PORTB ;->short movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB ;col 80 movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi+1,PORTB ;->short movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB ;col 90 movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi+1,PORTB ;->short movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB ;col 100 movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi+1,PORTB ;->short movfp tmpi2,PORTB movfp tmpi2,PORTB ;col 110 movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi,PORTB ;col 120->long movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB ;col 127 goto resume_irq scale_log_m nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop movfp tmpi,PORTB ;col 0->long movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB ;col 10 movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi+1,PORTB ;->short movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB ;col20 movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi+1,PORTB ;->short movfp tmpi2,PORTB movfp tmpi2,PORTB ;col30 movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi+1,PORTB ;->short movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi,PORTB ;col 40->long movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB ;col 50 movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi+1,PORTB ;->short movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB ;col 60 movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi+1,PORTB ;->short movfp tmpi2,PORTB movfp tmpi2,PORTB ;col 70 movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi+1,PORTB ;->short movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi,PORTB ;col 80->long movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB ;col 90 movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi+1,PORTB ;->short movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB ;col 100 movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi+1,PORTB ;->short movfp tmpi2,PORTB movfp tmpi2,PORTB ;col 110 movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi+1,PORTB ;->short movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi,PORTB ;col 120->long movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB movfp tmpi2,PORTB ;col 127 goto resume_irq ;---------------------------------------------------------------------------- ; Soft generation of the horizontal scale "short" steps ; ; Warning : all scan_X routines should execute in less than 169 instructions ;---------------------------------------------------------------------------- scan_hscaleshort movlb 0 movlw BKG_COLOR movwf PORTB ; set background color movwf tmpi2 ; save color for background movlw LONGS_COLOR movwf tmpi ; save color for long steps drawing movlw SHORTS_COLOR movwf tmpi+1 ; save color for short steps drawing movlb 0 btfsc PORTB,7 ; log mode ? goto scale_lin_m ; if not, draw lin scale goto scale_log_m ; else draw log scale ;---------------------------------------------------------------------------- ; Soft generation of the horizontal scale plain line ; ; Warning : all scan_X routines should execute in less than 169 instructions ;---------------------------------------------------------------------------- scan_hscaleline movlb 0 movlw BKG_COLOR movwf PORTB ; set background color nop nop nop ; serie of nop's in order to nop ; be sure that the vertical nop ; line will be aligned with ; the one for frequency lines ! nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop movlw SLINE_COLOR movwf PORTB ; draw vertical line goto start_wait128 ; and wait for end of active line ;---------------------------------------------------------------------------- ; Soft generation of a blank screen line (background title color) ; ; Warning : all scan_X routines should execute in less than 169 instructions ;---------------------------------------------------------------------------- scan_titlempty movlb 0 movlw BKGTITLE_COLOR movwf PORTB ; set background color goto resume_irq ;---------------------------------------------------------------------------- ; Soft generation of the title lines ; ; Warning : all scan_X routines should execute in less than 169 instructions ;---------------------------------------------------------------------------- ; Title content : ; * **** ***** *** * *** ***** ***** *** ***** **** * * * * * ; *** * * * * * * * * * * * * * * * * * * ** ** *** ; ***** * * * * * * * * * * * * * * * * * ***** ; ******* **** * * *** ***** *** * * **** * * * * ******* ; ********* * * * * * * * * * * * * * * ********* ; *********** * * * * * * * * * * * * * * * * * *********** ; ************* * ***** *** *** * ***** *** * * * *** * * ************* ; ; Hold sign content : ; ; * * * * ; * * * * ; * ***** * ; * * * * ; * * * * ; ; The following routines display each line of the previous strings, scan line ; per scan line. No other way to do cycle per cycle video generation (of course ; it's possible to implement a character set map, but not useful in this case) ; ; Of course the following routines where generated automaticaly ! (seems like a ; compiler job, no ?) ; Generation of title0 scan_title0 movlb 0 movlw BKGTITLE_COLOR movwf PORTB ;set background color movlw TITLE_COLOR ;store title color movwf tmpi+1 ;in tmpi+1 movlw BKGTITLE_COLOR ;and background color movwf tmpi ;in tmpi movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB ;reset to background color goto resume_irq ;and return ; Generation of title1 scan_title1 movlb 0 movlw BKGTITLE_COLOR movwf PORTB ;set background color movlw TITLE_COLOR ;store title color movwf tmpi+1 ;in tmpi+1 movlw BKGTITLE_COLOR ;and background color movwf tmpi ;in tmpi movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB ;reset to background color movlb 0 btfsc PORTB,6 ;mode hold ? goto resume_irq ;if not, return btfsc frame_num,5 ;blinking test goto resume_irq ;if off return movlw HOLD_COLOR ;store hold color movwf tmpi+1 ;in tmpi+1 movfp tmpi,PORTB ;and display "hold" sign movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB movfp tmpi,PORTB movfp tmpi,PORTB goto resume_irq ;and return ; Generation of title2 scan_title2 movlb 0 movlw BKGTITLE_COLOR movwf PORTB ;set background color movlw TITLE_COLOR ;store title color movwf tmpi+1 ;in tmpi+1 movlw BKGTITLE_COLOR ;and background color movwf tmpi ;in tmpi movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB ;reset to background color movlb 0 btfsc PORTB,6 ;mode hold ? goto resume_irq ;if not, return btfsc frame_num,5 ;blinking test goto resume_irq ;if off return movlw HOLD_COLOR ;store hold color movwf tmpi+1 ;in tmpi+1 movfp tmpi,PORTB ;and display "hold" sign movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB movfp tmpi,PORTB goto resume_irq ;and return ; Generation of title3 scan_title3 movlb 0 movlw BKGTITLE_COLOR movwf PORTB ;set background color movlw TITLE_COLOR ;store title color movwf tmpi+1 ;in tmpi+1 movlw BKGTITLE_COLOR ;and background color movwf tmpi ;in tmpi movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB ;reset to background color movlb 0 btfsc PORTB,6 ;mode hold ? goto resume_irq ;if not, return btfsc frame_num,5 ;blinking test goto resume_irq ;if off return movlw HOLD_COLOR ;store hold color movwf tmpi+1 ;in tmpi+1 movfp tmpi,PORTB ;and display "hold" sign movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB movfp tmpi+1,PORTB movfp tmpi+1,PORTB movfp tmpi+1,PORTB movfp tmpi+1,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB movfp tmpi,PORTB goto resume_irq ;and return ; Generation of title4 scan_title4 movlb 0 movlw BKGTITLE_COLOR movwf PORTB ;set background color movlw TITLE_COLOR ;store title color movwf tmpi+1 ;in tmpi+1 movlw BKGTITLE_COLOR ;and background color movwf tmpi ;in tmpi movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB ;reset to background color movlb 0 btfsc PORTB,6 ;mode hold ? goto resume_irq ;if not, return btfsc frame_num,5 ;blinking test goto resume_irq ;if off return movlw HOLD_COLOR ;store hold color movwf tmpi+1 ;in tmpi+1 movfp tmpi,PORTB ;and display "hold" sign movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB movfp tmpi,PORTB goto resume_irq ;and return ; Generation of title5 scan_title5 movlb 0 movlw BKGTITLE_COLOR movwf PORTB ;set background color movlw TITLE_COLOR ;store title color movwf tmpi+1 ;in tmpi+1 movlw BKGTITLE_COLOR ;and background color movwf tmpi ;in tmpi movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB ;reset to background color movlb 0 btfsc PORTB,6 ;mode hold ? goto resume_irq ;if not, return btfsc frame_num,5 ;blinking test goto resume_irq ;if off return movlw HOLD_COLOR ;store hold color movwf tmpi+1 ;in tmpi+1 movfp tmpi,PORTB ;and display "hold" sign movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB movfp tmpi,PORTB movfp tmpi,PORTB goto resume_irq ;and return ; Generation of title6 scan_title6 movlb 0 movlw BKGTITLE_COLOR movwf PORTB ;set background color movlw TITLE_COLOR ;store title color movwf tmpi+1 ;in tmpi+1 movlw BKGTITLE_COLOR ;and background color movwf tmpi ;in tmpi movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi,PORTB movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi+1,PORTB ;Pixel on movfp tmpi,PORTB ;reset to background color goto resume_irq ;and return ;---------------------------------------------------------------------------- ; Soft generation of a vertical blanking line with scan_line reset ; ; Warning : all scan_X routines should execute in less than 169 instructions ;---------------------------------------------------------------------------- scan_rstscanl clrf scan_line,F ; reset scanline (will be incremented clrf scan_line+1,F ; to 1 at next interrupt) goto resume_irq ;============================================================================ ; - END OF FILE - ;============================================================================