home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / MISC / EDUCATIO / CORWP30.ZIP / DAGGER.RED < prev    next >
Encoding:
Text File  |  1991-11-19  |  1.6 KB  |  42 lines

  1. ;--------------------------------------------------------------
  2. ; Dagger - stabbing version of Invader
  3. ; 3-28-91 Stefan Strack
  4. ;
  5. ; Probes the core randomly for an executable address, copies
  6. ; itself some distance before the enemy program and kills it
  7. ; with a stab in the back.
  8. ; [uses non-standard opcodes RND, EXC; and pre-increment]
  9. ;--------------------------------------------------------------
  10.  
  11.         equ     exclude                 20
  12.         equ     back                    50
  13.         equ     bombstart               30
  14.         equ     bombnumber              20
  15.  
  16. bcounter:dat 0
  17. source: dat 0
  18.  
  19. rem ----------- extend dagger ---------------------------------
  20. first:
  21.         mov     #bombnumber             bcounter
  22.         mov     #bombstart              baddr
  23. bomb:   mov     bcounter                >baddr
  24.         djn     bomb                    bcounter
  25.  
  26. rem ----------- search for victim -----------------------------
  27. probe:
  28.         rnd     #ADDRESS_SPACE-exclude  destin  ; generate random address
  29.         exc     found                   @destin ; if executable leave loop
  30.         jmp     probe                           ; else continue random
  31. found:
  32.         mov     #last-first+1           source  ; copy program
  33.         sub     #back                   destin
  34. copy:   mov     @source                 <destin
  35.         djn     copy                    source
  36.         spl     @destin                         ; and spawn subprocess
  37. last:   jmp     first                           ; go extend dagger again
  38.  
  39. destin: dat     0
  40. baddr:  dat     0
  41.         end     probe
  42.