home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / devddemo.zip / BRKPOINT.ASM < prev    next >
Assembly Source File  |  1990-06-11  |  985b  |  33 lines

  1.               PAGE      60,131 ;
  2.               TITLE     GENERIC Device Driver Debug Function
  3. ;******************************************************************************
  4. ;This is a very simple function that executes an INT 3, loads AX with 0 and
  5. ;returns to the caller.  Most debuggers attach to INT 3, so this will cause
  6. ;the debugger to be activated.  The loading if AX with 0 is setting the return
  7. ;value to SUCCESS or 0.
  8. ;******************************************************************************
  9.               .286c                         ;    Must use 286 mode if OS/2
  10. ;
  11. ;
  12. MAINSEG       SEGMENT   WORD PUBLIC 'CODE'
  13.               ASSUME    CS:MAINSEG
  14.               public    _breakpoint
  15.               PAGE
  16. ;
  17. ;
  18. _breakpoint   proc      far
  19. ;
  20. ; breakpoint to debugger
  21. ;
  22.               int       3
  23. ;             nop
  24. ;
  25. ; Return to OS/2
  26. ;
  27.               mov       ax,0
  28.               ret
  29. ;
  30. _breakpoint   endp
  31. MAINSEG       ENDS
  32.               END
  33.