Avoid using general division and modulo ops in framebuffer
These can be very expensive and slow on CPUs without a hardware divider, and sometimes even on those that have it.