This commit is contained in:
Kelvin Sherlock 2013-02-19 18:28:29 -05:00
parent 0d165d9525
commit bf47a41ecc
3 changed files with 30 additions and 0 deletions

View File

@ -201,6 +201,29 @@ namespace MM
return 0x0f0000;
}
uint16_t MoveHHi(uint16_t trap)
{
/*
* on entry:
* A0: Handle to move
*
* on exit:
* D0: Result code.
*
*/
uint32_t theHandle = cpuGetAReg(0);
Log("%04x MoveHHi(%08x)\n", trap, theHandle);
// check if it's valid.
auto iter = HandleMap.find(theHandle);
if (iter == HandleMap.end()) return SetMemError(memWZErr);
return SetMemError(0);
}
#pragma mark Pointers

View File

@ -45,6 +45,9 @@ namespace MM
uint16_t HLock(uint16_t trap);
uint16_t HUnlock(uint16_t trap);
uint16_t MoveHHi(uint16_t trap);
}

View File

@ -84,6 +84,10 @@ namespace ToolBox {
d0 = MM::CompactMem(trap);
break;
// MoveHHi (h: Handle);
case 0xa064:
d0 = MM::MoveHHi(trap);
break;
// ReadDateTime (VAR sees: LONGINT) : OSErr;
case 0xa039: