home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Archive Magazine 1995
/
ARCHIVE95.iso
/
discs
/
shareware
/
share_46
/
sasm
/
Demo
/
Subs
< prev
Wrap
Text File
|
1994-03-22
|
1KB
|
28 lines
;============================================
; Opens an 'error' box and displays a message
; Enter with r1 holds message number, 1st = 0
;============================================
.report ;note '00' dummy local label so 'adr' can be used with '20'
.00 adr r0,20 ;point to list of messages
.01 subs r1,r1,#1
bmi 10 ;when r1 <0 message found
add r0,r0,#3 ;point past 4 zero bytes
.02 ldrb r2,[r0,#1]! ;look for end of message
cmp r2,0
bne 02
bal 01
;---- r0 now points to message block -----
.10 adrl r2,title ;r2 points to task title string
mov r1,17 ;don't use 'Error from' and provide 'OK' box
swi Wimp_ReportError
bal poll_loop ;back to the loop
;---- Error messages -----
.20 dd 0 : db "You clicked on the first item on the menu."
dd 0 : db "That was the second menu item."
dd 0 : db "You used SELECT on the icon."
dd 0
align