Answer:
The code has since been described as Charlemagne's Code of Chivalry. The Song of Roland was written between 1098-1100 and described the betrayal of Count Roland at the hand of Ganelon. Roland was a loyal defender of his liege Lord Charlemagne and his code of conduct became understood as a code of chivalry.