execbase:	equ	4
findresident:	equ	-$60
doio:		equ	-$1c8
location:	equ	$50000
org location
load location

dc.b	"DOS",0
dc.l	$0
dc.l	$370
start:
move.w	#$8100,$dff096
move.l	#location,a2
lea.l	blocklong(pc),a3
move.l	(a3),d1
move.l	#0,a3
move.l	#0,d2
checkloop:
bclr	d2,d1
bne	loadthis
add.l	#$0200,a3
addq.l	#1,d2
tst.l	d1
bne	checkloop
bra	fertig_geladen
loadthis:
move.l	execbase,a6
move.w	#2,28(a1)
move.l	a3,44(a1)
move.l	a2,40(a1)
move.l	#$0200,36(a1)
movem.l	d1-d2/a1-a3,-(a7)
jsr	doio(a6)
movem.l	(a7)+,d1-d2/a1-a3
add.l	#$0200,a3
add.l	#$0200,a2
addq.l	#1,d2
tst.l	d0
beq	checkloop
bra	continue_boot
fertig_geladen:
jsr	begin
continue_boot:
move.l	execbase,a6
lea	dosname(pc),a1
jsr	findresident(a6)
tst.l	d0
beq	boot_failed
move.l	d0,a0
move.l	22(a0),a0
moveq	#0,d0
rts
boot_failed:
moveq	#1,d0
rts
dosname:	dc.b	"dos.library",0
blocklong:	dc.l	$00000001
even
begin:
OpenLib=-408
DisplayAlert=-90
CloseLib=-414

run:	move	#1,d1		;flash 7 times
delay0:	move	#5,d2
delay1:	move	#40000,d3
delay2:	dbf	d3,delay2
	dbf	d2,delay1
	bchg	#1,$bfe001	;flash led
	dbf	d1,delay0	;end of flash
strt:	move.l 	4,a6		;execbase
	lea 	intname(pc),a1	;intuition lib
	move.l	#0,d0		;version 0
	jsr 	Openlib(a6)
	cmp.l	#0,d0		;intuition.lib on disk?
	bne.s	cont
	rts			;no so stop
cont:	move.l	d0,a6		;intuitionbase
	move.l	#0,d0	;$80000000 for dead_end_alert
	lea	alert_message(pc),a0 ;message in alert
	move.l	#50,d1		;height in lines
	jsr	DisplayAlert(a6)		
	move.l	a6,a1
	move.l	4,a6		;execbase
	move.l	#0,d0		;no errors
	jsr	CloseLib(a6)	;close library
	move.l	#0,d0		;no errors
	rts
even
intname:dc.b	'intuition.library',0
alert_message:
even
	dc.w	52		;x coordinate 
	dc.b	10		;y coordinate
	dc.b	'Software from ANC. Press left mouse button to '
	dc.b	'continue.',0,1
even
	dc.w	15
	dc.b	20
	dc.b	'For software call: (0)50-778422 '
	dc.b	'(MIKE) or (0)3404-52987 (RON)',0,1
	dc.w	50
	dc.b	40
	dc.b	':not_mine/BIGBOOT.txt holds instruc'
	dc.b	'tions for BIGBOOT',0,0,0
********* hier prg einfuegen *********
finis:

