home *** CD-ROM | disk | FTP | other *** search
/ Archive Magazine 1996 / ARCHIVE_96.iso / discs / shareware / share_46 / sasm / Demo / Subs < prev   
Text File  |  1994-03-22  |  1KB  |  28 lines

  1.  
  2.         ;============================================
  3.         ; Opens an 'error' box and displays a message
  4.         ; Enter with r1 holds message number, 1st = 0
  5.         ;============================================
  6. .report         ;note '00' dummy local label so 'adr' can be used with '20'
  7. .00     adr r0,20                       ;point to list of messages
  8. .01     subs r1,r1,#1
  9.         bmi 10                          ;when r1 <0 message found
  10.         add r0,r0,#3                    ;point past 4 zero bytes
  11. .02     ldrb r2,[r0,#1]!                ;look for end of message
  12.         cmp r2,0
  13.         bne 02
  14.         bal 01
  15.  
  16.         ;---- r0 now points to message block -----
  17. .10     adrl r2,title                   ;r2 points to task title string
  18.         mov r1,17                       ;don't use 'Error from' and provide 'OK' box
  19.         swi Wimp_ReportError
  20.         bal poll_loop                   ;back to the loop
  21.  
  22.         ;---- Error messages -----
  23. .20     dd 0 : db "You clicked on the first item on the menu."
  24.         dd 0 : db "That was the second menu item."
  25.         dd 0 : db "You used SELECT on the icon."
  26.         dd 0
  27.         align
  28.