Gatorsail is correct. Here is the language from US Army FM 3-21.5:
"Whenever and wherever the United States National Anthem, “To the Color,” “Reveille,” or “Hail to the Chief’ is played, at the first note, all dismounted personnel in uniform and not in formation face the flag (or the music, if the flag is not in view), stand at Attention, and render the prescribed Salute. The position of Salute is held until the last note of the music is sounded."
USC Title 36 has simlar language:
"During a redition of the national anthem . . . individuals in uniform should give the military salute at the first note of the anthem and maintain that position until the last note . . ."
Peter Ansoff