It’s the other way round. Code is being written to fit how a specific machine works. This is what makes Assembly so hard.
Also there is by design no understanding required, a machine doesn’t “get” what you are trying to do it just does what is there.
If you want a machine to understand what specific code does and modify that for another machine that is extremely hard because the machine would need to understand the semantics of the operation. It would need to “get” what you were doing which isn’t happening.
It’s the other way round. Code is being written to fit how a specific machine works. This is what makes Assembly so hard.
Also there is by design no understanding required, a machine doesn’t “get” what you are trying to do it just does what is there.
If you want a machine to understand what specific code does and modify that for another machine that is extremely hard because the machine would need to understand the semantics of the operation. It would need to “get” what you were doing which isn’t happening.