I'm sorry, that's not correct. You can copyright a play because it has a script; the public performance is a specific (copy)right granted on the script. You can also separately copyright a recording of a play.
The main thing is there has to be a specific thing that is copyable. Or more accurately, (U.S.) copyright protects against copying an original work of authorship fixed in tangible medium of expression.
A protocol is not a set of questions and answers, but a mechanism to generate responses. It's literally a machine. Its output changes with every input. Therefore, it's patentable, but is it copyrightable?
You can copyright the software underlying it. You can copyright a transcript of a session of the protocol. You can copyright a technical specification of the protocol.
But because a protocol fails several qualities of "an original work of authorship fixed in a tangible medium of expression", it is not copyrightable.
An interesting and overlapping area are generative works like board games. Take for instance Magic the Gathering or Settlers of Catan. Are they copyrightable?
The answer is more interesting than you might think.
However, the rules, board game, cards, etc. are copyrightable. Does that mean I could make a million billion dollars selling Pioneers of Penzance by directly knocking off Settlers of Catan? No! If the new rules, board, cards are substantially similar to Settlers of Catan, I'd be in trouble.
so a print command that takes a format argument and outputs a string is copyright able - a send command that takes an argument and transfers a string isn't ?