This one is more hilarious.
pushf
cli
... five instructions later ...
popf ; BUG! Does not enable interrupts
> What makes this noteworthy is not that it contains exactly the forbidden code sequence, it is noteworthy because this is not an MS-DOS application but rather a Windows application. It’s a Windows application doing something that doesn’t work under Windows. That takes nerves. A certain network driver does essentially the same thing.And,
> Maxim 18: Do something that is supported only under Windows, and do it wrong.
> Memory lock calls are ignored in the absence of virtual memory, so make sure to abuse lock functions as much as possible. That way, when you are run in a virtual memory environment, strange and wondrous things start happening that never happened in real mode.
> Since none of the standard DOS extenders use virtual memory by default, this is an excellent opportunity to begin behaving randomly. This is so important it’s worth restating.
What I find ironic is that while some people go on and on about gatekeeping programming and "you're not a real programmer if..." some people are just doing that kind of thing (and they're usually the ones making more money)
I was satisified when I found out that Vista, amongst the many things it did wrong, did something right: started naming programs that were misbehaving (for example, taking too long to shutdown)
Nevermind the fact that if you really want to touch another process's memory there IS a way to do it...
And the preceding example is just hilarious. But hey "it works on my machine! it must be your fault!!11"
It was similar shenanigans when a lot of Windows 95/98 "stopped working" when Windows 2000/XP worked. "What do you mean I can't write to C:/Windows whenever I want? What do you mean I can't put my config option in some hidden corner of the system registry?"
sigh