Difference between revisions of "83Plus:BCALLs:42FD"
From WikiTI
(Quickly putting a page. Borrowed template from MemChk.) |
m (→Example: somewhat more useful example) |
||
(One intermediate revision by the same user not shown) | |||
Line 5: | Line 5: | ||
'''BCALL Address:''' 42FD | '''BCALL Address:''' 42FD | ||
− | Checks if | + | Checks if a given amount of RAM is available. This routine will also attempt to free RAM that is taken by temporary variables that have been marked dirty but not yet deleted. |
=== Inputs === | === Inputs === | ||
Line 21: | Line 21: | ||
== Example == | == Example == | ||
− | <nowiki>B_CALL EnoughMem</nowiki> | + | <nowiki>ld hl,9 |
+ | B_CALL EnoughMem | ||
+ | jr c,NotEnoughMem</nowiki> |
Latest revision as of 13:28, 21 July 2007
Synopsis
Official Name: EnoughMem
BCALL Address: 42FD
Checks if a given amount of RAM is available. This routine will also attempt to free RAM that is taken by temporary variables that have been marked dirty but not yet deleted.
Inputs
- HL = amount of RAM to check for being available
Outputs
- DE = amount of RAM to check for being available
- Carry set if there is insufficient RAM available
Destroys
- All
Remarks
No error is generated.
Example
ld hl,9 B_CALL EnoughMem jr c,NotEnoughMem