home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / prog / source / except.lha / TestNull.a < prev    next >
Text File  |  1992-08-12  |  856b  |  27 lines

  1. *********************************************************************************
  2. *                                        *
  3. *    TestNull -- Test program for forcing out a division by zero exception    *
  4. *                                        *
  5. *    $VER: TestNull.a 37.1 (12.8.92) -- Exception #5 handler test example    *
  6. *                                        *
  7. *    Copyright (C) 1992 Compos Mentis Software Systems -- Jesper Kehlet    *
  8. *                                        *
  9. *********************************************************************************
  10.  
  11.         include        'dos/dos.i'
  12.  
  13.         section        TestNull,code
  14.  
  15. *********************************************************************************
  16. *                                        *
  17. *    This is the main stuff -- the nasty exception provocateur        *
  18. *                                        *
  19. *********************************************************************************
  20.  
  21.         moveq        #0,d0            ; Denominator must be zero
  22.         divu        d0,d1            ; Trap it...
  23.  
  24.         rts                    ; If we get here, it's OK
  25.  
  26.         end
  27.