dtgreene: (except that the music keeps playing).)
toxicTom: Multi threading ftw. Or Titanic...
Actually, since the game runs on a Game Boy, which has an 8-bit microprocessor (a Z80 variant, to be precise), and runs without an OS, multi-threading is unlikely.
It's far more likely that the game plays its music in an interrupt service handler that is called a certain number of times per second, regardless of what's going on (unless the game code specifically disables interrupts, which evidently doesn't happen in the game's division routine).
By the way, the original Super Mario Bros. runs almost entirely from an interrupt service handler; the main program just initializes the higher score and a few other things, sets up the ISR, and then loops forever.
Edit: I found a disassembly of the game online, checked, and iit appears that the music code runs in the vblank interrupt, after the display is updated (in other words, once every frame, regardless of what the main program is doing).