The problem is 'classic' C doesn't allow for loops of the form
for (int i = 0;
but C++ does.
Try putting:
uint8_t r;
for (r = tvtext_viewport_top; r <= tvtext_viewport_bottom; ++r, p += TVTEXT_BUFFER_WIDTH)
Depents "p += TVTEXT_BUFFER_WIDTH" which the "++r"?
How often is "p += TVTEXT_BUFFER_WIDTH" called. Each run/loop?
Which mode accepts 4 arguments in a loop declaration?
Don't understand 1)
2) the "p+=" is called at the end of every pass through the loop, just before the loop condition is tested..
2) There is nothing wrong with four "arguments".