Does the P of M98 carry the O of the subprogram?+−
No. You write the number alone: to call O1000 you write M98 P1000. Leading zeros are ignored, so P1 calls O0001. On some old Fanucs the P takes eight digits because the first four are the repeats.
How do I repeat a subprogram several times?+−
With L: M98 P1000 L4 runs it four times in a row. On the Fanucs that use the eight digit P, P00041000 does the same. For the repeat to be worth anything, there has to be some incremental move inside the subprogram; otherwise the four passes repeat the same path.
What is the difference between M98 and the Haas M97?+−
M98 calls another program stored separately in the control memory. M97 P calls an N block inside the same program, so everything lives in a single file. M97 is handier for short programs and avoids losing the subprogram when you copy the program to another machine; M98 is the standard and works on any control.
How many subprograms can be nested?+−
It depends on the control: Fanuc usually allows four levels of nesting and other controls allow more. It is a limit nobody remembers until the alarm goes off, so as a shop rule it pays not to go past two or three levels even if the machine takes more.
What is an M99 in the main program for?+−
To make the program start over by itself, in a loop. It is used on machines with a bar feeder or with automation, where the next part comes in on its own. The normal thing is to write it with the block delete slash in front, so the operator can break the loop from the panel at the end of the part in progress.