scott@max.u.washington.edu (09/21/89)
In article <8901@batcomputer.tn.cornell.edu>, pwong@batcomputer.tn.cornell.edu (Patrick Wong) writes: > I had a strange experience yesterday with my C64 and 1541 combo : > > I loaded a BASIC program into C64 (without no accessories attached except > the 1541) from the disk drive. When I ran the program, it crashed at a > certain line. So, I LISTed the line. I was surprised that the program > line contained the correct program statement, plus a few other BASIC > program lines (not belonging to this program, perhaps from some other > BASIC program on the same diskette) occupying several screen lines !!! > So, I re-typed in the correct program line again and did a LIST. > Wow, the same set of unidentified program lines were attached to > the program line below the one just re-typed in !!! > Then, throughtout the nite I did several hard reset of the C64 (powering > it down and up) and loaded the same program each time. Each time > I found those extra lines and even other unidentified > extra lines attached to the ends of the original program lines at > different locations of the program. And, sometimes the last few > program lines of the original program were missing ! > In the end, after many resets I > successfully loaded the same program without anymore garbage. > > So, what happened ? If the disk drive is not clean, head is out of > alignment, diskette is corrupted, then re-typing in the correct > program lines into the program after it is loaded into the C64 memory > should have fixed the problem. Since re-typing didn't fix the problem > does it mean that there is something wrong with my C64 and not the > 1541 or the diskette ? > > Please help !!! > > Patrick Wong > pcw@squid.tn.cornell.edu > pwong@tcgould.tn.cornell.edu It could have been a number of thing. First, was the computer in the off-on state (or close to it), if not then the memory pointers could have been changed by the previous prg that you run thus confusing the BASIC editor and creating that garbage on program (BASIC text area and BASIC variable area could have been conflicting). Second, because of a minute dust particle, the header fail to read the end of the file marker and continue reading some more blocks before stoping thus creating the garbage (although very unlikely it can happen). Third power disturbance that distorted the memory content of the computer (once again, unlikely, but can happen)...And etc. Once garbage got into the program, the reason why you couldn't delete it or edit it, is not because of a mischievous virus, but because the BASIC editor was confused, and when the editor is confused it just leave the line(s) as it is. The basic editor expects certain things like each line must begin with a line number and every line terminated with a end-of-line-mark. And if the editor doesn't find everything in order, it doesn't edit the line(s). In those case you have to do a NEW. Computer Virus on the C64 world is very VERY unlikely, and there are several reasons for that. First, for the virus to be active, like any other program, it must be ran (or executed). To achieve this the virus can do two thing: hide itself inside another program (like an application program) so that when that programs is ran the virus will be run also, or (if it has the chance) modify the autoexec files (files that are ran automatically when the computer is first turned on) so that the autoexec file will run the virus (or attach to the autoexec file itself). And once it is ran, it will carryout the job of infecting other programs by attaching copies of itself and creating havoc. On a C64, there is no such thing as autoexec files. Everything that the computer needs for a cold start is inside the C64 in ROM chips, which can't be modify, so there goes the first door for the virus. The virus can also hide inside another program. In this case, for that already infected program and the disk which contains that program is the C64 user vunerable, because once that program is ran the virus will have access all files in that disk. It is very hard for a virus in a C64 to infect other disk because most always, when the user is done run one application program he/she will have/need/want to reset the computer to a cold start by turning the computer off-on or by a SYS 64738 before going to the next application, which effectively erases the virus from memory and chance of infecting another disk. With big system, once the virus is activated, it has access to all the files in the hard drive! Moreover, with the big system when you are finished with one application program, you just exit the program and then go on to the next application program, thus leaving what every stuff there was in the memory (virus included) still active (it is too much hazard and time consuming to go through a cold start frequently). I guess this is just another superiority of the C64 :) Sincerely, Scott Stephen