------------------------------------------------------------------------
             Alert ... Created for UGA PD by Brian Postma
------------------------------------------------------------------------
start:	move.l		4,a6		;Execbase
	lea		intname,a1	;Library Name
	jsr		-408(a6)	;Open Library
	move.l		d0,intbase	;Library Base
	lea		dosname,a1	;Library Name
	jsr		-408(a6)	;Open Library
	move.l		d0,dosbase

	move.l		dosbase,a6	;fetch handle from current
	jsr		-60(a6)		;Output device->CLI
	move.l		d0,handle	;And save it
	move.l		intbase,a6
	move.l		#0,d0		;Alert Number
	move.l		#64,d1		;Alert Height
	lea		alert,a0	;Alert Text
	jsr		-90(a6)		;Display alert
	tst.b		d0		;Left or Right Button
	beq		right		;Right Mousebutton ??
left:	move.l		#lefttext,d2	;Buffer
	move.l		#el-lefttext,d3	;Length
	bra		text
right:	move.l		#righttext,d2	;Buffer
	move.l		#er-righttext,d3;Length
text:	move.l		handle,d1	;Output Handle
	move.l		dosbase,a6
	jsr		-48(a6)		;Write (to CLI)
quit:	clr.l		d0
	rts
;Vars
handle:		dc.l	0
dosbase:	dc.l	0
intbase:	dc.l	0
lefttext:	dc.b	"You pressed the LEFT mouse button",10,10
el:
righttext:	dc.b	"You pressed the RIGHT mouse button",10,10
er:
x1 = 236
y1 = 16
x2 = 240
y2 = 32
x3 = 184
y3 = 48
alert:	dc.b	x1/256,x1,y1,"Created for UGA PD by",0,1
	dc.b	x2/256,x2,y2,"Brian Postma in 1989",0,1
	dc.b	x3/256,x3,y3,"Press any mouse button to continue",0,0
; 0,1 means: there is more text coming,
; 0,0 means: end of all alert data.

intname:	dc.b	"intuition.library",0
dosname:	dc.b	"dos.library",0
------------------------------------------------------------------------
<Welcome>

This program demonstrates how to create your own alert-boxes. It shows
how you can test which mouse button was pressed during the alert and it
also shows how to display text on the CLI window.

Assemble this program with seka (type 'r<CR>' to load, 'a<CR><CR> to
assemble and 'j<CR>' to start or 'wo<CR>' to save executable object
file).

For comments, remarks, questions contact me:

Brian Postma
J.v.Hartenstraat 51
7576VX Oldenzaal (NL)
Tel:05410-14763

