<P> Ferdowsi started writing the Shahnameh in 977 A. D and completed it on 8 March 1010 . The Shahnameh is a monument of poetry and historiography, being mainly the poetical recast of what Ferdowsi, his contemporaries, and his predecessors regarded as the account of Iran's ancient history . Many such accounts already existed in prose, an example being the Abu - Mansuri Shahnameh . A small portion of Ferdowsi's work, in passages scattered throughout the Shahnameh, is entirely of his own conception . </P> <P> The Shahnameh is an epic poem of over 50,000 couplets, written in early Modern Persian . It is based mainly on a prose work of the same name compiled in Ferdowsi's earlier life in his native Tus . This prose Shahnameh was in turn and for the most part the translation of a Pahlavi (Middle Persian) work, known as the X adāynāmag ("Book of Kings"), a late Sassanid compilation of the history of the kings and heroes of Persia from mythical times down to the reign of Khosrau II (590--628). The X adāynāmag contained historical information on the later Sassanid period, but it does not appear to have drawn on any historical sources for the earlier Sassanid period (3rd to 4th centuries). Ferdowsi added material continuing the story to the overthrow of the Sassanids by the Arabs in the middle of the 7th century . </P> <P> The first to undertake the versification of the Pahlavi chronicle was Abu - Mansur Daqiqi, a contemporary of Ferdowsi, poet at the court of the Samanids, who came to a violent end after completing only 1,000 verses . These verses, which deal with the rise of the prophet Zoroaster, were afterward incorporated by Ferdowsi, with acknowledgment, in his own poem . The style of the Shahnameh shows characteristics of both written and oral literature . Some claim that Ferdowsi also used Zoroastrian nasks, such as the now - lost Chihrdad, as sources as well . </P> <P> Many other Pahlavi sources were used in composing the epic, prominent being the Kārnāmag - ī Ardaxšīr - ī Pābagān, which was originally written during the late Sassanid era and gave accounts of how Ardashir I came to power which, because of its historical proximity, is thought to be highly accurate . The text is written in the late Middle Persian, which was the immediate ancestor of Modern Persian . A great portion of the historical chronicles given in Shahnameh is based on this epic and there are in fact various phrases and words which can be matched between Ferdowsi's poem and this source, according to Zabihollah Safa . </P>

Who is the prophet referred to in the shahnama