From WikiTI
Revision as of 22:53, 4 October 2013 by FloppusMaximus (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Unofficial Name: GetLToOP1Arc

BCALL Address: 517Ch

Minimum OS Version: 2.30

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


  • 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)


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


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


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.