mirror of
https://github.com/ksherlock/mpw.git
synced 2024-12-22 00:29:18 +00:00
MaxBlock (SC)
This commit is contained in:
parent
2fb4e67323
commit
caa0b8b74f
@ -294,6 +294,29 @@ namespace MM
|
||||
return mplite_maxmem(&pool);
|
||||
}
|
||||
|
||||
uint32_t MaxBlock(uint16_t trap)
|
||||
{
|
||||
/*
|
||||
* The MaxBlock function returns the maximum contiguous space, in bytes, that you
|
||||
* could obtain after compacting the current heap zone. MaxBlock does not actually
|
||||
* do the compaction.
|
||||
*/
|
||||
|
||||
/*
|
||||
* on entry:
|
||||
* (nothing)
|
||||
*
|
||||
* on exit:
|
||||
* D0: function result (long word)
|
||||
*
|
||||
*/
|
||||
|
||||
Log("%04x MaxBlock()\n", trap);
|
||||
|
||||
SetMemError(0);
|
||||
return mplite_maxmem(&pool);
|
||||
}
|
||||
|
||||
uint32_t FreeMem(uint16_t trap)
|
||||
{
|
||||
// total free memory.
|
||||
@ -312,6 +335,9 @@ namespace MM
|
||||
return mplite_freemem(&pool);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
uint16_t ReserveMem(uint16_t trap)
|
||||
{
|
||||
/*
|
||||
|
@ -27,6 +27,7 @@ namespace MM
|
||||
uint16_t BlockMove(uint16_t trap);
|
||||
uint32_t CompactMem(uint16_t trap);
|
||||
uint32_t MaxMem(uint16_t trap);
|
||||
uint32_t MaxBlock(uint16_t trap);
|
||||
uint32_t FreeMem(uint16_t trap);
|
||||
uint16_t ReserveMem(uint16_t trap);
|
||||
|
||||
|
@ -159,6 +159,10 @@ namespace ToolBox {
|
||||
d0 = MM::StripAddress(trap);
|
||||
break;
|
||||
|
||||
case 0xa061:
|
||||
d0 = MM::MaxBlock(trap);
|
||||
break;
|
||||
|
||||
// MoveHHi (h: Handle);
|
||||
case 0xa064:
|
||||
d0 = MM::MoveHHi(trap);
|
||||
|
Loading…
Reference in New Issue
Block a user