Descend into Agahnim's tower and defeat his minions with the Master Sword. You get three magic spells per battle, can choose how strong Link's armor is, and can heal a few times when things get rough.
Left and right arrow keys to move, Space to swing your sword, Up to heal.