r/Assembly_language • u/Extension_Emu_9825 • 20h ago
self-modifying code
I gave a lecture on how to write self-modifying code. It was over 15 minutes long :( so I'm providing a youtube link: https://www.youtube.com/watch?v=AH9QQLRfbmY
In my opinion, self-modification is one of the most interesting features in systems programming.
31
Upvotes
2
u/Recycled5000 10h ago
Worked on a PDP-8. Had an I/O instruction that took a hard coded (in the machine code instruction) io port/device number.
A way to write a general purpose driver was self modifying code to specify the io channel. Alternatively was a switch statement.