Optimized 6502 screen test code