[Coco] Linville's ramblings on assembly vs machine code
Mathieu Bouchard
matju at artengine.ca
Tue Jul 11 11:04:45 EDT 2017
Not necessarily, but it might depend what self-modifying means. There are ways
to only produce new code at runtime, without modifying any existing code, but
still, the program is no longer the same than at startup, and thus (on a modern
computer) you need to allow a memory segment to have both "write" and "exec"
permissions.
Overall, code is just like data when it comes to rules that must be followed in
multitasking : a piece of data needs to be protected by a mutex if it can
change later, whereas a piece of read-only data created at runtime needs not.
Le 2017-07-11 à 04:51:00, James Jones a écrit :
> In a multitasking environment, self-modifying code will cause random
> failures without additional overhead to allow only one process to run it at
> a time, and of course, code in ROM can't be self-modifying.
______________________________________________________________________
| Mathieu BOUCHARD --- tél: 514.623.3801, 514.383.3801 --- Montréal, QC
More information about the Coco
mailing list