To state the implicit/obvious, the CPU is a 6502 from the assembler mnemonics and specifically a 6510 in a C64 from reference to the 1541 external floppy drive.
> Note that as far as the slope math goes, Bresenham is special since it doesn't require the division of x by y, but BRR lines do. So for short line segments, Bresenham can still "win". In fact, BRR lines also need a bit more elaborate math for the remainder. (So this method really shines if you're able to pull in the 1541 for help. See my upcoming post about drivecode)
The BRR algorithm is 5 cycles per position vs 8-10 cycles for Bresenham, which is impressive. Its step position inner loop calculation is only
cpx #imm ;compare x-register to constant
adc zp ;add with carry the value in (0-page) address to accumulator (a-register)
> Note that as far as the slope math goes, Bresenham is special since it doesn't require the division of x by y, but BRR lines do. So for short line segments, Bresenham can still "win". In fact, BRR lines also need a bit more elaborate math for the remainder. (So this method really shines if you're able to pull in the 1541 for help. See my upcoming post about drivecode)
The BRR algorithm is 5 cycles per position vs 8-10 cycles for Bresenham, which is impressive. Its step position inner loop calculation is only