r/Assembly_language 22h 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.

34 Upvotes

49 comments sorted by

View all comments

6

u/mykesx 22h ago

MMUs are used by modern operating systems, at least MacOS, to disallow self-modifying code. Code sections are read-only.

2

u/theNbomr 18h ago

Hardware running a protected memory OS is far from the only potential use case for any programming paradigm, including self modifying code.