🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: rec.games.corewar
Article #268

Something more about PCT instrution...

#268
From: Scott W. Adkins
Date: Tue, 29 Dec 1992 14:52
32 lines
1798 bytes
Hmmm... think about this as well...

	dat #5, #5
	dat #0, #0
start	pct 0
	mov -3, <-1
	mov -4, <-2
	end start

Ok, the instruction if "start" is first protected, and will last for one
modification attempt.  Then the "mov -3, <-1" is executed.  Since there is
a predecrement in the B-Field and it is on a protected field, it will fail
and the protection is removed from the address "start".  This means that
the effective address of "<-1" turns out to be 0 instead of -1, had the
predecrement been successful.  Well, now the mov instructions is evaluated.
"mov -3, -1 (essentially)" (would have been "mov -3, -2 if predec was good)
then grabs the "dat #5, #5" and overwrites the "pct 0" instruction.  

So, what I am saying is this... you can first unprotect an instruction with
a predecrement or postincrement (yes, I have them too) and then overwrite
them with the same instruction.  Is this good?

(If you haven't notice, I do advocate the PCT instruction.  Give me a good
reason why not to have it... "Too powerful" is not a good execuse judging 
from the above example!)

Scott
-- 
         Scott W. Adkins           Internet: sadkins@ohiou.edu
         ~~~~~~~~~~~~~~~                     ak323@cleveland.freenet.edu
    Ohio University of Athens        Bitnet: adkins@ouaccvma.bitnet
Technical Details
Message-ID: <1992Dec29.145229.14504@oucsace.cs.ohiou.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbnewsm!cbnewsl!att-out!oucsboss!oucsace!sadkins

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbnewsm!cbnewsl!att-out!oucsboss!oucsace!sadkins
From: sadkins@bigbird.cs.ohiou.edu (Scott W. Adkins)
Newsgroups: rec.games.corewar
Subject: Something more about PCT instrution...
Message-ID: <1992Dec29.145229.14504@oucsace.cs.ohiou.edu>
Date: 29 Dec 92 14:52:29 GMT
Sender: usenet@oucsace.cs.ohiou.edu (Network News Poster)
Organization: Ohio University CS Dept., Athens
Lines: 32