comparison src/options.asm @ 562:8b7ea27ea1fa

seperate desat and sat multipliers for GF and Non-GF modes. Set to 100/100 as default in GF mode
author heinrichsweikamp
date Sat, 03 Feb 2018 15:17:01 +0100
parents b7eb98dbd800
children b455b31ce022
comparison
equal deleted inserted replaced
561:9c54849b8d3b 562:8b7ea27ea1fa
82 movlw LOW(option_table_begin) 82 movlw LOW(option_table_begin)
83 movwf FSR0L 83 movwf FSR0L
84 movlw HIGH(option_table_begin) 84 movlw HIGH(option_table_begin)
85 movwf FSR0H 85 movwf FSR0H
86 option_reset_all_1: 86 option_reset_all_1:
87 movf FSR0L,W ; Reached end of table ? 87 movlw LOW(option_table_end)
88 xorlw LOW(option_table_end) ; (8bit test -> 10 bytes x 128 options max) 88 cpfseq FSR0L
89 btfsc STATUS,Z ; YES: done. 89 bra option_reset_all_2 ; Not yet done...
90 return 90 movlw HIGH(option_table_end)
91 91 cpfseq FSR0H
92 bra option_reset_all_2 ; Not yet done...
93 return ; All done.
94 option_reset_all_2:
92 rcall option_reset ; Reset one option. 95 rcall option_reset ; Reset one option.
93 bra option_reset_all_1 ; and loop. 96 bra option_reset_all_1 ; and loop.
94 97
95 ;============================================================================= 98 ;=============================================================================
96 ; Check all option and reset option if out of min/max boundary 99 ; Check all option and reset option if out of min/max boundary
104 movwf FSR0L 107 movwf FSR0L
105 movlw HIGH(option_table_begin) 108 movlw HIGH(option_table_begin)
106 movwf FSR0H 109 movwf FSR0H
107 110
108 option_check_all_1: 111 option_check_all_1:
109 movf FSR0L,W ; Reached end of table ? 112 movlw LOW(option_table_end)
110 xorlw LOW(option_table_end) ; (8bit test -> 10 bytes x 128 options max) 113 cpfseq FSR0L
111 btfsc STATUS,Z ; YES: done. 114 bra option_check_all_2 ; Not yet done...
112 return 115 movlw HIGH(option_table_end)
113 116 cpfseq FSR0H
117 bra option_check_all_2 ; Not yet done...
118 return ; All done.
119 option_check_all_2:
114 rcall option_check ; check one option. 120 rcall option_check ; check one option.
115 bra option_check_all_1 ; and loop 121 bra option_check_all_1 ; and loop
116 122
117 ;============================================================================= 123 ;=============================================================================
118 ; Read option handle 124 ; Read option handle
252 movwf FSR0L 258 movwf FSR0L
253 movlw HIGH(option_table_begin) 259 movlw HIGH(option_table_begin)
254 movwf FSR0H 260 movwf FSR0H
255 261
256 option_save_all_1: 262 option_save_all_1:
257 movf FSR0L,W ; Reached end of table ? 263 movlw LOW(option_table_end)
258 xorlw LOW(option_table_end) ; (8bit test -> 10 bytes x 128 options max) 264 cpfseq FSR0L
259 btfsc STATUS,Z ; YES: done. 265 bra option_save_all_2 ; Not yet done...
260 return 266 movlw HIGH(option_table_end)
261 267 cpfseq FSR0H
268 bra option_save_all_2 ; Not yet done...
269 return ; All done.
270 option_save_all_2:
262 rcall option_save ; Save one option. 271 rcall option_save ; Save one option.
263 bra option_save_all_1 ; and loop. 272 bra option_save_all_1 ; and loop.
264 273
265 global option_save 274 global option_save
266 option_save: 275 option_save:
326 movwf FSR0L 335 movwf FSR0L
327 movlw HIGH(option_table_begin) 336 movlw HIGH(option_table_begin)
328 movwf FSR0H 337 movwf FSR0H
329 338
330 option_restore_all_1: 339 option_restore_all_1:
331 movf FSR0L,W ; Reached end of table ? 340 movlw LOW(option_table_end)
332 xorlw LOW(option_table_end) ; (8bit test -> 10 bytes x 128 options max) 341 cpfseq FSR0L
333 btfsc STATUS,Z ; YES: done. 342 bra option_restore_all_2 ; Not yet done...
334 return 343 movlw HIGH(option_table_end)
335 344 cpfseq FSR0H
345 bra option_restore_all_2 ; Not yet done...
346 return ; All done.
347 option_restore_all_2:
336 rcall option_restore ; Restore one option. 348 rcall option_restore ; Restore one option.
337 bra option_restore_all_1 ; and loop. 349 bra option_restore_all_1 ; and loop.
338 return
339 350
340 option_restore: 351 option_restore:
341 rcall option_read 352 rcall option_read
342 incf opt_eeprom,W ; Should we save it ? 353 incf opt_eeprom,W ; Should we save it ?
343 btfsc STATUS,Z ; eeprom address is FFh ? 354 btfsc STATUS,Z ; eeprom address is FFh ?