TempFreeMem

This commit is contained in:
Kelvin Sherlock 2014-12-18 14:40:03 -05:00
parent 304dcda66c
commit 84fdeb116f
3 changed files with 16 additions and 2 deletions

View File

@ -1504,9 +1504,19 @@ namespace MM
if (address) memoryWriteLong(0, address);
ToolReturn<4>(sp, mplite_maxmem(&pool));
SetMemError(0); // not sure if this is correct. oh well.
return 0;
return SetMemError(0);
}
uint16_t TempFreeMem(void)
{
// FUNCTION TempFreeMem: LongInt;
Log(" TempFreeMem()\n");
ToolReturn<4>(-1, mplite_freemem(&pool));
return SetMemError(0);
}
}

View File

@ -88,6 +88,7 @@ namespace MM
// OS Dispatch
uint16_t TempMaxMem(void);
uint16_t TempFreeMem(void);
}

View File

@ -65,6 +65,9 @@ namespace ToolBox {
case 0x0015:
return MM::TempMaxMem();
case 0x0018:
return MM::TempFreeMem();
default:
fprintf(stderr, "OSDispatch: selector %04x not implemented\n",
selector);