mirror of
https://github.com/ksherlock/mpw.git
synced 2025-01-23 12:32:12 +00:00
SetToolTrapAddress
This commit is contained in:
parent
bd3e540b89
commit
061c025e02
@ -1109,6 +1109,32 @@ namespace OS
|
||||
return MacOS::dsCoreErr;
|
||||
}
|
||||
|
||||
uint16_t SetToolTrapAddress(uint16_t trap)
|
||||
{
|
||||
//pascal void SetToolTrapAddress(long trapAddr, short trapNum);
|
||||
|
||||
/*
|
||||
* on entry:
|
||||
* A0 Address of patch
|
||||
* D0 trap number
|
||||
*
|
||||
* on exit:
|
||||
*
|
||||
*/
|
||||
|
||||
// this is used by the far model stub, presumably
|
||||
// to replace LoadSeg.
|
||||
|
||||
uint16_t trapNumber = cpuGetDReg(0);
|
||||
uint32_t trapAddress = cpuGetAReg(0);
|
||||
|
||||
Log("%04x SetToolTrapAddress($%08x, $%04x)\n",
|
||||
trap, trapAddress, trapNumber);
|
||||
|
||||
|
||||
return MacOS::dsCoreErr;
|
||||
}
|
||||
|
||||
uint16_t GetOSTrapAddress(uint16_t trap)
|
||||
{
|
||||
/*
|
||||
|
@ -81,6 +81,8 @@ namespace OS
|
||||
#pragma mark - Trap Manager
|
||||
|
||||
uint16_t GetToolTrapAddress(uint16_t trap);
|
||||
uint16_t SetToolTrapAddress(uint16_t trap);
|
||||
|
||||
uint16_t GetOSTrapAddress(uint16_t trap);
|
||||
|
||||
#pragma mark - Alias Manager
|
||||
|
@ -148,6 +148,10 @@ namespace ToolBox {
|
||||
d0 = OS::GetToolTrapAddress(trap);
|
||||
break;
|
||||
|
||||
case 0xa647:
|
||||
d0 = OS::SetToolTrapAddress(trap);
|
||||
break;
|
||||
|
||||
case 0xA346:
|
||||
d0 = OS::GetOSTrapAddress(trap);
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user