This is something Apple does in their 'DSMOS' (don't steal Mac OS X) code (but they use copyright, not a trademark).
Mac OS X looks for a set of firmware variables containing a non-formatted version of following haiku (reproduced for the purpose of artistic comment):
our hard work
by these words guarded
please dont steal
© Apple Computer Inc
If you shipped a transparently Mac-compatible x86 machine, you'd have to include this haiku (in some form) in the firmware.
Sega tried this to prevent third party games from running. It didn't work: because their string was required for functionality, it wasn't protected by copyright. See http://en.wikipedia.org/wiki/Sega_v._Accolade for details.
If GNU is copyleft, is this then copy far right?
Cute. I remember some anti-spam outfit trying to "protect" emails with a copyrighted poem in the headers: http://www.oblomovka.com/writing/habeas%3A_the_antispam_haik...
I wonder how far back in OS(X) it dates?
It was introduced as part of the Intel transition, prior to public release.
Internally, Mac OS X ran on commodity PCs for quite some time before that and didn't include DSMOS.
Serious question: if I made a computer with the purpose of booting Mac OS X, noticed that it aborted after trying to read some bytes from the firmware, then wrote a program to iteratively test longer and longer sequences, would I be committing copyright infringement? What if I never look at the output of the program as text, but only as hex values?
IANAL, but speaking generally, the courts seem to take a dim view at technical workarounds, and instead focus on the actual intention and result.
In this particular case, I believe what you would have produced would be classified as a "circumvention" device under the DMCA (https://en.wikipedia.org/wiki/Anti-circumvention).
The state of "IP" law makes me very sad.