Bill Cunningham wrote:
[...]
Dennis wrote me back and I'm not quite sure I understood what he was trying
to say so I'll post his response. Maybe someone will understand better.
/* Dennis's response */
At least some graphics cards were able to
destroy a monitor if the settings were wrong
enough. And of course you can overwrite your
disk, but that's different.
However, it's likely that these things could
be done in Perl as well.
/* End Dennis's response */
Does anyone understand this a little better than me?
If you are running an O/S that allows direct access to the video
hardware, then you can program it to do "bad things" as far as the
monitor is concerned. For example, give it a sync signal that is
far enough out of the monitor's range, leave it in that state for
long enough, and something bad will happen to the monitor.
Such things are easy to do with platform-specific extensions to
"C", and Dennis is saying that it may be possible to do the same
things in Perl on such a platform.
<WayBackMachine year="1979">
The TRS-80 Model 2 had its video memory bank-switched with the top
16K(?) of "normal" memory. To access it, you bank-switched it in,
did what you had to do, and switched it out back to "normal" memory.
During this time, the video signal was cut off.
As everyone knows, using the BIOS to display text is much slower
than simply writing to video memory, so that's what was done.
Fast-forward a year to the release of TRS-DOS 2, which included a
print spooler. It's code was placed in the "normal" memory bank
that was swapped out when accessing video memory. It was executed
on the (maskable) clock-tick interrupt.
Put the two previous paragraphs together, and imagine what would
happen if the clock-tick interrupt occurred while the video memory
was swapped in, and interupts are enabled.
The interrupt occurs, and the O/S calls the spooler. Unfortunately,
at the spooler's address there is video memory instead, which does
not make for very good executable code. The machine freezes, with
the video signal still off. Well, the hardware wasn't designed to
run that way for more than a few milliseconds, and (as I recall)
the flyback transformer would overload and explode. (Well, maybe
not "explode", but "die a horrible death" at least.)
</WayBackMachine>
Now, to put this back on-topic...
The following program may cause hardware damage, though the results
are not guaranteed.
======
void main()
{
char *pt, c;
*( pt = pt++ ) = c;
}
======
--
+---------+----------------------------------+-----------------------------+
| Kenneth | kenbrody at spamcop.net | "The opinions expressed |
| J. |
http://www.hvcomputer.com | herein are not necessarily |
| Brody |
http://www.fptech.com | those of fP Technologies." |
+---------+----------------------------------+-----------------------------+