Fill in screen state code.
It's not quite working yet. Lines don't wrap.
But at least we're moving the cursor correctly before we start drawing.