a system and method providing a programmable hardware device within a cpu . the programmable hardware device permits a plurality of instructions to be trapped before they are executed . the instructions that are to be trapped are programmable to provide flexibility during cpu debugging and to ensure that a variety of application programs can be properly executed by the cpu . the system must also provide a means for permitting a trapped instruction to be emulated and / or to be executed serially . related applications