mirror of
https://github.com/ksherlock/mpw.git
synced 2025-02-26 03:29:06 +00:00
MM::GetZone/SetZone
This commit is contained in:
parent
fafc1b6cd8
commit
e40bd303f2
@ -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;
|
||||
}
|
||||
|
||||
}
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user