home *** CD-ROM | disk | FTP | other *** search
/ Compendium Deluxe 1 / LSD Compendium Deluxe 1.iso / a / programming / assembly / alert.lha / alert.s < prev    next >
Encoding:
Text File  |  1994-06-05  |  875 b   |  64 lines

  1.  
  2.     ;how to do system alerts by Shagratt/LSD
  3.  
  4.     Section    ddp,CODE
  5.  
  6.     OPT    c-,o+,w-
  7.     
  8.     ***** includes *****
  9.     
  10.     Incdir    "dh0:Include/"
  11.     Include    "Exec/Exec_Lib.i"
  12.     include    "intuition/intuition_lib.i"
  13.  
  14.  
  15.     ***** MACROS *****
  16.  
  17. alert_text    MACRO
  18.     dc.w    320-((\1)*4)    ; x co-ords
  19.     dc.b    \2        ; y co-ord
  20. down    SET down+10
  21.         ENDM
  22.     
  23.     ***** PROGRAM *****
  24.  
  25. Start    Lea    intName,a1
  26.     Clr.l    d0
  27.     CALLEXEC    OpenLibrary
  28.     Move.l    d0,_IntuitionBase
  29.     Beq    Error
  30.  
  31.     move.l    #0,d0
  32.     move.l    #alert_string,a0
  33.     move.l    #alert_size,d1
  34.  
  35.     callint    displayalert
  36. error:    moveq    #0,d0
  37.     rts
  38.     
  39.     *---------------------------------------*
  40.  
  41. intname:        INTNAME
  42. _intuitionbase:    dc.l    0
  43.  
  44.     *---------------------------------------*
  45.  
  46. alert_string:
  47.  
  48. down SET    20
  49.  
  50.     alert_text (.a2-.a1),down
  51. .a1    dc.b    "Can't open REQTOOLS.Library",0
  52. .a2    dc.b    0    ; another line
  53.     
  54.     dc.b    0
  55.     even
  56.  
  57. alert_size    = down+5
  58.     
  59.     *---------------------------------------*
  60.  
  61.     end
  62.     
  63.  
  64.