Thread View: rec.games.corewar
1 messages
1 total messages
Started by Scott W. Adkins
Tue, 29 Dec 1992 14:52
Something more about PCT instrution...
Author: Scott W. Adkins
Date: Tue, 29 Dec 1992 14:52
Date: Tue, 29 Dec 1992 14:52
32 lines
1798 bytes
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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads