3
Worldyn
235d

"code is data"

Comments
  • 1
    Well...yea i guess it is. Just 0s and 1s in the ram....makes me wonder if you could write a modularized C programm that finds out the pointers to its own code to rewrite it....
  • 3
    @JonnyCodewalker interesting thought πŸ˜‰
  • 0
    @coolq I mean C code is compiled, so it isn't that easy....but I mean theoretically...
  • 2
    @JonnyCodewalker well you can already program in the raw opcodes :'D
  • 0
    @JonnyCodewalker it's already done, mostly to secure your software from disassembling
  • 0
    When I can write an Android app with SQL, maybe...
  • 1
    Technically, EVERYTHING is data.
  • 0
    @Emphiliis interesting...what would i have to google to read about that? Or do you even have any links?
  • 0
    @mantekillah your code is compiled/interpreted and assembeled into Numbers which is stored in memory as data
  • 0
    @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 ;)
  • 0
    @Worldyn hence EVERYTHING is data, once again 🍺🍺
  • 0
    @Worldyn you assume a von Neumann architecture.

    In a Harvard architecture code is *not* data :)
    (for example, Arduino uses a Harvard architecture)
  • 0
    Lisp fucks me up...
  • 0
    @loopback I hate people who have a lisp.
  • 0
    @Pizza how is the instructions stored in memory then?
  • 1
    @Worldyn you have two different memories, one for data and one for programs. So you gain parallelism at the "bus level", and dedicated caches
  • 0
    @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
Add Comment