home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / rec / games / corewar / 1545 < prev    next >
Encoding:
Internet Message Format  |  1992-12-29  |  1.7 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbnewsm!cbnewsl!att-out!oucsboss!oucsace!sadkins
  2. From: sadkins@bigbird.cs.ohiou.edu (Scott W. Adkins)
  3. Newsgroups: rec.games.corewar
  4. Subject: Something more about PCT instrution...
  5. Message-ID: <1992Dec29.145229.14504@oucsace.cs.ohiou.edu>
  6. Date: 29 Dec 92 14:52:29 GMT
  7. Sender: usenet@oucsace.cs.ohiou.edu (Network News Poster)
  8. Organization: Ohio University CS Dept., Athens
  9. Lines: 32
  10.  
  11.  
  12. Hmmm... think about this as well...
  13.  
  14.     dat #5, #5
  15.     dat #0, #0
  16. start    pct 0
  17.     mov -3, <-1
  18.     mov -4, <-2
  19.     end start
  20.  
  21. Ok, the instruction if "start" is first protected, and will last for one
  22. modification attempt.  Then the "mov -3, <-1" is executed.  Since there is
  23. a predecrement in the B-Field and it is on a protected field, it will fail
  24. and the protection is removed from the address "start".  This means that
  25. the effective address of "<-1" turns out to be 0 instead of -1, had the
  26. predecrement been successful.  Well, now the mov instructions is evaluated.
  27. "mov -3, -1 (essentially)" (would have been "mov -3, -2 if predec was good)
  28. then grabs the "dat #5, #5" and overwrites the "pct 0" instruction.  
  29.  
  30. So, what I am saying is this... you can first unprotect an instruction with
  31. a predecrement or postincrement (yes, I have them too) and then overwrite
  32. them with the same instruction.  Is this good?
  33.  
  34. (If you haven't notice, I do advocate the PCT instruction.  Give me a good
  35. reason why not to have it... "Too powerful" is not a good execuse judging 
  36. from the above example!)
  37.  
  38. Scott
  39. -- 
  40.          Scott W. Adkins           Internet: sadkins@ohiou.edu
  41.          ~~~~~~~~~~~~~~~                     ak323@cleveland.freenet.edu
  42.     Ohio University of Athens        Bitnet: adkins@ouaccvma.bitnet
  43.