Difference between revisions of "83Plus:BCALLs:43CF"

From WikiTI
Jump to: navigation, search
(New page: PushMCplx PushMCplx 43CF - PushMCplx == Synopsis == '''Official Name''':...)
 
(No difference)

Latest revision as of 15:35, 23 September 2009

Synopsis

Official Name: PushMCplx (see warning below)

BCALL Address: 43CF

Push a complex number onto the top of the Floating Point Stack.

Inputs

  • HL = address of a complex number in 22-byte format

Outputs

  • FPS1 = real part
  • FPST = imaginary part

Destroys

  • AF, BC, DE, HL

Comments

When storing a complex number on the FPS, the real part is pushed first and the imaginary part second.

Note that unlike routines such as PushOP1, this routine always pushes two floating-point numbers regardless of the data type. Also note that this routine expects its input to be in 22-byte (extended precision) format, rather than the more common 18-byte format. Only the first 9 bytes of each component will be pushed on the FPS, of course.

An error is thrown if there is not enough memory. Temporary variables may be deleted if necessary.

Warning: The official header file from TI, ti83plus.inc, contains the following incorrect definition:

_PushMCplxO1 EQU 43CFh ; this is WRONG!

(See PushMCplxOP1.)