home *** CD-ROM | disk | FTP | other *** search
/ Fish 'n' More 2 / fishmore-publicdomainlibraryvol.ii1991xetec.iso / fish / enhancements / general / noreq / noreq.s < prev    next >
Text File  |  1990-12-14  |  3KB  |  58 lines

  1. ******************************************************************************
  2. *                                                                            *
  3. *                                    NoReq                                   *
  4. *                                                                            *
  5. *                       © Copyright 1990 Jonathan Potter                     *
  6. *                                                                            *
  7. * This is a short (92 byte) utility you can use to turn off the annoying DOS *
  8. * requesters. Running it once turns the requesters off, and running it again *
  9. * turns them back on.                                                        *
  10. *                                                                            *
  11. * The best place that I can see to use this would be around IF statements;   *
  12. * for example :                                                              *
  13. *                                                                            *
  14. * NoReq                             ; Turn requesters off                    *
  15. * If EXISTS DH0:                    ; Check for DH0:.. if not there, DOS     *
  16. *                                   ; would normally throw us a requester    *
  17. *   Execute DH0:S/HD-Startup                                                 *
  18. * EndIf                                                                      *
  19. * NoReq                             ; Turn requesters back on                *
  20. *                                                                            *
  21. * Or if you are diskcopying from DF0: to RAD: for example. DOS normally      *
  22. * throws up a requester, waits a second or so and then takes it away again.  *
  23. * Annoying, so you would run NoReq around the diskcopy command.              *
  24. *                                                                            *
  25. * NoReq can even be made resident, so you can use it hundreds of times in    *
  26. * your startup-sequence without increased disk access.                       *
  27. *                                                                            *
  28. * Enjoy!                                                                     *
  29. *                                                                            *
  30. *                               Jonathan Potter                              *
  31. *                               P.O. Box 289                                 *
  32. *                               Goodwood, SA 5034                            *
  33. *                               Australia                                    *
  34. *                               (08) 2932788                                 *
  35. *                                                                            *
  36. ******************************************************************************
  37.  
  38. _LVOFindTask = -$126
  39. pr_WindowPtr = 184
  40.  
  41. start:
  42.     move.l 4,a6
  43.     lea 0,a1
  44.     jsr _LVOFindTask(a6)           ; Find myself!
  45.     move.l d0,a0
  46.  
  47.     cmp.l #-1,pr_WindowPtr(a0)     ; -1 means show no requesters
  48.     bne hidereq
  49.     move.l #0,pr_WindowPtr(a0)     ; reset to 0 (requesters on Workbench screen)
  50.     bra out
  51.  
  52. hidereq:
  53.     move.l #-1,pr_WindowPtr(a0)    ; Hide the requesters!
  54.  
  55. out:
  56.     moveq #0,d0
  57.     rts                            ; And outahere
  58.