#include "mungal4.h" #pragma hdrstop #include "..\munga\style.h" void* Get_Caller(int level) { char *address; __asm MOV address, EBP; while (level--) { Check_Pointer(address); address = *(char**)address; } Check_Pointer(address); return *(char**)(address+4); } #if defined(USE_ACTIVE_PROFILE) #undef inportb #undef outportb // // table of data representing bits on the parallel port at 0x378 (usually LPT1) // DO NOT ALTER THIS DATA - IT REQUIRES LOTS OF SCHEMATIC TRACING TO DUPLICATE // struct ParallelBit { unsigned int port; Byte mask; int sense; }; ParallelBit Bit_Table[12] = { {0x378, 0x80, 0x00}, {0x378, 0x40, 0x00}, {0x378, 0x20, 0x00}, {0x378, 0x10, 0x00}, {0x37a, 0x08, 0x01}, {0x37a, 0x04, 0x00}, {0x37a, 0x02, 0x01}, {0x37a, 0x01, 0x01}, {0x378, 0x08, 0x00}, {0x378, 0x04, 0x00}, {0x378, 0x02, 0x00}, {0x378, 0x01, 0x00} }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // void BitTrace::SetLineImplementation(Byte line) { Verify(line < ELEMENTS(Bit_Table)); // //------------------------------------------------------------------ // read the current value of the appropriate port //------------------------------------------------------------------ // Byte port_value = inportb(Bit_Table[line].port); // //------------------------------------------------------------------ // set the appropriate bit, taking into account the hardware sense //------------------------------------------------------------------ // if (!Bit_Table[line].sense) { port_value |= Bit_Table[line].mask; } else { port_value &= (Byte)(~Bit_Table[line].mask); } // //------------------------------------------------------------------ // put the modified value into the appropriate port //------------------------------------------------------------------ // outportb(Bit_Table[line].port, port_value); } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // void BitTrace::ClearLineImplementation(Byte line) { Verify(line < ELEMENTS(Bit_Table)); // //------------------------------------------------------------------ // read the current value of the appropriate port //------------------------------------------------------------------ // Byte port_value = inportb(Bit_Table[line].port); // //------------------------------------------------------------------ // clear the appropriate bit, taking into account the hardware sense //------------------------------------------------------------------ // if (!Bit_Table[line].sense) { port_value &= (Byte)(~Bit_Table[line].mask); } else { port_value |= Bit_Table[line].mask; } // //------------------------------------------------------------------ // put the modified value into the appropriate port //------------------------------------------------------------------ // outportb(Bit_Table[line].port, port_value); } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Logical BitTrace::IsLineValidImplementation(Byte line) { return line