&gt; Then I discovered that if you put performance-critical code into lower-memory addresses it runs much faster.<p>Do you mean higher memory addresses?<p>Code in the lower 16KB of RAM (addresses 16-32KB) has contended memory access with the ULA, which causes the CPU to pause while the TV raster line is drawn.<p>Code in the upper 32K does not have this issue.