From WikiTI
Jump to: navigation, search


Official Name: FlashToRAM

BCALL Address: 5017

Copy data to RAM from Flash. If during copying HL is incremented to 8000h, it advances to the next page and resets HL to 4000h. This uses a RAM stub copied to 8100h.

However, if you pass an HL greater than or equal to 8000h, it just does LDIR. So be sure to check HL if you add an offset to address in flash. However, this routine is perfect for checking the header of an object without caring whether it's in RAM or flash. (Though it isn't very fast.)

This routine masks the page in A to a page number that is valid for the current model. For example, if you ask for data on page 7D, it will mask A to 3D on the TI-84+ and 1D on the TI-83+ (because asking for 7D on the TI-83+ would otherwise return RAM).


  • A = page of Source
  • HL = source address
  • DE = destination address
  • BC = number of bytes to copy


  • HL advanced by BC bytes
  • DE advanced by BC bytes
  • BC = 0
  • Warning: A does not equal the page it finished copying from. (It equals the page in port 6 before.)


  • A


On the TI-84+ non-SE, this routine will not let you read from pages equal to or above 80h (it does AND 3Fh).