84PCSE:BCALLs:515E

From WikiTI
Jump to: navigation, search

Synopsis

Unofficial Name: GetLToOP1Arc

BCALL Address: 515Eh

Retrieve a given element of a list variable, which may be archived.

Inputs

  • HL = index of element
  • DE = address of start of variable (as returned by FindSym/ChkFindSym)
  • B = Flash page (if variable is archived) or zero (if variable is in RAM)

Outputs

  • OP1 = real part of value
  • If complex, OP2 = imaginary part of value

Destroys

  • AF, BC, DE, HL
  • arcPage, arcPtr

Comments

This is the enhanced version of GetLToOP1, and like that routine, it won't check that the list actually contains the given number of elements.

Amusingly, this routine also makes an attempt to support variables stored in the extra RAM pages (signified by DE > 8000h and B > 0.) Unfortunately, it doesn't work, and in fact will crash in this case (although it might be made to work by monkeying with ports 27 and 28.)