Hi,
You need precise timing for video generator to one instruction takt - it is very difficult to achive in C - not only for some subroutine but for main() and all subroutines code. Even if you will achive precise timing, any further changing will break your time intervals. It is much ease to learn Assembler, than to make this real-time program on C.
Look at video generator description on :
**broken link removed**
You will find a lot of useful hardware and software info. The Asm code is very comprehensible there.
Wish You Good Luck! klug.