Ammoniac resin is a white to yellow resin with a characteristic odor similar to burgundy resin. It is obtained from the plant Dorema ammoniacum which is common in Persia. It can be dissolved in water to make a sizing for gold leaf. A method for making Gum Ammoniac emulsion can be found here page1 (johnnealbooks.com). It is also used as an ink in calligraphy. When soaked in hot water it will yield a milky substance used by calligraphers for gilding.
It can also be used for making varnishes. It can also be used as an incense.