Article View: comp.arch
Article #2551self-modifying code
From: victor yodaiken
Date: Thu, 12 Oct 1989 14:50
Date: Thu, 12 Oct 1989 14:50
17 lines
926 bytes
926 bytes
Forget where I saw this nice example of self-modifying code. It was billed as one ofthe earliest mutual exclusion programs. L: move opcode["branch to L"] to L critical region ... move opcode[" move opcode["branch to L"]] to L The first programto execute the instruction at L changes the instruction so that all others will just busy loop, and then changes it back when it leaves the critical region Of course it only works for uni-processors. victor
Technical Details
Message-ID:
<5546@dime.cs.umass.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!ucsd!ogccse!husc6!m2c!umvlsi!dime!yodaikenShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!ucsd!ogccse!husc6!m2c!umvlsi!dime!yodaiken From: yodaiken@freal.cs.umass.edu (victor yodaiken) Newsgroups: comp.arch Subject: self-modifying code Message-ID: <5546@dime.cs.umass.edu> Date: 12 Oct 89 14:50:34 GMT Sender: news@dime.cs.umass.edu Reply-To: yodaiken@freal.cs.umass.edu (victor yodaiken) Organization: University of Massachusetts, Amherst Lines: 17