This might save a few instructions:
You don't need to divide or to call the modulus function to get your line and column. Just do this:
line = i >> 3; // same as dividing by 8
column = i & 0x7; // extract modulus 8 the easy way
Depending upon how smart the compiler is, this will save allot of time or maybe nothing. You could also create line and column as global variables instead of auto-creating them in the function. This would save a few cycles perhaps.