h6. [[FPEmulator]] h6(. » [[FPEmulator SWI Calls|SWI Calls]] h6((. » FPEmulator_SaveContext h2. FPEmulator_SaveContext h5. (SWI &40489) |_<^{width:4em}. Entry | | |<^. R0 |<^. Pointer to [[Floating Point Contexts|context]] (-2 for current context) | |<^. R1 |<^. Pointer to 25-word area as described under [[FPEmulator_SaveContext]] | |<^. R2 |<^. PC value associated with the context | |_<^{width:4em}. Exit | | |<^. R0 |<^. non-zero if there is a pending or incompletely processed exception associated with the context, zero if there isn't | h4(#format). Output Format |_<^{width:4em}. Offset |_<^. Value | |<^. 0 |<^. FPSR value | |<^. 4 |<^. F0 value, as an extended precision number | |<^. 16 |<^. F1 value, as an extended precision number | |<^. 28 |<^. F2 value, as an extended precision number | |<^. 40 |<^. F3 value, as an extended precision number | |<^. 52 |<^. F4 value, as an extended precision number | |<^. 64 |<^. F5 value, as an extended precision number | |<^. 76 |<^. F6 value, as an extended precision number | |<^. 88 |<^. F7 value, as an extended precision number | h4. Use The purpose of this call is to save the register and FPSR values held in a floating point context to a specified 25-word area of memory. h4. Notes Note that it does this without processing any pending exceptions associated with the context, or completing the processing of any exception which is currently being processed. The routine returns a hint about whether there is a pending or incompletely processed exception associated with the context: if there is, the values returned may be rather odd and should not be relied upon as an accurate reflection of reality. For instance, if the FPA has a pending overflow exception, the destination register of the instruction concerned will often read as containing a very small number! This call might be used by a debugger to view the current FP register contents. The PC value passed in would then be the address at which execution was interrupted - it is used to detect whether the floating point system was interrupted in the middle of processing an exception. [[Floating Point Contexts|Contexts]] are only available from FPEmulator 4.12 and later. This call did not work correctly until version 4.17 of the [[FPEmulator]] module. h4. See also * [[Floating Point Contexts]] * [[FPEmulator_InitContext]] * [[FPEmulator_LoadContext]]