I've been thinking about it and I don't remember anything like that for the army. We just had to know the Code of conduct for members of the armed forces of the United States. Especially Article I. We were asked that one a lot. I still have the wallet card I got in basic training in '79. The wording has been changed since then but this is the version I knew.
1. I am an American fighting man. I serve in the forces which guard my country and our way of life. I am prepared to give my life in their defense.
2. I will never surrender of my own free will. If in command, I will never surrender my men while they still have the means to resist.
3. If I am captured, I will continue to resist by all means available. I will make every effort to escape and aid others to escape. I will accept neither parole nor special favors from the enemy.
4. If I become a prisoner of war, I will keep faith with my fellow prisoners. I will give no information, or take part in any action which might be harmful to my comrades. If I am senior, I will take command. If not, I will obey the lawful orders of those appointed over me and will back them up in every way.
5. When questioned, should I become a prisoner of war, I am bound to give name, rank, service number, and date of birth. I will evade answering further questions to the utmost of my ability. I will make no oral or written statements disloyal to my country and its allies or harmful to their cause.
6. I will never forget that I am an American fighting man, responsible for my actions, and dedicated to the principles which made my country free. I will trust in my God and in the United States of America.