TL;DR: Using the DEF SEG
and POKE
commands in GWBASIC, was there any way to make changes to an IBM-PC compatible computer that would (a) persist even after a reboot and (b) cause an increase in crash frequency, thus effectively damaging the system?
This is probably a totally stupid question with a straightforward answer (presumably it's going to be "No, there's absolutely no way you could damage a PC in that way!"). But the question has haunted me for about 35 years now, and I need to put my mind to rest at last. So please bear with me...
When I was a kid in the mid-1980s, I learned that you could the POKE
command in GWBASIC to write directly to the display memory of a computer. However, it was first necessary to use the DEF SEG
command to select the memory segment containing the display memory. The address of that segment was not available to me, so I came up with a brilliant idea for an algorithm to find that segment address:
- Use a
FOR
loop to iterate through all possible memory segments - Flood the current memory segment with random characters using another
FOR
loop in combination withPOKE
- Manually interrupt the program as soon as random characters started appearing on screen
PRINT
the variable containing the current segment address
Needless to say, the algorithm didn't work. All it achieved was make the computer crash. The unending series of speaker beeps that accompanied the crash was absolutely frightening to the impressionable kid that was me. I was convinced that my program must have been very dangerous, and I was also convinced that the computer never fully recovered from what I had done to it, even after numerous reboots and power-offs. I firmly believed that there were now frequent random crashes and software failures, something that had never occurred before. This was particularly awkward as the PC was my dad's work computer that I was only allowed to use occasionally – I felt horribly guilty thinking I had broken this expensive piece of equipment for good with my stupidly dangerous program.
From my adult perspective, I'm pretty sure that all that my POKE
s did was overwrite some essential part of MS-DOS or the GWBASIC interpreter itself – nothing that wouldn't have been restored after the first reboot. The weird behavior that I believed to observe back then was probably nothing but selection bias: Since I thought at the time that I had done something potentially harmful, I attributed any crash afterwards to my GWBASIC program, ignoring that MS-DOS and the programs running on it at the time weren't exactly robust despite the simplicity of the architecture.
And yet, whenever I think about that anecdote, there's still some lingering doubt. What if the increase in crashes hadn't just been my imagination – what if my program accidentally modified some BIOS settings (e.g. for memory refresh rates or something along these lines), and what if these BIOS settings were stored in CMOS RAM? Then, perhaps these modified settings could indeed have been persistent between reboots, and they could indeed have been responsible for a general system instability.
So, to sum up: Was there any way that my GWBASIC program that used POKE
and DEF SEG
to write to random memory segments made a persistent change to the computer, a change that increased the probability of system crashes?