	incdir "asm:include/"
	include "intuition/intuition.i"
	include "misc/measystart.i"
	move.l	4,a6
	move.l	#iname,a1
	jsr	-408(a6)
	tst.l	d0
	beq	quit2
	move.l	d0,ibase
	move.l	d0,a6
	move.l	ib_firstscreen(a6),a6
	move.l	sc_firstwindow(a6),a6
	move.b	#2,d2
	move.b	#3,d3
fff	move.l	a6,d1
	tst.l	d1
	beq	quit
	move.l	a6,nwin
	cmp.b	d2,d3
	beq	both
back	move.b	d2,wd_detailpen(a6)
	move.b	d3,wd_blockpen(a6)
	add.b	#1,d2
	sub.b	#1,d3
	cmp.b	#0,d3
	blt	a
c	cmp.b	#3,d2
	bgt	b
d	move.l	d1,a6
	jmp	next
a	move.b	#3,d3
	jmp	c
b	move.b	#0,d2
	jmp	d
next	move.l	nwin,a1
	move.l	ibase,a6
	jsr	-456(a6)
	move.l	nwin,a6
	move.l	wd_nextwindow(a6),a6
	jmp	fff
quit	move.l	ibase,a1
	move.l	4,a6
	jsr	-414(a6)
quit2	rts
both	move.b	#3,d2
	move.b	#2,d3
	jmp	back
ibase 	dc.l	0
nwin	dc.l	0
iname	dc.b	"intuition.library",0
