MM::GetZone/SetZone

This commit is contained in:
Kelvin Sherlock 2013-06-26 23:50:08 -04:00
parent fafc1b6cd8
commit e40bd303f2
3 changed files with 47 additions and 0 deletions

View File

@ -979,6 +979,7 @@ namespace MM
return address;
}
#pragma mark - zone
uint16_t HandleZone(uint16_t trap)
{
// FUNCTION HandleZone (h: Handle): THz;
@ -1007,4 +1008,41 @@ namespace MM
return SetMemError(0);
}
uint16_t GetZone(uint16_t trap)
{
// FUNCTION GetZone: THz;
/*
* on entry:
*
* on exit:
* A0 Pointer to current heap zone
* D0 Result code
*/
Log("%04x GetZone()\n", trap);
cpuSetAReg(0, 0);
return 0;
}
uint16_t SetZone(uint16_t trap)
{
// PROCEDURE SetZone (hz: THz);
/*
* on entry:
* A0 Pointer to new current heap zone
*
* on exit:
* D0 Result code
*/
uint32_t THz = cpuGetAReg(0);
Log("%04x SetZone(%08x)\n", trap, THz);
return 0;
}
}

View File

@ -68,6 +68,8 @@ namespace MM
uint32_t StackSpace(uint16_t trap);
uint16_t HandleZone(uint16_t trap);
uint16_t GetZone(uint16_t trap);
uint16_t SetZone(uint16_t trap);
}

View File

@ -203,6 +203,13 @@ namespace ToolBox {
case 0xa9e3:
d0 = MM::PtrToHand(trap);
case 0xa11a:
d0 = MM::GetZone(trap);
break;
case 0xa01b:
d0 = MM::SetZone(trap);
break;
case 0xa126:
d0 = MM::HandleZone(trap);