CompactMem (stub)

This commit is contained in:
Kelvin Sherlock 2013-02-15 00:08:22 -05:00
parent 6ffa214713
commit 05d7518d98
3 changed files with 29 additions and 0 deletions

View File

@ -124,6 +124,27 @@ namespace MM
return 0;
}
uint32_t CompactMem(uint16_t trap)
{
// todo -- add function to check pool for largest block?
/*
* on entry:
* D0: cbNeeded (long word)
*
* on exit:
* D0: function result (long word)
*
*/
uint32_t cbNeeded = cpuGetDReg(0);
fprintf(stderr, "%04x CompactMem(%08x)\n", trap, cbNeeded);
return 0x0f0000;
}
uint16_t DisposePtr(uint16_t trap)
{
/*

View File

@ -14,6 +14,7 @@ namespace MM
bool Init(uint8_t *memory, uint32_t memorySize, uint32_t reserved);
uint16_t BlockMove(uint16_t trap);
uint32_t CompactMem(uint16_t trap);
uint16_t DisposePtr(uint16_t trap);
uint16_t DisposeHandle(uint16_t trap);
@ -21,4 +22,6 @@ namespace MM
uint16_t NewHandle(uint16_t trap);
}
#endif

View File

@ -58,6 +58,11 @@ namespace ToolBox {
d0 = MM::BlockMove(trap);
break;
// CompactMem (cbNeeded: Size) : Size;
case 0xa04c:
d0 = MM::CompactMem(trap);
break;
// ReadDateTime (VAR sees: LONGINT) : OSErr;
case 0xa039: