83Plus:BCALLs:517C
From WikiTI
Revision as of 21:53, 4 October 2013 by FloppusMaximus (Talk | contribs)
Synopsis
Unofficial Name: GetLToOP1Arc
BCALL Address: 517Ch
Minimum OS Version: 2.30
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.) Of course, you can use variables that are stored "archive-style" in the extra RAM pages by passing B > 80h, though I don't know why you'd want to.