
; Jumper
; ------
; Hat schon eine Anzahl (100 Stueck) festcodierter Jumpbefehle im Programm
; die auf eine Falle weisen. Diese werden von einer Anzahl verschiedener
; Tasks gleichmässig im Speicher verteilt, so dass sie jeweils auf eine
; Falle im jeweiligen Task zeigen, die aber nur auf die Falle im Haupttask
; zeigt. Alle anfangs erzeugten Tasks werden wieder gelöscht, so dass am
; Schluss nur noch der Ursprungstask vorhanden ist. Das Ende wird
; wie bei Killer4 gestaltet.

 JMP 707
 JMP 700
 JMP 693
 JMP 686
 JMP 679
 JMP 672
 JMP 665
 JMP 658
 JMP 651
 JMP 644
 JMP 637
 JMP 630
 JMP 623
 JMP 616
 JMP 609
 JMP 602
 JMP 595
 JMP 588
 JMP 581
 JMP 574
 JMP 567
 JMP 560
 JMP 553
 JMP 546
 JMP 539
 JMP 532
 JMP 525
 JMP 518
 JMP 511
 JMP 504
 JMP 497
 JMP 490
 JMP 483
 JMP 476
 JMP 189
 JMP 462
 JMP 455
 JMP 448
 JMP 441
 JMP 434
 JMP 427
 JMP 420
 JMP 413
 JMP 406
 JMP 399
 JMP 392
 JMP 385
 JMP 378
 JMP 371
 JMP 364
 JMP 357
 JMP 350
 JMP 343
 JMP 336
 JMP 329
 JMP 322
 JMP 315
 JMP 308
 JMP 301
 JMP 294
 JMP 287
 JMP 280
 JMP 273
 JMP 266
 JMP 259
 JMP 252
 JMP 245
 JMP 238
 JMP 231
 JMP 224
 JMP 217
 JMP 210
 JMP 203
 JMP 196
 JMP 189
 JMP 182
 JMP 175
 JMP 168
 JMP 161
 JMP 154
 JMP 147
 JMP 140
 JMP 133
 JMP 126
 JMP 119
 JMP 112
 JMP 105
 JMP 98
 JMP 91
 JMP 84
 JMP 77
 JMP 70
 JMP 63
 JMP 56
 JMP 49
 JMP 42
 JMP 35
 JMP 28
 JMP 21
 JMP 14
 JMP 7

adresse    DAT 0
ort        DAT -5
counter0   DAT 100
falle      JMP 0                   ;später Zeiger auf Hauptfalle
proggy     MOV <adresse, @ort
           SUB #7, ort
           DJN proggy, counter0

enemies    DAT 0
hauptfalle ADD #1, enemies
           SPL 0
kill       JMP hauptfalle

counter1   DAT 10                  ;Anzahl Kopien des Proggys
wohin      DAT 1400                ;wo die erste Kopie
woher      DAT -6                  ;wo beginnen
counter2   DAT 6                   ;wie viele Zeilen ist proggy lang
howlong    DAT 6                   ;wie viele Zeilen ist proggy lang
beginn     DAT -1405               ;woher die Daten nehmen
taskadr    DAT 1392                ;wo ist der neue Task?
falleadr   DAT 1390                ;Zeiger auf Hauptfalle
jmpfalle   JMP -1400
start      MOV <woher, <wohin      ;Zu kopieren beginnen
           DJN start, counter2
           MOV beginn, <wohin      ;für jedes proggy die Adresse, aus
                                   ;der die JMP's kommen, eingeben
           MOV jmpfalle, @falleadr
           SPL @taskadr            ;neuen Task starten
           SUB #713, beginn        ;und neu berechen
           MOV howlong, counter2
           MOV #-6, woher
           ADD #720, wohin         ;naechste Kopie
           ADD #713, taskadr       ;start der naechsten Kopie
           ADD #713, falleadr      ;neu stellen der Falle
           SUB #713, jmpfalle
           CMP #0, enemies         ;was gefangen?
           JMP loeschen            ;Speicher loeschen anfangen
           DJN start, counter1
           JMP gnomtasks           ;Ueberleben starten

wo         DAT 100
counter3   DAT 2600
loeschen   MOV #1, @wo             ;Im Abstand von drei Zellen DAT 1
           ADD #3, wo
           DJN loeschen, counter3

           SPL gnomtasks
           MOV #0, kill
           JMP 0                   ;Ueberleben

gnomtasks  MOV -1, 7990            ;Insgesamt 6 tasks
           SPL 7989                ;starten, so dass gnom überlebt
           MOV -3, 7981            ;wird.
           SPL 7980                ;und vielleicht auch was
           SPL nummer1             ;anderes, wer weiss
           SPL nummer2
           SPL nummer3
           SPL nummer4
           SPL nummer5
           DAT 50
           DAT 0
           DAT 0
nummer1    MOV #0, @-3
           ADD #4, -4
           JMP nummer1
           JMP 0
           DAT 0
           DAT 0
           DAT 1640
           DAT 0
           DAT 0
nummer2    MOV #0, @-3
           ADD #4, -4
           JMP nummer2
           JMP 0
           DAT 0
           DAT 0
           DAT 3230
           DAT 0
           DAT 0
nummer3    MOV #0, @-3
           ADD #4, -4
           JMP nummer3
           JMP 0
           DAT 0
           DAT 0
           DAT 4820
           DAT 0
           DAT 0
nummer4    MOV #0, @-3
           ADD #4, -4
           JMP nummer4
           JMP 0
           DAT 0
           DAT 0
           DAT 6410
           DAT 0
           DAT 0
nummer5    MOV #0, @-3
           ADD #4, -4
           JMP nummer5
           JMP 0
           DAT 0
           DAT 0
