mirror of
https://github.com/ksherlock/mpw.git
synced 2025-01-03 04:30:32 +00:00
StripAddress
This commit is contained in:
parent
c5f07d4706
commit
feed83ebf0
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -52,6 +52,8 @@ namespace MM
|
||||
|
||||
uint16_t MoveHHi(uint16_t trap);
|
||||
|
||||
uint32_t StripAddress(uint16_t trap);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user