SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Technology Stocks : Intel Corporation (INTC)
INTC 36.82+1.5%Dec 19 9:30 AM EST

 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext  
To: StockMan who wrote (40143)11/12/1997 1:42:00 PM
From: Fridrik Skulason  Read Replies (1) of 186894
 
>Really, How do you think it is done in Unix/NT.

I do not "think" how it is done...I *know* how it is done.

Many OSes provide separate code segments (executable, not writable) and data segments (writable, not executable). If that is all you have, you cannot create self-modifying code. However, in real life (depending on the OS), you can usually do either of the following:

1) change the property of a code segment, making it a data segment, modify as needed and change it back to a code segment.

2) create a mixed segment, which is writable and executable, copy code there, modify it and execute.

Failing this, a program may be able to modify its own disk image.

Finally, any OS that includes a "DOS box" where you can run (not just emulate) DOS applications has to allow the existence of self-modifying executables.
Report TOU ViolationShare This Post
 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext