mirror of
https://github.com/ksherlock/mpw.git
synced 2024-11-21 09:30:55 +00:00
MM::PurgeSpace call
This commit is contained in:
parent
fed6e9b172
commit
91e142446b
@ -1469,4 +1469,20 @@ namespace MM
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32_t PurgeSpace(uint16_t trap)
|
||||
{
|
||||
// PROCEDURE PurgeSpace (VAR total: LongInt; VAR contig: LongInt);
|
||||
|
||||
/*
|
||||
* Registers on exit:
|
||||
* A0 Maximum number of contiguous bytes after purge
|
||||
* D0 Total free memory after purge
|
||||
*/
|
||||
|
||||
Log("%04x PurgeSpace()\n", trap);
|
||||
|
||||
SetMemError(0);
|
||||
cpuSetAReg(0, mplite_maxmem(&pool));
|
||||
return mplite_freemem(&pool);
|
||||
}
|
||||
}
|
||||
|
@ -41,6 +41,7 @@ namespace MM
|
||||
uint32_t MaxBlock(uint16_t trap);
|
||||
uint32_t FreeMem(uint16_t trap);
|
||||
uint16_t ReserveMem(uint16_t trap);
|
||||
uint32_t PurgeSpace(uint16_t trap);
|
||||
|
||||
|
||||
uint16_t DisposeHandle(uint16_t trap);
|
||||
|
@ -263,6 +263,10 @@ namespace ToolBox {
|
||||
d0 = MM::MaxApplZone(trap);
|
||||
break;
|
||||
|
||||
case 0xa162:
|
||||
d0 = MM::PurgeSpace(trap);
|
||||
break;
|
||||
|
||||
// ReadDateTime (VAR sees: LONGINT) : OSErr;
|
||||
case 0xa039:
|
||||
d0 = OS::ReadDateTime(trap);
|
||||
|
Loading…
Reference in New Issue
Block a user