Hacker News new | ask | show | jobs
by ekianjo 4085 days ago
Sure, but wouldn't that incur a loss of performance ?
2 comments

On a modern pipelined CPU with separate instruction/data caches self-modifying code does have a rather large penalty since it has to flush the pipeline and the caches, but on the original 8088 PC which has no cache and no pipeline (there's only a 4-byte prefetch queue), the penalty is much smaller.
Some, but maybe not very much: The screen is redrawn much more frequently than a key is pressed.
You might get noticeable latency though.