StripAddress

This commit is contained in:
Kelvin Sherlock 2013-02-25 17:33:26 -05:00
parent c5f07d4706
commit feed83ebf0
3 changed files with 31 additions and 0 deletions

View File

@ -553,4 +553,29 @@ namespace MM
return 0;
}
#pragma mark -
uint32_t StripAddress(uint16_t trap)
{
/*
* on entry:
* d0 Address to strip
*
* on exit:
* D0 Address that has been stripped.
*
*/
// TODO -- in 32-bit mode, this is a nop.
// have a --24 / --32 flag?
uint32_t address = cpuGetDReg(0);
Log("%04x StripAddress(%08x)\n", trap, address);
address &= 0x00ffffff;
return address;
}
}

View File

@ -52,6 +52,8 @@ namespace MM
uint16_t MoveHHi(uint16_t trap);
uint32_t StripAddress(uint16_t trap);
}

View File

@ -101,6 +101,10 @@ namespace ToolBox {
d0 = MM::CompactMem(trap);
break;
case 0xa055:
d0 = MM::StripAddress(trap);
break;
// MoveHHi (h: Handle);
case 0xa064:
d0 = MM::MoveHHi(trap);