Difference between revisions of "83Plus:BCALLs:5017"

From WikiTI
Jump to: navigation, search
(Noted that the call works on RAM, too.)
m (It's now fully documented.)
Line 1: Line 1:
 
[[Category:83Plus:BCALLs:By_Name:Memory|FlashToRAM]] [[Category:83Plus:BCALLs:By_Name|FlashToRAM]] [[Category:83Plus:BCALLs:By_Address|5017 - FlashToRAM]]
 
[[Category:83Plus:BCALLs:By_Name:Memory|FlashToRAM]] [[Category:83Plus:BCALLs:By_Name|FlashToRAM]] [[Category:83Plus:BCALLs:By_Address|5017 - FlashToRAM]]
{{missinfo|Destroys}}
 
 
== Synopsis ==
 
== Synopsis ==
 
'''Official Name:''' FlashToRAM
 
'''Official Name:''' FlashToRAM

Revision as of 15:24, 13 November 2012

Synopsis

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

Inputs

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

Outputs

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

Destroys

  • A