Oh, man, using DEBUG to mess around with the system binaries was my JAM when I was 13, 14 years old. I would put new messages in, cheat at Prince of Persia on the school's computers by patching the save file, all sorts of malarkey.
I discovered that my computer's 80186 processor had onboard features that no other x86 processor had: among them, three onboard very high resolution timers. I used one of those timers and a very tight loop to toggle the speaker with a sort of PWM to make it play at different volumes. I didn't really know what I was doing, I should have timed the various instructions and adjusted the timer delay so I could tune the speaker to different frequencies. But I got within spitting distance of being able to play music with some degree of timbre and even polyphony on that thing, which it wasn't designed to do!