What is the status of the registers when I get control in the parser compared to this?
Class 1 Functions
Class 1 tokens all take some positive number of arguments (zero arguments is a syntax error.) These are separated by commas, or in the case of binary operators, by the operator itself. All of the arguments are evaluated before the function is.
The arguments are placed on the FPS in "reverse" order. That is to say, the earliest argument read is deepest in the stack. The final argument is in OP1. The total number of arguments is passed in HL.
Any of the following data types may be used (except where prohibited by syntax rules): Real, List, Matrix, Equation, String, Complex, Complex List. Real numbers are stored on the stack as floating-point. Complex numbers are stored as two consecutive stack entries or in OP1 and OP2 (see the SDK documentation for Push/Pop OP1/3/5.) Other data types are stored as variable names.
A hook may do any of the following:
Leave all arguments as is, and return Z.
Modify arguments, or add or remove them while updating HL appropriately, and return Z.
Remove all arguments from the FPS, place the result of your computation in OP1, and return NZ.
Remove all arguments from the FPS, reset numOP1,(iy+ParsFlag2), and return NZ. (This is generally preferable if you are not returning a useful value, as it will preserve Ans.)
Im assuming its the same and that I just need to subtract 1 to get my true value in HL?