
#include <MixedMode.h>
#include <ATA.h>
#define RESULT_OFFSET(type) ((sizeof(type) == 1) ? 3 : ((sizeof(type) == 2)
? 1 : 0))
#define TBTrapTableAddress(trapNum) (((trapNum & 0x03FF) << 2) + 0xE00)
pascal SInt16 ataManager(ataPB *pb)
{
#ifdef applec
#if sizeof(SInt16) > 4
#error "Result types larger than 4 bytes are not supported."
#endif
#endif
long private_result;
private_result =
CallUniversalProc(*(UniversalProcPtr*)TBTrapTableAddress(0xAAF1),
kPascalStackBased
| RESULT_SIZE(SIZE_CODE(sizeof(SInt16)))
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(pb))),
pb);
return *(((SInt16*)&private_result) + RESULT_OFFSET(SInt16));
}
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help