home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 160.lha / StructureBrowser_v1.3 / Sources / header / trap.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-04-27  |  899 b   |  25 lines

  1. #include <exec/tasks.h>
  2.  
  3. struct Task *MyTask, *FindTask();
  4.  
  5. struct TrapData {
  6.    long TrapNum;         /* trap number will be stored here       */
  7.    int (*Code)();        /* pointer to user trap handler function */
  8.    USHORT MLcode[14];    /* trap-handler machine code goes here   */
  9. };
  10.  
  11. struct TrapData MyTrap = {
  12.    0,
  13.    NULL,    /* trap code address will be filled in later */
  14.    0x201F,                 /* MOVE.L  (A7)+,D0        */
  15.    0x41FA, 0xFFF4,         /* LEA     *-$A,A0         */
  16.    0x2080,                 /* MOVE.L  D0,(A0)         */
  17.    0xB0BC, 0x0000, 0x0003, /* CMP.L   #3,D0           */
  18.    0x6202,                 /* BHI.S   *+4             */
  19.    0x504F,                 /* ADDQ.W  #8,A7           */
  20.    0x41FA, 0xFFE8,         /* LEA     *-$16,A0        */
  21.    0x2F50, 0x0002,         /* MOVE.L  (A0),2(A7)      */
  22.    0x4E73                  /* RTE                     */
  23. };
  24.  
  25.