; compiler : jal 00.04-50 ; date : 13-Feb-2003 13:25:04 ; main source : rgb ; command line : -casz -vtz -orsctd -s\jalcc\jal\lib rgb.jal ; target chip : 16f628 ; cpu : pic 14 ; clock : 20000000 ; input files : 6 ; lines : 2533 ; chars : 72491 ; compilation nodes : 14338 ; stack : 43Kb ; heap : 4803Kb ; seconds : 0.714 (3546 lines/second) ; output code : 586 ; page : 0 (0.0%) ; bank : 0 (0.0%) ; page+bank : 0 (0.0%) ; file : 37 ; stack: 3 (3,0,1) errorlevel -306 list p=PIC16f628 ; note: the f628 config is still fixed! __CONFIG H'3F22' ORG 0000 goto __main ORG 0004 movwf H'7F' swapf H'03',w clrf H'03' movwf H'20' movf H'0A',w movwf H'21' clrf H'0A' movf H'04',w movwf H'22' goto __interrupt ORG 000E __interrupt: ; 000E _12212__vector: ; 000E p_12212_xzxzxzxz: ; 000E ;; 317 : if t0if then btfss H'0B',2 goto if_12218_by if_12218_th: ; 0010 ;; 318 : _pwm_motor_tmr0_interrupt ;priority=5 call _10726__vector if_12218_by: ; 0011 e_12212_xzxzxzxz: ; 0011 movf H'22',w movwf H'04' movf H'21',w movwf H'0A' swapf H'20',w movwf H'03' swapf H'7F',f swapf H'7F',w RETFIE __main: ; 001A ; var H'023:000' transfer_bit ; var H'024:000' transfer_byte ;; 022 : var volatile byte INDF at 0x00 ; var H'000:000' indf ;; 034 : var volatile byte STATUS at 0x03 ; var H'003:000' status ;; 040 : var volatile byte FSR at 0x04 ; var H'004:000' fsr ;; 046 : var volatile byte PORTA at 0x05 ; var H'005:000' porta ;; 055 : var volatile byte INTCON at 0x0B ; var H'00B:000' intcon ;; 073 : var volatile byte TMR2 at 0x11 ; var H'011:000' tmr2 ;; 097 : var volatile byte CMCON at 0x1F ; var H'01F:000' cmcon ;; 147 : var volatile bit pin_a0 at PORTA : 0 ; var H'005:000' pin_a0 ;; 148 : var volatile bit pin_a1 at PORTA : 1 ; var H'005:001' pin_a1 ;; 171 : var volatile bit IRP at STATUS : 7 ; var H'003:007' irp ;; 172 : var volatile bit RP1 at STATUS : 6 ; var H'003:006' rp1 ;; 173 : var volatile bit RP0 at STATUS : 5 ; var H'003:005' rp0 ;; 183 : var volatile bit GIE at INTCON : 7 ; var H'00B:007' gie ;; 185 : var volatile bit T0IE at INTCON : 5 ; var H'00B:005' t0ie ;; 188 : var volatile bit T0IF at INTCON : 2 ; var H'00B:002' t0if ;; 392 : var byte trisa_shadow ; var H'025:000' trisa_shadow ;; 393 : var byte trisb_shadow ; var H'026:000' trisb_shadow ;; 397 : trisa_shadow = all_input movlw H'FF' movwf H'25' ;; 398 : trisb_shadow = all_input movlw H'FF' movwf H'26' ;; 544 : var byte _port_b_buffer ; var H'027:000' _port_b_buffer ;; 788 : INTCON = 0 clrf H'0B' ;; 038 : CMCON = 7 -- set portA to normal digital IO movlw H'07' movwf H'1F' ;; 042 : var bit encoder_flag = off -- Flag that determines change of encoder state ; var H'023:001' encoder_flag bcf H'23',1 ;; 043 : var byte encoder_out = 0 -- Output from the encoder 0 - 255 ; var H'028:000' encoder_out clrf H'28' ;; 045 : var byte timer = 254 -- timers for rotary encoder ; var H'029:000' timer movlw H'FE' movwf H'29' ;; 046 : var byte timer2 = 0 ; var H'02A:000' timer2 clrf H'2A' ;; 048 : var byte red = 0 -- red red LED output, 0 - 255 PWM controlled brightness ; var H'02B:000' red clrf H'2B' ;; 049 : var byte green = 0 -- red green LED output, 0 - 255 PWM controlled brightness ; var H'02C:000' green clrf H'2C' ;; 050 : var byte blue = 0 -- red blue LED output, 0 - 255 PWM controlled brightness ; var H'02D:000' blue clrf H'2D' ;; 051 : var byte color_out = 0 ; var H'02E:000' color_out clrf H'2E' ;; 054 : var byte hue = 42 -- hue: red = 42, green = 127, blue = 212 ; var H'02F:000' hue movlw H'2A' movwf H'2F' ;; 055 : var byte sat = 128 -- saturation 0 = white, 255 = full color saturation ; var H'030:000' sat movlw H'80' movwf H'30' ;; 070 : pin_a0_direction = input -- rotary encoder input pins bsf H'25',0 call _3771__vector ;; 071 : pin_a1_direction = input bsf H'25',1 call _3800__vector ;; 072 : pin_a2_direction = input -- momentary contact switch bsf H'25',2 call _3829__vector ;; 074 : var volatile bit encoder_A is pin_a0 -- rotary encoder input pins ; var H'005:000' encoder_a ;; 075 : var volatile bit encoder_B is pin_a1 ; var H'005:001' encoder_b ;; 078 : pin_b3_direction = output bcf H'26',3 call _4154__vector ;; 015 : var volatile byte _tmr0_preset ; var H'031:000' _tmr0_preset ;; 017 : var volatile byte pwm1_period ; var H'032:000' pwm1_period ;; 018 : var volatile byte pwm1_period_preset ; var H'033:000' pwm1_period_preset ;; 019 : var volatile byte pwm1_active ; var H'034:000' pwm1_active ;; 020 : var volatile byte pwm1_active_preset ; var H'035:000' pwm1_active_preset ;; 022 : var volatile byte pwm2_period ; var H'036:000' pwm2_period ;; 023 : var volatile byte pwm2_period_preset ; var H'037:000' pwm2_period_preset ;; 024 : var volatile byte pwm2_active ; var H'038:000' pwm2_active ;; 025 : var volatile byte pwm2_active_preset ; var H'039:000' pwm2_active_preset ;; 027 : var volatile byte pwm3_period ; var H'03A:000' pwm3_period ;; 028 : var volatile byte pwm3_period_preset ; var H'03B:000' pwm3_period_preset ;; 029 : var volatile byte pwm3_active ; var H'03C:000' pwm3_active ;; 030 : var volatile byte pwm3_active_preset ; var H'03D:000' pwm3_active_preset ;; 203 : pwm_motor_init call _11243__vector ;; 151 : OPTION_REG = ( OPTION_REG & ! ( _b_T0CS )) -- set TMR0 to main oscillator call _5957__vector movf H'40',w andlw H'FFFFFFDF' call _5910__vector ;; 152 : OPTION_REG = ( OPTION_REG | _b_PSA ) -- disable prescaler for TMR0 call _5957__vector movf H'40',w iorlw H'08' call _5910__vector ;; 153 : _tmr0_preset = -5 movlw H'FFFFFFFB' movwf H'31' ;; 156 : pwm1_period_preset = 255 -- set the max value for PWM movlw H'FF' movwf H'33' ;; 157 : pwm1_active_preset = 0 -- set the starting value clrf H'35' ;; 159 : pwm2_period_preset = 255 movlw H'FF' movwf H'37' ;; 160 : pwm2_active_preset = 0 clrf H'39' ;; 162 : pwm3_period_preset = 255 movlw H'FF' movwf H'3B' ;; 163 : pwm3_active_preset = 0 clrf H'3D' ;; 327 : forever loop w_12258_ag: ; 004A ;; 329 : encoder -- check to see if the encoder is being used, perform the necessary adjustments call _12047__vector ;; 330 : sat = encoder_out -- make the hue equal to the encoder movf H'28',w movwf H'30' ;; 346 : pwm1_active_preset = red movf H'2B',w movwf H'35' ;; 347 : pwm2_active_preset = green movf H'2C',w movwf H'39' ;; 348 : pwm3_active_preset = blue movf H'2D',w movwf H'3D' goto w_12258_ag ;; 003 : idle_loop: page goto idle_loop as_12261_idle_loop: ; 0054 goto as_12261_idle_loop _12047__vector: ; 0055 p_12047_encoder: ; 0055 ; var H'03E:000' sq_temp_12079 ;; 282 : if encoder_b then -- if the B bit of the encoder is on then btfss H'05',1 goto if_12053_by if_12053_th: ; 0057 ;; 283 : if encoder_flag == off & encoder_a then -- if bit B was off previous cycle, and Bit A = on btfsc H'23',1 goto if_12056_by e_12061: ; 0059 btfss H'05',0 goto if_12056_by if_12056_th: ; 005B ;; 284 : if timer < 254 then -- check to see if the encoder has been used recently movlw H'FE' subwf H'29',w btfsc H'03',0 goto if_12064_el if_12064_th: ; 005F ;; 285 : encoder_out = encoder_out + (12 - (timer / 25)) -- proportionatly increase speed movf H'29',w movwf H'40' movlw H'19' movwf H'41' call _639__vector movf H'42',w movwf H'3E' movf H'3E',w sublw H'0C' addwf H'28',w movwf H'28' goto if_12064_by if_12064_el: ; 006B ;; 287 : encoder_out = encoder_out + 1 -- if not recently activated, just incremnt by 1 incf H'28',f if_12064_by: ; 006C ;; 289 : timer = 0 -- reset the timer clrf H'29' if_12056_by: ; 006D ;; 291 : encoder_flag = on -- turn the flag on so it knows bit B was just off bsf H'23',1 if_12053_by: ; 006E ; var H'03F:000' sq_temp_12134 ;; 293 : if encoder_b == off then -- same but mostly opposite btfsc H'05',1 goto if_12108_by if_12108_th: ; 0070 ;; 294 : if encoder_flag & encoder_a then btfss H'23',1 goto if_12114_by e_12116: ; 0072 btfss H'05',0 goto if_12114_by if_12114_th: ; 0074 ;; 295 : if timer < 254 then movlw H'FE' subwf H'29',w btfsc H'03',0 goto if_12119_el if_12119_th: ; 0078 ;; 296 : encoder_out = encoder_out - (12 - (timer / 25)) movf H'29',w movwf H'40' movlw H'19' movwf H'41' call _639__vector movf H'42',w movwf H'3F' movf H'3F',w sublw H'0C' subwf H'28',w movwf H'28' goto if_12119_by if_12119_el: ; 0084 ;; 298 : encoder_out = encoder_out - 1 movlw H'01' subwf H'28',w movwf H'28' if_12119_by: ; 0087 ;; 300 : timer = 0 clrf H'29' if_12114_by: ; 0088 ;; 302 : encoder_flag = off bcf H'23',1 if_12108_by: ; 0089 ;; 305 : timer2 = timer2 + 1 incf H'2A',f ;; 306 : if timer2 == 1 then -- this slows down the timer movf H'2A',w sublw H'01' btfss H'03',2 goto if_12171_by if_12171_th: ; 008E ;; 307 : timer = timer + 1 incf H'29',f ;; 308 : timer2 = 0 clrf H'2A' if_12171_by: ; 0090 ;; 310 : if timer == 255 then timer = 254 end if -- if no button press, keep timer high movf H'29',w sublw H'FF' btfss H'03',2 goto if_12193_by if_12193_th: ; 0094 movlw H'FE' movwf H'29' if_12193_by: ; 0096 e_12047_encoder: ; 0096 return _11243__vector: ; 0097 p_11243_pwm_motor_init: ; 0097 ;; 183 : if (pwm_motors & 0b_0000_0001 ) != 0 then pwm1_pin_direction = output end if bcf H'26',0 call _4067__vector ;; 184 : if (pwm_motors & 0b_0000_0010 ) != 0 then pwm2_pin_direction = output end if bcf H'26',1 call _4096__vector ;; 185 : if (pwm_motors & 0b_0000_0100 ) != 0 then pwm3_pin_direction = output end if bcf H'26',2 call _4125__vector ;; 193 : T0IE = true -- enable TMR0 interrupt bsf H'0B',5 ;; 194 : GIE = true -- enable general interrupts bsf H'0B',7 ;; 195 : T0IF = false -- clear TMR0 interrupt flag bcf H'0B',2 e_11243_pwm_motor_init: ; 00A0 return _10726__vector: ; 00A1 p_10726__pwm_motor_tmr0_interrupt: ; 00A1 ;; 069 : TMR2 = _tmr0_preset -- preset counter again movf H'31',w movwf H'11' ;; 075 : pwm1_period = pwm1_period + 1 incf H'32',f ;; 076 : if pwm1_period == pwm1_period_preset then movf H'32',w subwf H'33',w btfss H'03',2 goto if_10756_el if_10756_th: ; 00A8 ;; 077 : pwm1_period = 0 clrf H'32' ;; 078 : pwm1_active = 0 clrf H'34' goto if_10756_by if_10756_el: ; 00AB ;; 080 : if pwm1_active != pwm1_active_preset then pwm1_active = pwm1_active + 1 end if movf H'34',w subwf H'35',w btfsc H'03',2 goto if_10774_by if_10774_th: ; 00AF incf H'34',f if_10774_by: ; 00B0 if_10756_by: ; 00B0 ;; 082 : pwm1_pin_pin = (pwm1_active != pwm1_active_preset) bcf H'27',0 movf H'34',w subwf H'35',w btfsc H'03',2 goto ass_12459_f ass_12459_t: ; 00B5 bsf H'27',0 ass_12459_f: ; 00B6 call _5283__vector ;; 087 : pwm2_period = pwm2_period + 1 incf H'36',f ;; 088 : if pwm2_period == pwm2_period_preset then movf H'36',w subwf H'37',w btfss H'03',2 goto if_10818_el if_10818_th: ; 00BC ;; 089 : pwm2_period = 0 clrf H'36' ;; 090 : pwm2_active = 0 clrf H'38' goto if_10818_by if_10818_el: ; 00BF ;; 092 : if pwm2_active != pwm2_active_preset then pwm2_active = pwm2_active + 1 end if movf H'38',w subwf H'39',w btfsc H'03',2 goto if_10836_by if_10836_th: ; 00C3 incf H'38',f if_10836_by: ; 00C4 if_10818_by: ; 00C4 ;; 094 : pwm2_pin_pin = (pwm2_active != pwm2_active_preset) bcf H'27',1 movf H'38',w subwf H'39',w btfsc H'03',2 goto ass_12465_f ass_12465_t: ; 00C9 bsf H'27',1 ass_12465_f: ; 00CA call _5312__vector ;; 099 : pwm3_period = pwm3_period + 1 incf H'3A',f ;; 100 : if pwm3_period == pwm3_period_preset then movf H'3A',w subwf H'3B',w btfss H'03',2 goto if_10880_el if_10880_th: ; 00D0 ;; 101 : pwm3_period = 0 clrf H'3A' ;; 102 : pwm3_active = 0 clrf H'3C' goto if_10880_by if_10880_el: ; 00D3 ;; 104 : if pwm3_active != pwm3_active_preset then pwm3_active = pwm3_active + 1 end if movf H'3C',w subwf H'3D',w btfsc H'03',2 goto if_10898_by if_10898_th: ; 00D7 incf H'3C',f if_10898_by: ; 00D8 if_10880_by: ; 00D8 ;; 106 : pwm3_pin_pin = (pwm3_active != pwm3_active_preset) bcf H'27',2 movf H'3C',w subwf H'3D',w btfsc H'03',2 goto ass_12471_f ass_12471_t: ; 00DD bsf H'27',2 ass_12471_f: ; 00DE call _5341__vector ;; 170 : T0IF = false -- clear TMR0 interrupt flag bcf H'0B',2 e_10726__pwm_motor_tmr0_interrupt: ; 00E0 return _5957__vector: ; 00E1 p_5957_get: ; 00E1 ;; 672 : function OPTION_REG'get return byte is ; var H'040:000' return value ;; 673 : var byte x ; var H'041:000' x ;; 674 : _file_get( high_OPTION_REG, low_OPTION_REG, x ) clrf H'42' movlw H'81' movwf H'43' call _5518__vector movf H'44',w movwf H'41' ;; 675 : return x movf H'41',w movwf H'40' e_5957_get: ; 00E9 return ;; 669 : procedure OPTION_REG'put( byte in x ) is p_5910__option_reg__put_t: ; 00EA _5910__vector: ; 00EA ; var H'03E:000' x p_5910_put: ; 00EA movwf H'3E' ;; 670 : _file_put( high_OPTION_REG, low_OPTION_REG, x ) clrf H'3F' movlw H'81' movwf H'40' movf H'3E',w goto _5574__vector e_5910_put: ; 00F0 _5574__vector: ; 00F0 ;; 059 : procedure _file_put( byte in Haddr , byte in Laddr , byte in data ) is begin ; var H'03F:000' haddr ; var H'040:000' laddr ; var H'041:000' data p_5574__file_put: ; 00F0 movwf H'41' ;; 060 : var volatile bit local_irp ; var H'023:002' local_irp ;; 061 : var volatile bit HAddr0 at Haddr : 0 ; var H'03F:000' haddr0 ;; 062 : local_irp = IRP btfss H'03',7 goto ass_5607_f ass_5607_t: ; 00F3 bsf H'23',2 goto ass_5607_b ass_5607_f: ; 00F5 bcf H'23',2 ass_5607_b: ; 00F6 ;; 063 : IRP = HAddr0 btfss H'3F',0 goto ass_5611_f ass_5611_t: ; 00F8 bsf H'03',7 goto ass_5611_b ass_5611_f: ; 00FA bcf H'03',7 ass_5611_b: ; 00FB ;; 064 : fsr = Laddr movf H'40',w movwf H'04' ;; 065 : INDF = data movf H'41',w movwf H'00' ;; 066 : IRP = local_irp btfss H'23',2 goto ass_5623_f ass_5623_t: ; 0101 bsf H'03',7 goto ass_5623_b ass_5623_f: ; 0103 bcf H'03',7 ass_5623_b: ; 0104 e_5574__file_put: ; 0104 return _5518__vector: ; 0105 ;; 049 : procedure _file_get( byte in Haddr , byte in Laddr , byte out data ) is begin ; var H'042:000' haddr ; var H'043:000' laddr ; var H'044:000' data p_5518__file_get: ; 0105 movwf H'44' ;; 050 : var volatile bit local_irp ; var H'023:002' local_irp ;; 051 : var volatile bit HAddr0 at Haddr : 0 ; var H'042:000' haddr0 ;; 052 : local_irp = IRP btfss H'03',7 goto ass_5551_f ass_5551_t: ; 0108 bsf H'23',2 goto ass_5551_b ass_5551_f: ; 010A bcf H'23',2 ass_5551_b: ; 010B ;; 053 : IRP = HAddr0 btfss H'42',0 goto ass_5555_f ass_5555_t: ; 010D bsf H'03',7 goto ass_5555_b ass_5555_f: ; 010F bcf H'03',7 ass_5555_b: ; 0110 ;; 054 : fsr = Laddr movf H'43',w movwf H'04' ;; 055 : data = INDF movf H'00',w movwf H'44' ;; 056 : IRP = local_irp btfss H'23',2 goto ass_5567_f ass_5567_t: ; 0116 bsf H'03',7 goto ass_5567_b ass_5567_f: ; 0118 bcf H'03',7 ass_5567_b: ; 0119 e_5518__file_get: ; 0119 return ;; 636 : procedure pin_b2'put( bit in x at _port_b_buffer : 2 ) is p_5341__pin_b2__put_t: ; 011A _5341__vector: ; 011A ; var H'027:002' x p_5341_put: ; 011A ;; 637 : _port_b_flush goto _4668__vector e_5341_put: ; 011B ;; 632 : procedure pin_b1'put( bit in x at _port_b_buffer : 1 ) is p_5312__pin_b1__put_t: ; 011B _5312__vector: ; 011B ; var H'027:001' x p_5312_put: ; 011B ;; 633 : _port_b_flush goto _4668__vector e_5312_put: ; 011C ;; 628 : procedure pin_b0'put( bit in x at _port_b_buffer : 0 ) is p_5283__pin_b0__put_t: ; 011C _5283__vector: ; 011C ; var H'027:000' x p_5283_put: ; 011C ;; 629 : _port_b_flush goto _4668__vector e_5283_put: ; 011D _4668__vector: ; 011D p_4668__port_b_flush: ; 011D ;; 551 : var volatile byte port_b at 0x06 = _port_b_buffer ; var H'006:000' port_b movf H'27',w movwf H'06' e_4668__port_b_flush: ; 011F return ;; 486 : procedure pin_b3_direction'put( bit in d at trisb_shadow : 3 ) is p_4154__pin_b3_direction__put_t: ; 0120 _4154__vector: ; 0120 ; var H'026:003' d p_4154_put: ; 0120 ;; 487 : _trisb_flush goto _3604__vector e_4154_put: ; 0121 ;; 482 : procedure pin_b2_direction'put( bit in d at trisb_shadow : 2 ) is p_4125__pin_b2_direction__put_t: ; 0121 _4125__vector: ; 0121 ; var H'026:002' d p_4125_put: ; 0121 ;; 483 : _trisb_flush goto _3604__vector e_4125_put: ; 0122 ;; 478 : procedure pin_b1_direction'put( bit in d at trisb_shadow : 1 ) is p_4096__pin_b1_direction__put_t: ; 0122 _4096__vector: ; 0122 ; var H'026:001' d p_4096_put: ; 0122 ;; 479 : _trisb_flush goto _3604__vector e_4096_put: ; 0123 ;; 474 : procedure pin_b0_direction'put( bit in d at trisb_shadow : 0 ) is p_4067__pin_b0_direction__put_t: ; 0123 _4067__vector: ; 0123 ; var H'026:000' d p_4067_put: ; 0123 ;; 475 : _trisb_flush goto _3604__vector e_4067_put: ; 0124 ;; 441 : procedure pin_a2_direction'put( bit in d at trisa_shadow : 2 ) is p_3829__pin_a2_direction__put_t: ; 0124 _3829__vector: ; 0124 ; var H'025:002' d p_3829_put: ; 0124 ;; 442 : _trisa_flush goto _3573__vector e_3829_put: ; 0125 ;; 437 : procedure pin_a1_direction'put( bit in d at trisa_shadow : 1 ) is p_3800__pin_a1_direction__put_t: ; 0125 _3800__vector: ; 0125 ; var H'025:001' d p_3800_put: ; 0125 ;; 438 : _trisa_flush goto _3573__vector e_3800_put: ; 0126 ;; 433 : procedure pin_a0_direction'put( bit in d at trisa_shadow : 0 ) is p_3771__pin_a0_direction__put_t: ; 0126 _3771__vector: ; 0126 ; var H'025:000' d p_3771_put: ; 0126 ;; 434 : _trisa_flush goto _3573__vector e_3771_put: ; 0127 _3604__vector: ; 0127 p_3604__trisb_flush: ; 0127 ;; 408 : asm movfw trisb_shadow movf H'26',w ;; 409 : bank_1 call _3478__vector ;; 410 : asm movwf 0x6 movwf H'06' ;; 411 : bank_0 goto _3459__vector e_3604__trisb_flush: ; 012B _3573__vector: ; 012B p_3573__trisa_flush: ; 012B ;; 401 : asm movfw trisa_shadow movf H'25',w ;; 402 : bank_1 call _3478__vector ;; 403 : asm movwf 0x5 movwf H'05' ;; 404 : bank_0 goto _3459__vector e_3573__trisa_flush: ; 012F _3478__vector: ; 012F p_3478_bank_1: ; 012F ;; 368 : asm bsf STATUS, RP0 bsf H'03',5 ;; 369 : asm bcf STATUS, RP1 bcf H'03',6 e_3478_bank_1: ; 0131 return _3459__vector: ; 0132 p_3459_bank_0: ; 0132 ;; 363 : asm bcf STATUS, RP0 bcf H'03',5 ;; 364 : asm bcf STATUS, RP1 bcf H'03',6 e_3459_bank_0: ; 0134 return _639__vector: ; 0135 ;; 067 : operator / ( byte in a, byte in b ) return byte is ; var H'040:000' a ; var H'041:000' b p_639_divide: ; 0135 ; var H'042:000' return value ;; 068 : var byte d = 0 ; var H'043:000' d clrf H'43' ;; 069 : if b != 0 then movf H'41',f btfsc H'03',2 goto if_663_by if_663_th: ; 0139 ;; 070 : while a >= b loop w_688_ag: ; 0139 movf H'41',w subwf H'40',w btfsc H'03',0 goto w_688_bo w_688_jb: ; 013D goto w_688_be w_688_bo: ; 013E ;; 071 : a = a - b movf H'41',w subwf H'40',w movwf H'40' ;; 072 : d = d + 1 incf H'43',f goto w_688_ag w_688_be: ; 0143 if_663_by: ; 0143 ;; 075 : return d movf H'43',w movwf H'42' e_639_divide: ; 0145 return END ; ********** variable mapping ; 00:0 : ; ; indf * 0022:19 \jalcc\jal\lib\16F628_inc.jal ; 03:0 : ; ; status * 0034:19 \jalcc\jal\lib\16F628_inc.jal ; 03:5 : ; ; rp0 * 0173:19 \jalcc\jal\lib\16F628_inc.jal ; 03:6 : ; ; rp1 * 0172:19 \jalcc\jal\lib\16F628_inc.jal ; 03:7 : ; ; irp * 0171:19 \jalcc\jal\lib\16F628_inc.jal ; 04:0 : ; ; fsr * 0040:19 \jalcc\jal\lib\16F628_inc.jal ; 05:0 : ; ; encoder_a * 0074:18 rgb.jal ; pin_a0 * 0147:19 \jalcc\jal\lib\16F628_inc.jal ; porta * 0046:19 \jalcc\jal\lib\16F628_inc.jal ; 05:1 : ; ; encoder_b * 0075:18 rgb.jal ; pin_a1 * 0148:19 \jalcc\jal\lib\16F628_inc.jal ; 06:0 : ; ; port_b * 0551:21 \jalcc\jal\lib\16F628_inc.jal ; 0B:0 : ; ; intcon * 0055:19 \jalcc\jal\lib\16F628_inc.jal ; 0B:2 : ; ; t0if * 0188:19 \jalcc\jal\lib\16F628_inc.jal ; 0B:5 : ; ; t0ie * 0185:19 \jalcc\jal\lib\16F628_inc.jal ; 0B:7 : ; ; gie * 0183:19 \jalcc\jal\lib\16F628_inc.jal ; 11:0 : ; ; tmr2 * 0073:19 \jalcc\jal\lib\16F628_inc.jal ; 1F:0 : ; ; cmcon * 0097:19 \jalcc\jal\lib\16F628_inc.jal ; 23:0 : ; ; transfer_bit ; 23:1 : ; ; encoder_flag 0042:09 rgb.jal ; 23:2 : ; ; local_irp 0050:18 \jalcc\jal\lib\indf_bits.jal ; local_irp 0060:18 \jalcc\jal\lib\indf_bits.jal ; 24:0 : ; ; transfer_byte ; 25:0 : ; ; d * 0433:33 \jalcc\jal\lib\16F628_inc.jal ; trisa_shadow 0392:10 \jalcc\jal\lib\16F628_inc.jal ; 25:1 : ; ; d * 0437:33 \jalcc\jal\lib\16F628_inc.jal ; 25:2 : ; ; d * 0441:33 \jalcc\jal\lib\16F628_inc.jal ; 26:0 : ; ; d * 0474:33 \jalcc\jal\lib\16F628_inc.jal ; trisb_shadow 0393:10 \jalcc\jal\lib\16F628_inc.jal ; 26:1 : ; ; d * 0478:33 \jalcc\jal\lib\16F628_inc.jal ; 26:2 : ; ; d * 0482:33 \jalcc\jal\lib\16F628_inc.jal ; 26:3 : ; ; d * 0486:33 \jalcc\jal\lib\16F628_inc.jal ; 27:0 : ; ; x * 0628:23 \jalcc\jal\lib\16F628_inc.jal ; _port_b_buffer 0544:10 \jalcc\jal\lib\16F628_inc.jal ; 27:1 : ; ; x * 0632:23 \jalcc\jal\lib\16F628_inc.jal ; 27:2 : ; ; x * 0636:23 \jalcc\jal\lib\16F628_inc.jal ; 28:0 : ; ; encoder_out 0043:10 rgb.jal ; 29:0 : ; ; timer 0045:10 rgb.jal ; 2A:0 : ; ; timer2 0046:10 rgb.jal ; 2B:0 : ; ; red 0048:10 rgb.jal ; 2C:0 : ; ; green 0049:10 rgb.jal ; 2D:0 : ; ; blue 0050:10 rgb.jal ; 2E:0 : ; ; color_out 0051:10 rgb.jal ; 2F:0 : ; ; hue 0054:10 rgb.jal ; 30:0 : ; ; sat 0055:10 rgb.jal ; 31:0 : ; ; _tmr0_preset 0015:19 \jalcc\jal\lib\pwm_motor.jal ; 32:0 : ; ; pwm1_period 0017:19 \jalcc\jal\lib\pwm_motor.jal ; 33:0 : ; ; pwm1_period_preset 0018:19 \jalcc\jal\lib\pwm_motor.jal ; 34:0 : ; ; pwm1_active 0019:19 \jalcc\jal\lib\pwm_motor.jal ; 35:0 : ; ; pwm1_active_preset 0020:19 \jalcc\jal\lib\pwm_motor.jal ; 36:0 : ; ; pwm2_period 0022:19 \jalcc\jal\lib\pwm_motor.jal ; 37:0 : ; ; pwm2_period_preset 0023:19 \jalcc\jal\lib\pwm_motor.jal ; 38:0 : ; ; pwm2_active 0024:19 \jalcc\jal\lib\pwm_motor.jal ; 39:0 : ; ; pwm2_active_preset 0025:19 \jalcc\jal\lib\pwm_motor.jal ; 3A:0 : ; ; pwm3_period 0027:19 \jalcc\jal\lib\pwm_motor.jal ; 3B:0 : ; ; pwm3_period_preset 0028:19 \jalcc\jal\lib\pwm_motor.jal ; 3C:0 : ; ; pwm3_active 0029:19 \jalcc\jal\lib\pwm_motor.jal ; 3D:0 : ; ; pwm3_active_preset 0030:19 \jalcc\jal\lib\pwm_motor.jal ; 3E:0 : ; ; x 0669:27 \jalcc\jal\lib\16F628_inc.jal ; sq_temp_12079 ; 3F:0 : ; ; haddr0 * 0061:18 \jalcc\jal\lib\indf_bits.jal ; haddr 0059:22 \jalcc\jal\lib\indf_bits.jal ; sq_temp_12134 ; 40:0 : ; ; a 0067:14 jal rtl ; laddr 0059:38 \jalcc\jal\lib\indf_bits.jal ; return value 0672:10 \jalcc\jal\lib\16F628_inc.jal ; 41:0 : ; ; b 0067:25 jal rtl ; data 0059:54 \jalcc\jal\lib\indf_bits.jal ; x 0673:10 \jalcc\jal\lib\16F628_inc.jal ; 42:0 : ; ; return value 0067:10 jal rtl ; haddr0 * 0051:18 \jalcc\jal\lib\indf_bits.jal ; haddr 0049:22 \jalcc\jal\lib\indf_bits.jal ; 43:0 : ; ; d 0068:13 jal rtl ; laddr 0049:38 \jalcc\jal\lib\indf_bits.jal ; 44:0 : ; ; data 0049:54 \jalcc\jal\lib\indf_bits.jal