Difference between revisions of "83:ROMCalls:443A"

From WikiTI
Jump to: navigation, search
 
(No difference)

Latest revision as of 13:08, 26 April 2005

Synopsis

Unofficial Name: enoughmem

Call Address: 443A

Returns the amount of free user memory.

Inputs

  • HL : quantity to which you want to compare the current amount of free user memory

Outputs

  • carry flag : set if HL > current free memory

Registers Destroyed

  •  ???

Example

Let's say you need 1000 bytes of free ram as a temporary buffer. At the beginning of your program, you can test of there is enough memory, and stop if there isn't :

 ld hl,1000
 call _enoughmem
 ret c         ; returns to the TI-OS or shell if there is not enough free memory