# Need math problem to crash 80's CPUs

**URL:** <https://boards.straightdope.com/t/need-math-problem-to-crash-80s-cpus/631443>\
**Category:** Factual Questions\
**Created:** [August 14, 2012, 6:03am UTC](https://boards.straightdope.com/t/need-math-problem-to-crash-80s-cpus/631443 "2012-08-14T06:03:41Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![Charmbrights](https://avatars.discourse-cdn.com/v4/letter/c/ce73a5/32.png) [@Charmbrights](https://boards.straightdope.com/u/Charmbrights)\
**Post date:** [August 14, 2012, 12:14pm UTC](https://boards.straightdope.com/t/need-math-problem-to-crash-80s-cpus/631443/41 "2012-08-14T12:14:30Z")

</div>

> [@septimus](#):
>
> … I recall reading that the first computer to divide by zero blew some vacuum tubes(\*)! (I find no easy reference Googling, perhaps it was just a made-up story.) …

In the early 1960s this was regarded as an urban myth.

> [@friedo](#):
>
> … But since it’s for a story, the correct answer is, “Computer, what is the meaning of existence?”

I thought everyone knew that the answer to life, the universe and everything is “forty-two”.

> [@Francis\_Vaughan](#):
>
> … Xerox had what was a fully functioning personal graphics workstation by the early 70’s.

DEC had the GT40 long before the70s.

If you want to blow up a computer room, attack the peripherals. Get a high-speed chain printer, (as fitted to IBM 1401s and 1440s) and make it print a line where the letters are in the same order as those on the chain.

Chain printers had fast moving chains with letters in an odd order (which I can’t bring to mind fifty years later). As the chain flew past a line of hammers the full width of the printer a hammer would be actuated when the right letter was in front of it to print the required letter at that point. If all the hammers actuated simultaneously the kinetic energy in the chain was enough to cause catastrophic breakdown of the physical machinery.  
Ah, the Good Old Days.

---

<div class="post-metadata">

**Author:** ![Francis\_Vaughan](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/francis_vaughan/32/3093_2.png) [@Francis\_Vaughan](https://boards.straightdope.com/u/Francis_Vaughan)\
**Post date:** [August 14, 2012, 12:39pm UTC](https://boards.straightdope.com/t/need-math-problem-to-crash-80s-cpus/631443/42 "2012-08-14T12:39:03Z")

</div>

> [@](#):
>
> DEC had the GT40 long before the70s.

True. The thing about the Xerox was that it sported a window based GUI, and a very modern OS. They had no idea what they had until it was far too late.

> [@](#):
>
> If you want to blow up a computer room, attack the peripherals. Get a high-speed chain printer,

I remember hearing ledgends about that. We only had CDC drum printers. It was possible to slam all the hammers at the same time on those too, but it didn’t do the same amount of damage. You could make some good noises however. I still have a drum out of one of those in my little store of memorabilia. It weighs something astounding.

---

<div class="post-metadata">

**Author:** ![Bytegeist](https://avatars.discourse-cdn.com/v4/letter/b/9dc877/32.png) [@Bytegeist](https://boards.straightdope.com/u/Bytegeist)\
**Post date:** [August 14, 2012, 1:48pm UTC](https://boards.straightdope.com/t/need-math-problem-to-crash-80s-cpus/631443/43 "2012-08-14T13:48:20Z")

</div>

> [@For You](#):
>
> I know from playing with a Commodore that there was one unmapped instruction in the 6502 (0xA2) that would irrecoverably freeze the CPU so that it would not even respond to NMI …

A small nitpick. Opcode 0xA2 is perfectly valid. It’s the LDX instruction, in immediate mode.

But your memory is otherwise correct. Several opcodes with a lower digit of 2 would freeze the 6502. See the “HLT” instruction on [this page](http://codebase64.org/doku.php?id=base:extra_instructions_of_the_65xx_series_cpu), about halfway down.

HLT crashes the microprocessor. When this opcode is executed, program execution ceases. No hardware interrupts will execute either. … Only a reset will restart execution. This opcode leaves no trace of any operation performed! No registers affected.

Opcodes: 02, 12, 22, 32, 42, 52, 62, 72, 92, B2, D2, F2.

On the next-generation 65C02 CPU, all the illegal opcodes were changed into NOPs, thus taking away the anarchy. (And breaking a few games which had depended on the undocumented behaviors.)

---

<div class="post-metadata">

**Author:** ![yoyodyne](https://avatars.discourse-cdn.com/v4/letter/y/a9a28c/32.png) [@yoyodyne](https://boards.straightdope.com/u/yoyodyne)\
**Post date:** [August 14, 2012, 2:00pm UTC](https://boards.straightdope.com/t/need-math-problem-to-crash-80s-cpus/631443/44 "2012-08-14T14:00:38Z")

</div>

> [@Jragon](#):
>
> AMD processors are notorious for not self-regulating temperature and literally catching fire (modern Intels are apparently very difficult to make this happen with, because they regulate speed based on temp, even shutting down when they get too hot).

Modern AMD processors regulate themselves as well.

---

<div class="post-metadata">

**Author:** ![eschereal](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/eschereal/32/18939_2.png) [@eschereal](https://boards.straightdope.com/u/eschereal)\
**Post date:** [August 14, 2012, 2:14pm UTC](https://boards.straightdope.com/t/need-math-problem-to-crash-80s-cpus/631443/45 "2012-08-14T14:14:15Z")

</div>

I get the vague sense that the OP is talking about sitting down and more or less typing some vaguely comprehensible problem into the computer that would make it crash dramatically. This suggests a high-level language, which would tend to have range check safeguards, so running out of memory in such a scenario will just fault out. The only way to get something dramatic would either be assembly/machine code (pretty arcane for a story) or the equivalent of BASIC’s POKE to directly corrupt memory and/or hardware.

---

<div class="post-metadata">

**Author:** ![TriPolar](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/tripolar/32/3008_2.png) [@TriPolar](https://boards.straightdope.com/u/TriPolar)\
**Post date:** [August 14, 2012, 2:50pm UTC](https://boards.straightdope.com/t/need-math-problem-to-crash-80s-cpus/631443/46 "2012-08-14T14:50:05Z")

</div>

If you want to physically break an 80s PC you could pick the wrong video frequency and break some monitors. Otherwise it’s difficult to get them to overheat by controlled processing even with a broken fan. If you break the fan and they don’t overheat pretty quickly, not that much will make them overheat (this will obviously vary with particular hardware).

If you just want to cause a software crash on an 80s PC, just use it for a while.

---

<div class="post-metadata">

**Author:** ![Frylock](https://avatars.discourse-cdn.com/v4/letter/f/ce7236/32.png) [@Frylock](https://boards.straightdope.com/u/Frylock)\
**Post date:** [August 14, 2012, 3:26pm UTC](https://boards.straightdope.com/t/need-math-problem-to-crash-80s-cpus/631443/47 "2012-08-14T15:26:46Z")

</div>

> [@rogerbox](#):
>
> 1. I am not looking to physically damage the CPU, in fact that won’t work at all, but something plausible to cause it to run out of memory or lock up.
> 
> …
> 
> 1. I’m no programming expert but I have a C64 and can make an infinite loop in a single line in BASIC, no an infinite loop will not cause any damage or overheat the CPU.

Does not compute.

Do you want to damage the thing or not? If not, then why is the one-line loop not sufficient?

---

<div class="post-metadata">

**Author:** ![TriPolar](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/tripolar/32/3008_2.png) [@TriPolar](https://boards.straightdope.com/u/TriPolar)\
**Post date:** [August 14, 2012, 3:37pm UTC](https://boards.straightdope.com/t/need-math-problem-to-crash-80s-cpus/631443/48 "2012-08-14T15:37:20Z")

</div>

> [@Frylock](#):
>
> Does not compute.
> 
> Do you want to damage the thing or not? If not, then why is the one-line loop not sufficient?

Why would it do anything? An endless loop in and of itself requires very little memory, and if it’s not doing floating point operations it’s using very little processor functionality. The CPU may be maximizing it’s cycle usage if the instructions are all cached, but even that shouldn’t do so much to heat up an 80s CPU. If he started some endless recursion he’d hit a memory limit of some kind very quickly though.

---

<div class="post-metadata">

**Author:** ![Jragon](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@Jragon](https://boards.straightdope.com/u/Jragon)\
**Post date:** [August 14, 2012, 3:46pm UTC](https://boards.straightdope.com/t/need-math-problem-to-crash-80s-cpus/631443/49 "2012-08-14T15:46:15Z")

</div>

> [@yoyodyne](#):
>
> Modern AMD processors regulate themselves as well.

Maybe. The video I saw was about 2-3 years old. It was a presentation by an energy conservation specialist, they were comparing the energy saving and heat regulating features of a modern Intel vs a modern AMD by stress testing them with no heatsink. In every case the Intel would just stop working until it got cool, while the AMD kept flailing and caught fire. Maybe it’s gotten better since then.

> [@TriPolar](#):
>
> Why would it do anything? An endless loop in and of itself requires very little memory, and if it’s not doing floating point operations it’s using very little processor functionality. The CPU may be maximizing it’s cycle usage if the instructions are all cached, but even that shouldn’t do so much to heat up an 80s CPU. If he started some endless recursion he’d hit a memory limit of some kind very quickly though.

Which is why I recommended a naive recursive factorial program. I’m too lazy to calculate exactly how many recurses it would take to overflow with the stack frame on an \<x\> bit system with \<y\> bytes of memory, but it’s completely plausible and very easy to stack overflow a system with a factorial function, which is a function that can plausibly exist in any number of problems (say they were doing combinatorics).

---

<div class="post-metadata">

**Author:** ![eschereal](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/eschereal/32/18939_2.png) [@eschereal](https://boards.straightdope.com/u/eschereal)\
**Post date:** [August 14, 2012, 3:54pm UTC](https://boards.straightdope.com/t/need-math-problem-to-crash-80s-cpus/631443/50 "2012-08-14T15:54:37Z")

</div>

> [@Jragon](#):
>
> Which is why I recommended a naive recursive factorial program. I’m too lazy to calculate exactly how many recurses it would take to overflow with the stack frame on an \<x\> bit system with \<y\> bytes of memory, but it’s completely plausible and very easy to stack overflow a system with a factorial function, which is a function that can plausibly exist in any number of problems (say they were doing combinatorics).

One CPU the OP mentioned was a 6502, which has an 8-bit stack (256 bytes). Overflowing that would be trivial, except I suspect most 6502 software design did not involve stack-based automatic variables.

---

<div class="post-metadata">

**Author:** ![TriPolar](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/tripolar/32/3008_2.png) [@TriPolar](https://boards.straightdope.com/u/TriPolar)\
**Post date:** [August 14, 2012, 3:57pm UTC](https://boards.straightdope.com/t/need-math-problem-to-crash-80s-cpus/631443/51 "2012-08-14T15:57:56Z")

</div>

> [@Jragon](#):
>
> Which is why I recommended a naive recursive factorial program. I’m too lazy to calculate exactly how many recurses it would take to overflow with the stack frame on an \<x\> bit system with \<y\> bytes of memory, but it’s completely plausible and very easy to stack overflow a system with a factorial function, which is a function that can plausibly exist in any number of problems (say they were doing combinatorics).

Why get so fancy? Just create a function with one line that calls itself. You’ll run out of memory almost instantly.

Well I guess if you’re trying to simulate the ‘does not compute exploding robot’ meme then giving it a real problem might be a little better.

---

<div class="post-metadata">

**Author:** ![Jragon](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@Jragon](https://boards.straightdope.com/u/Jragon)\
**Post date:** [August 14, 2012, 4:00pm UTC](https://boards.straightdope.com/t/need-math-problem-to-crash-80s-cpus/631443/52 "2012-08-14T16:00:06Z")

</div>

> [@For You](#):
>
> One CPU the OP mentioned was a 6502, which has an 8-bit stack (256 bytes). Overflowing that would be trivial, except I suspect most 6502 software design did not involve stack-based automatic variables.

True, but if it’s in the modern day and the guy is just using a hacked together '80s computer it’s possible he just wrote a quick recursive factorial function while not thinking (depending on his characterization in the story).

I mean, not that you should **ever** use a recursive factorial function (caveat: in languages not optimized for tail recursion, obviously if you’re using Haskell or something…), even in modern software design. But whatever.

> [@TriPolar](#):
>
> Why get so fancy? Just create a function with one line that calls itself. You’ll run out of memory almost instantly.
> 
> Well I guess if you’re trying to simulate the ‘does not compute exploding robot’ meme then giving it a real problem might be a little better.

Well, I inferred that he wants the character working on a plausible real world problem when the computer breaks, rather than trying to break the computer for shits and giggles.

---

<div class="post-metadata">

**Author:** ![RaftPeople](https://avatars.discourse-cdn.com/v4/letter/r/6f9a4e/32.png) [@RaftPeople](https://boards.straightdope.com/u/RaftPeople)\
**Post date:** [August 14, 2012, 4:05pm UTC](https://boards.straightdope.com/t/need-math-problem-to-crash-80s-cpus/631443/53 "2012-08-14T16:05:51Z")

</div>

> [@For You](#):
>
> One CPU the OP mentioned was a 6502, which has an 8-bit stack (256 bytes). Overflowing that would be trivial, except I suspect most 6502 software design did not involve stack-based automatic variables.

Not sure if the 6502 had this but the 6809 had a JSR instruction that automatically stacked the return address, just have a JSR that jumps to itself.

---

<div class="post-metadata">

**Author:** ![Frylock](https://avatars.discourse-cdn.com/v4/letter/f/ce7236/32.png) [@Frylock](https://boards.straightdope.com/u/Frylock)\
**Post date:** [August 14, 2012, 4:38pm UTC](https://boards.straightdope.com/t/need-math-problem-to-crash-80s-cpus/631443/54 "2012-08-14T16:38:11Z")

</div>

> [@TriPolar](#):
>
> Why would it do anything? An endless loop in and of itself requires very little memory, and if it’s not doing floating point operations it’s using very little processor functionality. The CPU may be maximizing it’s cycle usage if the instructions are all cached, but even that shouldn’t do so much to heat up an 80s CPU. If he started some endless recursion he’d hit a memory limit of some kind very quickly though.

What I was saying is, it is not clear at all what the OP’s asking for, given the later post that I quoted. At one point he says he doesn’t want to damage the CPU. At another point in the same post, he complains about a possible solution because it _doesn’t_ damage the CPU. So, I’m asking, is he trying to damage the CPU or not? If not, then it seems like he just wants to lock the thing up, so that’s why I asked him why the infinite loop wouldn’t suffice. (Granted it would need to be a little more complicated than a single line loop as it would need to interrupt any ctrl+break type of mechanism that may be operative on the machine in question.)

---

<div class="post-metadata">

**Author:** ![TriPolar](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/tripolar/32/3008_2.png) [@TriPolar](https://boards.straightdope.com/u/TriPolar)\
**Post date:** [August 14, 2012, 4:43pm UTC](https://boards.straightdope.com/t/need-math-problem-to-crash-80s-cpus/631443/55 "2012-08-14T16:43:36Z")

</div>

> [@Frylock](#):
>
> What I was saying is, it is not clear at all what the OP’s asking for, given the later post that I quoted. At one point he says he doesn’t want to damage the CPU. At another point in the same post, he complains about a possible solution because it _doesn’t_ damage the CPU. So, I’m asking, is he trying to damage the CPU or not? If not, then it seems like he just wants to lock the thing up, so that’s why I asked him why the infinite loop wouldn’t suffice. (Granted it would need to be a little more complicated than a single line loop as it would need to interrupt any ctrl+break type of mechanism that may be operative on the machine in question.)

Yeah, I think he’s been convinced computers don’t break just because the problem is complex. I’m not sure what he’s after anyway. It’s easier to physically damage a modern PC, but it’s more difficult to crash one by using up memory.

---

<div class="post-metadata">

**Author:** ![engineer\_comp\_geek](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/engineer_comp_geek/32/504_2.png) [@engineer\_comp\_geek](https://boards.straightdope.com/u/engineer_comp_geek)\
**Post date:** [August 14, 2012, 4:48pm UTC](https://boards.straightdope.com/t/need-math-problem-to-crash-80s-cpus/631443/56 "2012-08-14T16:48:00Z")

</div>

> [@TriPolar](#):
>
> If you want to physically break an 80s PC you could pick the wrong video frequency and break some monitors.

True, but they would often take months to break. It wasn’t something that happened immediately. For those who aren’t aware, it was a problem with a lot of linux machines (due to the default settings they used for some monitors) and wasn’t all that noticeable since the screen looked ok to the user. Also, some monitors were more sensitive to it than others.

I also recall this problem as being more early 90s than 80s.

---

<div class="post-metadata">

**Author:** ![TriPolar](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/tripolar/32/3008_2.png) [@TriPolar](https://boards.straightdope.com/u/TriPolar)\
**Post date:** [August 14, 2012, 5:18pm UTC](https://boards.straightdope.com/t/need-math-problem-to-crash-80s-cpus/631443/57 "2012-08-14T17:18:19Z")

</div>

> [@engineer\_comp\_geek](#):
>
> True, but they would often take months to break. It wasn’t something that happened immediately. For those who aren’t aware, it was a problem with a lot of linux machines (due to the default settings they used for some monitors) and wasn’t all that noticeable since the screen looked ok to the user. Also, some monitors were more sensitive to it than others.
> 
> I also recall this problem as being more early 90s than 80s.

I was thinking of some of hi-res cards for IBM clones in the 80s. Depending on the monitor you instantly trash it. Would have been late 80s IIRC. Overdriving monitors has been a problem a lot of times, but barely qualifies as breaking a computer. I think some interfaces could detect the monitor dying, others wouldn’t even know about it, so the computer was really remaining fully functional except for a blank display. I heard about monitors smoking from this, but I only ever saw them after they were broken, and none looked burnt.

---

<div class="post-metadata">

**Author:** ![Bytegeist](https://avatars.discourse-cdn.com/v4/letter/b/9dc877/32.png) [@Bytegeist](https://boards.straightdope.com/u/Bytegeist)\
**Post date:** [August 14, 2012, 5:23pm UTC](https://boards.straightdope.com/t/need-math-problem-to-crash-80s-cpus/631443/58 "2012-08-14T17:23:23Z")

</div>

> [@RaftPeople](#):
>
> Not sure if the 6502 had this but the 6809 had a JSR instruction that automatically stacked the return address, just have a JSR that jumps to itself.

The 6502 stack pointer (S) is only 8 bits in size, with the stack itself always occupying the range $0100-01FF.

So executing a JSR-to-itself instruction would fill up the stack with return addresses, but it would also just wrap around, writing to the same 256 bytes over and over.

---

<div class="post-metadata">

**Author:** ![Rhythmdvl](https://avatars.discourse-cdn.com/v4/letter/r/85f322/32.png) [@Rhythmdvl](https://boards.straightdope.com/u/Rhythmdvl)\
**Post date:** [August 14, 2012, 5:29pm UTC](https://boards.straightdope.com/t/need-math-problem-to-crash-80s-cpus/631443/59 "2012-08-14T17:29:16Z")

</div>

Please tell me the protagonist is named Kirk.

---

<div class="post-metadata">

**Author:** ![Derleth](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Derleth](https://boards.straightdope.com/u/Derleth)\
**Post date:** [August 14, 2012, 7:25pm UTC](https://boards.straightdope.com/t/need-math-problem-to-crash-80s-cpus/631443/60 "2012-08-14T19:25:35Z")

</div>

[Killer pokes](http://en.wikipedia.org/wiki/Killer_poke) are largely obsolete now, given that even monitors and hard drives have enough local processing to safely reject unsafe commands, but that certainly wasn’t the case back in the 1980s. [Here’s more information about the Commodore PET-specific killer poke, which, like so many others, focused on damaging video hardware.](http://www.6502.org/users/andre/petindex/poke/index.html)

[Previous page](https://boards.straightdope.com/t/need-math-problem-to-crash-80s-cpus/631443.md?page=2)

[Next page](https://boards.straightdope.com/t/need-math-problem-to-crash-80s-cpus/631443.md?page=4)
