You can now get your hands on the source code of version 1.0.1 of Photoshop from 1990 for absolutely nothing. Adobe Systems Inc. has given the Computer History Museum permission to distribute the code with the exception of the MacApp applications library that was licensed from Apple. Adobe has worked with the Computer History Museum in the past giving MacPaint away back in 2010.
The zip file contains 179 files, consisting of 128,000 lines of code and by line count around 75% of the code is in Pascal, about 15% is in 68000 assembler language, and the rest is various sorts of data.
Of course, version 1 is very primitive compared to today"s standards so it may not be of much use to most, but you can"t really moan about free.
You can go get it right now at the Computer History Museum website but the source code is for non-commercial use only and all you need to do is accept the terms of license.
Source: Computer History Museum