Fixed terminal code

The sample program now works: characters typed in the terminal (at any
speed as far as I can tell) are echoed back by the 6502.