We learnt from the software's documentation. Books, or Help documentation. I remember knowing by-heart the entire contents of the GWBASIC manual, and thus, every BASIC statement's syntax (I used to code in Basic those days). I also remember poring through the BIOS listing of the IBM PC to help me write my first Terminate-and-Stay-Resident (TSR) program on DOS.
Later, when using Microsoft Foundation Classes (MFC), we had its documentation installed in Visual C++, so the entire API was available, searchable, on the desktop. As a matter of fact, even in the internet era, I have done this: downloaded the entire PostgreSQL manual as multiple HTMLs, and serve it off my apache on localhost.
It worked. The only downside was that you couldn't get ready-made recipes of "how to do XXX". You had to know your subject thoroughly, and you made your own recipes.