****** Check Agnus/Led/Lenght by Patrick Huitema (c) 1989 ******
****** Comment updated a bit for U.G.A Newsflash in 1992  ******

* It's not a very Commodore Amiga friendly source, but it works !
* Some error message's could be added, but thats your job
* If you can (yes its possible) it better, send the update to U.G.A


* Stop the trashwork ! .. buy PowerMenu !


Check:
	move.l	#0,Screenlength		; Clear Screenlenght
	move.l	#0,Fatagnus		; Clear Fatagnus
	move.l	#0,Led          	; Clear Led

LenghtCheck:
	movea.l	$0004,a6		; Lets find the EXECBASE
	lea	graph,a1		; Graphics.library to A1 
	jsr	-$0198(a6)		; Open it
	movea.l	d0,a1			; Move graphics adress to a1
	move.w	$00d8(a1),Screenlength	; Move the screenlenght 
AgnusCheck:
	move.w	$00dff004,d0		; Move Adress value to d0
	andi.w	#$2000,d0		; Check a BIT of d0
	cmp.l	#0,d0			; Is it the NORMAL angus ?
	beq	ledcheck		; Yep .. lets check your led
	move.b	#1,Fatagnus		; Nop .. Ok set Fatagnus to 1
LedCheck:
	move.l	#0,d1			; set Led Off (0) in d1
	btst	#1,$00bfe001		; check if your Led is on
	bne	quit			; Nop .. All done, so lets quit 
	move.b	#1,Led			; Yes .. Set Led to 1
quit:
	rts				; End off source

* Here are the value's your need 

Screenlength:	dc.l 0
Fatagnus:	dc.l 0
Led:		dc.l 0
graph:		dc.b "graphics.library",0


* end of soure ..... end of the netherland .... the beginning of euro 92.
* 			Patrick Huitema
* 			  Molenweg 162
* 			 8012 WR Zwolle
* 			+31 (0)38 213524

