Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@JonnyCodewalker it's already done, mostly to secure your software from disassembling
-
Worldyn1737y@mantekillah your code is compiled/interpreted and assembeled into Numbers which is stored in memory as data
-
Worldyn1737y@JonnyCodewalker your program which is just data which is stored in certain memory locations can be read and put into other memory locations so it should be possible :) maybe better with assembly or just machine code instructions than c though ;)
-
Pizza35367y@Worldyn you assume a von Neumann architecture.
In a Harvard architecture code is *not* data :)
(for example, Arduino uses a Harvard architecture) -
Pizza35367y@Worldyn you have two different memories, one for data and one for programs. So you gain parallelism at the "bus level", and dedicated caches
-
@JonnyCodewalker you'd have to disable memory protection, but it's something old microcomputer programs used to do (though it was usually in assembly). The official name is Self Modifying Code or SMC. Most modern OSs disable it since it is such an antipattern, and used by malware
"code is data"
undefined