home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / WIN_GAME / WINCORE1.ZIP / RAIDAR.WAR < prev    next >
Text File  |  1994-03-25  |  1KB  |  40 lines

  1. ; This is RAIDAR, a program suggested by A.K. Dewdney's original Scientific
  2. ; American article about Core War.  A slower and more clumsy version of this
  3. ; program, called BIG-RAIDAR, is also supplied; BIG-RAIDAR is slower to move,
  4. ; but has a higher chance of stepping on opponents and is easier to watch.
  5.  
  6. ; Picket width is 32
  7. ; Inner distance (btwn picket edge and program edge) is 164
  8. ; Program width is 25 (Not including leading 3 data lines)
  9. ; On panic, program jumps 400
  10.  
  11. targ1   dat #0
  12. targ2   dat #0
  13. dst     dat #0
  14. start   mov #33 dst
  15.         mov #-163 targ1
  16.         mov #223 targ2          ; 165 + dist targ2->end-of-prog + 1 + 32
  17. uploop  mov #42 <targ1
  18.         mov #42 <targ2
  19.         djn uploop dst
  20. scan    mov #-163 targ1
  21.         mov #223 targ2          ; ditto as above
  22.         mov #33 dst
  23. scango  cmp #42 <targ1
  24.         jmp panic
  25.         cmp #42 <targ2
  26.         jmp panic2
  27.         djn scango dst
  28.         jmp scan
  29. panic   mov #25 dst
  30.         mov #-400 targ1
  31. pan     mov @dst <targ1
  32.         djn pan dst
  33.         jmp @targ1
  34. panic2  mov #25 dst
  35.         mov #425 targ1
  36. pan2    mov @dst <targ1
  37.         djn pan dst
  38.         jmp @targ1
  39.         end start
  40.