Mike - K8LH
Well-Known Member
I've read through the BoostC User Manual and searched the SourceBoost Forum but can't find an answer to the question(s);
Is there a BoostC instruction that will duplicate this pair of assembly instructions (for 12F683)? Or is it possible to define a constant that's equal to the 8 bit address of the led[] array?
I'd like to replace the two assembly instructions in the ISR code below with a single C instruction that does the same thing (and also only uses two assembly instructions);
Thanks in advance. Mike
Is there a BoostC instruction that will duplicate this pair of assembly instructions (for 12F683)? Or is it possible to define a constant that's equal to the 8 bit address of the led[] array?
Code:
;
movlw _led ; address of led[] array
movwf _ledndx ; save address in ledptr variable
;
Code:
if(column == 6) // if all 5 columns updated
{
column = 0; // reset column number
asm
{
movlw _led
movwf _ledndx
}
}
fsr = ledndx; // indirect access to led array
dc0 = indf; // row 0 (gp0) pwm value, 0..31
fsr++; //
dc1 = indf; // row 1 (gp1) pwm value, 0..31
fsr++; //
dc2 = indf; // row 2 (gp2) pwm value, 0..31
fsr++; //
dc3 = indf; // row 3 (gp4) pwm value, 0..31
ledndx = fsr + 1; // save array index