You don't necessarily need Fanuc. The standard for CNC g-code m-code programming is known as the EIA RS-244 standard and was developed originally for use with the punched tape with any CNC machine.
The codes use varies slightly depending on the machine i.e. Plasma, Mill, lathe, EDM etc. but generally they all conform to the the same standard.
There are a whole raft of books out there as well as web based assitance for learning. Two excellent books are Computer Numerical Control Programming by michael Sava & Joseph Pusztai, and Computer Numerical Control by Warren Seames, this last one is printed by SME association. Also if you have access to any machine/controller's programming manual, that will also have all the codes with explanations.