The source code of the classic Apple II game Prince of Persia has been published on GitHub by Jordan Mechner, the original author. The game, which was first published by Broderbund in 1989, was developed in 6502 assembly. With the help of Apple II enthusiast Tony Diaz, the code was recovered recently from a 22-year old floppy disk.

In addition to releasing the original code, Mechner has also published a 30-page reference document from October 1989 that describes some of the game’s underlying technical details. At the time, the document was written for the benefit of developers who were porting the game to other platforms.

Although the source code of the game is now available to study, modify, and run, it’s technically not open source software. Ubisoft still holds exclusive distribution rights for the franchise. The code is being made available largely for historical purposes.

Mechner has remained involved with the franchise over the years and served as a screenwriter and producer for the 2010 film adaption. Readers who are interested in learning more about Mechner’s experiences creating the game might want to check out his developer journals, which he published in e-book format last year.