
; GRC presente BOOT MENU MAKER 



run:
even


lea	intuiname,a1
bsr	openlibrary		; open intuition.library
beq	fin			; erreur ?
move.l	d0,intuibase		; non,on sauve intuibase

lea	dosname,a1
bsr	openlibrary
beq	fin
move.l	d0,dosbase

move.l	intuibase,a0
move.l	$38(a0),screenhandle	; sauve screenhandle
move.l	$38(a0),screenhandle2


bsr	obtpref
move.b	#8,pref
bsr	modifpref


lea	windefs,a0
bsr	openwindow
beq	error			; erreur ?
move.l	d0,windowhandle		; non
move.l	d0,windowhdle
bsr	opendevice
bne	error			; erreur
bsr	opendiskdevice
bne	fin
move.l	readio+$14,writeio+$14
move.l	readio+$18,writeio+$18

move.l	$6c,endirq+2
move.w	#$4000,$dff09a
move.l	#irq,$6c
move.w	#$c000,$dff09a

affimenu:


move.l	4,a6
move.l	windowhandle,a0
move.l	86(a0),a0		; port utilisateur
;jsr	-372(a6)		; getmsg
move.l	d0,a0
;clr.l	20(a0)

move.l	#textlong,longtext
move.l	#text,addrtext
bsr	writetext



lea	image,a1
move.l	#05,d0			; x
move.l	#05,d1			; y
bsr	drawimage

lea	image2,a1
move.l	#05,d0			; x
move.l	#20,d1			; y
bsr	drawimage

lea	image3,a1
move.l	#05,d0			; x
move.l	#35,d1			; y
bsr	drawimage

lea	image4,a1
move.l	#05,d0			; x
move.l	#50,d1			; y
bsr	drawimage

lea	image5,a1
move.l	#05,d0			; x
move.l	#65,d1			; y
bsr	drawimage


clr.b	$bfec01
clr.b	hit

*-------------------------------------------

getchr:

move.l	intuibase,a0
add.l	#$34,a0
move.l	(a0),d0
move.l	windowhdle,d1
cmp.l	d0,d1
bne	mouse

move.b	hit,d0
clr.b	hit
cmp.b	#$45,d0
beq	ferme

cmp.b	#$4f,d0
bls.s	mouse
cmp.b	#$54,d0
bhi.s	mouse
sub.w	#$50,d0



cmp.b #0,d0			; F1 ?
beq option1 

cmp.b #1,d0			; F2 ?
beq option2

cmp.b #2,d0			; F3 ?
beq option3

cmp.b #3,d0			; F4 ?
beq option4

cmp.b #4,d0			; F5 ?
beq option5



mouse:
move.l	4,a6
move.l	windowhandle,a0
move.l	86(a0),a0		; port utilisateur
jsr	-372(a6)		; getmsg
move.l	d0,a0
move.l	20(a0),d6		; sauver evenement
tst.l	d0			; evenement ?
beq	getchr			; non

cmp.l	#$200,d6
bne	getchr

move.l	d0,a1
jsr	-378(a6)

ferme:
move.l	windowhandle,a0
bsr	closewindow		; on ferme


error:

move.l	intuibase,a1
bsr	closelibrary
move.l	dosbase,a1
bsr	closelibrary
error1:
bsr	closedevice
bsr	closediskdevice

fin:
move.w	#$4000,$dff09a
move.l	endirq+2,$6c
move.w	#$c000,$dff09a

rts



irq:
movem.l	d0-d7/a0-a6,-(a7)

move.b	$bfec01,d0
btst	#0,d0
beq	nonhit		; touche relache ?
not.b	d0
lsr.b	#1,d0

nonhit:
move.b	d0,hit
movem.l	(a7)+,d0-d7/a0-a6

endirq:
jmp	0


hit:
dc.b	0

even
******************************************

option1:
move.l	#effalong,d7
lea	titre,a0
effamem:
move.b	#32,(a0)+
dbra	d7,effamem

move.l	#opt1,addrtext
move.l	#opt1long,longtext
bsr	writetext


lea	border,a1
move.w	#201,coordbord+8
move.w	#201,coordbord+4

move.l	#20,d0			; x
move.l	#35,d1			; y
bsr	drawborder
clr.l	compteur
bsr	readkey
lea	titre,a5
move.l	#24,number
move.l	#titre+1,comp
move.l	#31,caracbas
move.l	#122,carachaut

bcle2:

bsr	readkey


cmp.b	#13,inbuff
beq	choice
cmp.b	#8,inbuff
bne	pasback
bsr	back

pasback:
bsr	traitement
bra	bcle2


choice:
cmp.l	#0,compteur
beq	bcle2
clr.l	compteur
move.l	#opt1_2,addrtext
move.l	#opt1_2long,longtext
bsr	writetext
lea	border,a1
move.w	#10,coordbord+8
move.w	#10,coordbord+4

move.l	#20,d0			; x
move.l	#35,d1			; y
bsr	drawborder
move.l	#0,number
move.l	#choix+1,comp
lea	choix,a5
move.l	#50,caracbas
move.l	#58,carachaut
clr.b	choix

choice2:
bsr	readkey

cmp.b	#13,inbuff
beq	choice3
cmp.b	#8,inbuff
bne	pasback2
bsr	back

pasback2:
clr.b	choix
bsr	traitement
bra	choice2


choice3:
cmp.b	#0,choix
beq	choice2
move.b	#49,numero
clr.l	compteur
sub.b	#48,choix
lea	logiciel+1,a5
move.l	#logiciel+2,comp
move.l	#1,bouclecomp
move.l	#logiciel+1,prog
cho:

move.l	#opt1_3,addrtext
move.l	#opt1_3long,longtext
bsr	writetext
lea	border,a1
move.w	#153,coordbord+8
move.w	#153,coordbord+4

move.l	#20,d0			; x
move.l	#35,d1			; y
bsr	drawborder
move.l	#18,number
move.l	#31,caracbas
move.l	#122,carachaut


choice4:
bsr	readkey

cmp.b	#13,inbuff
beq	finboucle
cmp.b	#8,inbuff
bne	pasback3
bsr	back

pasback3:
bsr	traitement

bra	choice4


finboucle:
clr.l	d0
move.b	choix,d0
move.l	bouclecomp,d1
cmp.l	d0,d1
bne	bouclecontinu
move.b	choix,numb
sub.b	#1,numb

lea	correctable,a0
lea	table,a1
lea	y,a2
clr.l	d0
move.b	numb,d0

correcloop:
cmp.l	(a0)+,d0
bne	correcloop

move.l	#2,d7
correcsuit:
move.b	(a0)+,(a2)+
dbra	d7,correcsuit

add.l	#1,a0

move.l	#7,d7

correcsuit2:

move.w	(a0)+,(a1)
add.l	#8,a1

dbra	d7,correcsuit2

bra	affimenu


bouclecontinu:

add.l	#1,bouclecomp
add.b	#1,numero
clr.l	compteur
add.l	#20,prog
move.l	prog,a5
add.l	#20,comp
bra	cho



traitement:
move.l	caracbas,d0
move.l	carachaut,d1
clr.l	d2
move.b	inbuff,d2

cmp.b	d0,d2
blo	retour

cmp.b	d1,d2
bhi	retour

see:

move.l	#inbuff,addrtext
move.l	#1,longtext
bsr	writetext

move.l	number,d0
cmp.l	compteur,d0
beq	out

add.l	#1,compteur
move.b	inbuff,(a5)+
retour:
rts


out:
move.b	inbuff,(a5)
move.b	#8,inbuff
move.l	#inbuff,addrtext
move.l	#1,longtext
bsr	writetext
rts

back:
cmp.l	comp,a5
blo	retour

sub.l	#1,compteur
sub.l	#1,a5
move.b	#0,inbuff+1
move.l	#inbuff,addrtext
move.l	#1,longtext
bsr	writetext
rts


option2:
bsr	bootsum
move.l	#op2text,addrtext
move.l	#op2long,longtext
bsr	writetext

op2bcle:
bsr	readkey
cmp.b	#32,inbuff
bne	op2bcle

bsr	loader
bsr	update
bsr	arret

move.l	#op2_2text,addrtext
move.l	#op2_2long,longtext
bsr	writetext

op2_2bcle:
bsr	readkey
cmp.b	#32,inbuff
bne	op2_2bcle

bra	affimenu

option3:
clr.b	$bfec01
bsr	readboot
lea	windefs2,a0
bsr	openwindow
beq	getchr
move.l	d0,boothandle
bsr	affiboot
ty:
cmp.b	#$75,$bfec01
beq	bootesc
move.l	4,a6
move.l	boothandle,a0
move.l	86(a0),a0		; port utilisateur
jsr	-372(a6)		; getmsg
move.l	d0,a0
move.l	20(a0),d6		; sauver evenement
tst.l	d0			; evenement ?
beq	ty			; non

cmp.l	#$200,d6
bne	ty

move.l	d0,a1
jsr	-378(a6)

bootesc:
move.l	boothandle,a0
bsr	closewindow
clr.b	$bfec01
clr.b	hit
bra	getchr


option4:

bsr	drive

move.l	#drivelinelong,longtext
move.l	#driveline,addrtext
bsr	writetext
move.l	#$ffffff,d7
wait:
clr.b	$bfec01
clr.b	$bfec01
dbra	d7,wait
bra	getchr




option5:

move.l	#info,addrtext
move.l	#infolong,longtext
bsr	writetext
bcle:
bsr	readkey
cmp.b	#32,inbuff
bne	bcle

bra	affimenu


*****************
* Sous routines *
*****************


drawborder:
move.l	intuibase,a6
move.l	windowhandle,a0
move.l	50(a0),a0
jsr	-108(a6)
rts

readkey:

move.l	4,a6
lea	readio,a1
move.w	#2,28(a1)
move.l	#inbuff,40(a1)
move.l	#20,36(a1)
move.l	#readreply,14(a1)
jsr	-456(a6)
rts


closedevice:

move.l	4,a6
lea	readio,a1
jsr	-450(a6)
lea	readreply,a1
jsr	-360(a6)
lea	writerep,a1
jsr	-360(a6)

rts

writetext:

move.l	4,a6
lea	writeio,a1
move.w	#3,28(a1)
move.l	addrtext,40(a1)
move.l	longtext,36(a1)
move.l	#writerep,14(a1)
jsr	-456(a6)
rts


opendevice:

move.l	4,a6
sub.l	a1,a1
jsr	-294(a6)		; findtask
move.l	d0,readreply+$10

lea	readreply,a1
jsr	-354(a6)		; addport

lea	writerep,a1
jsr	-354(a6)

lea	readio,a1
move.l	windowhandle,readio+$28
move.l	#48,readio+$24
clr.l	d0
clr.l	d1
lea	devicename,a0
jsr	-444(a6)		; open device
tst.l	d0
rts

obtpref:
move.l	intuibase,a6
move.l	#pref,a0
move.l	#232,d0
jsr	-132(a6)
rts

modifpref:
move.l	#pref,a0
move.l	#232,d0
move.l	#16384,d1
jsr	-324(a6)		; setpref
rts


drive:

cmp.l	#0,drivenb
beq	drive1
bra	drive0

drive0:

bsr 	devferm
errdrive0:
lea 	diskio,a1
clr.l 	d0
clr.l 	d1
lea 	trddevice,a0
jsr 	-444(a6)
tst.l 	d0
bne 	deverror

move.b 	#"0",unit
move.l	#0,drivenb
rts


deverror:
rts


drive1:

bsr 	devferm

move.l 	4,a6
lea 	diskio,a1
move.l 	#1,d0
clr.l 	d1
lea 	trddevice,a0
jsr 	-444(a6)
tst.l 	d0
bne 	errdrive0

move.b	#"1",unit
move.l	#1,drivenb
rts


devferm:

move.l 	4,a6
lea 	diskio,a1
jsr 	-450(a6)

rts


affiboot:
clr.l	booty
lea 	diskbuff,a4
move.l	#12,d6
mainboot:
lea	boottext,a5
move.l	#77,d7	
bsr	bootbcle
add.l	#10,booty
dbra	d6,mainboot
rts

bootbcle:

clr.l	d4

move.b	(a4),d4
cmp.b	#31,d4
bhi.s	allright

pop:

move.b	#".",(a5)+
bra	stock

allright:
cmp.b	#169,(a4)
beq	copyri
cmp.b	#$7a,(a4)
bhi	pop

copyri:
move.b	(a4),(a5)+

stock:
add.l	#1,a4
dbra 	d7,bootbcle

bootret:

move.l	bootx,d0
move.l	booty,d1
lea	boottextpointeur,a1
bsr	printItext


rts


readboot:
lea 	diskio,a1
move 	#2,28(a1)
move.l 	#diskbuff,40(a1)
move.l 	#2*512,36(a1)
move.l 	#0*512,44(a1)
move.l 	4,a6
jsr 	-456(a6)
bsr 	arret
rts

arret:
lea 	diskio,a1
move.l 	#0,36(a1)
move 	#9,28(a1)
move.l 	4,a6
jsr 	-456(a6)
rts

update:
lea 	diskio,a1
move 	#3,28(a1)
move.l 	#load,40(a1)
move.l 	#2*512,36(a1)
move.l 	#0*512,44(a1)
move.l 	4,a6
jsr 	-456(a6)

lea 	diskio,a1
move 	#4,28(a1)
move.l 	#load,40(a1)
move.l 	#2*512,36(a1)
move.l 	#0*512,44(a1)
move.l 	4,a6
jsr 	-456(a6)
rts



opendiskdevice:
move.l	4,a6
sub.l 	a1,a1
jsr 	-294(a6)
move.l 	d0,diskrep+$10

lea 	diskrep,a1
jsr 	-354(a6)
lea 	diskio,a1
move.l 	#diskrep,14(a1)
move.l 	#0,d0		; drive 0
clr.l 	d1
lea 	trddevice,a0
jsr 	-444(a6)
tst.l 	d0
rts


closediskdevice:
move.l	4,a6
lea	diskio,a1
jsr	-450(a6)
lea	diskrep,a1
jsr	-360(a6)
rts

drawimage:
move.l	intuibase,a6
move.l	windowhandle,a0
move.l	50(a0),a0
jsr	-114(a6)		; draw image
rts

printItext:
move.l	intuibase,a6
move.l	boothandle,a0
move.l	50(a0),a0	; rastport
jsr	-216(a6)	; printItext
rts

closewindow:
move.l	intuibase,a6
jsr	-72(a6)			; closewindow
rts

openwindow:
move.l	intuibase,a6
jsr	-204(a6)		; openwindow
tst.l	d0
rts

openlibrary:
move.l	4,a6
jsr	-408(a6)	; open lib
tst.l	d0
rts

closelibrary:
move.l	4,a6
jsr	-414(a6)	; close lib
rts



loader:

move.b	unit,ex
move.l	dosbase,a6
move.l	#execute,d1
move.l	#1006,d2
jsr	-30(a6)
tst.l	d0
beq	loaderr

move.l	d0,file

move.l	d0,d1
move.l	#saveloader,d2
move.l	#456,d3
jsr	-48(a6)

move.l	file,d1
jsr	-36(a6)
loaderr:
rts


testmenu:

move.b	#9,pref
bsr	modifpref
move.w	#$4e75,stopmenu
bsr	ad
move.w	#$4e71,stopmenu
move.b	#8,pref
bsr	modifpref

rts

bootsum:
lea	load,a0
BootblockChecksum:
movem.l	d0-d3/a0-a1,-(a7)
clr.l		d0
clr.l		d2
clr.l		d3
move.l	#$FF,d1
move.l	a0,a1
clr.l		$4(a0)
move.w	#$4,CCR
bo_Checkloop:
move.l	(a0)+,d2
addx.l	d2,d0
dbra	d1,bo_Checkloop
move.l	#-1,d1
subx.l	d0,d1
move.l	d1,$4(a1)
movem.l	(a7)+,d0-d3/a0-a1
rts


** BOOT PROGRAM **

load:

grafbase=$60000
intuitionbase=$60004

start:
*---------------------------------------------------
dc.b	"DOS",0
dc.l	0,$370

move.w #9,$1c(a1)
move.l 32(a7),d7
move.l #0,36(a1)
move.l 4,a6
jsr -456(a6)		; arret moteur	

ad:
movem.l d0/d1/d2/d3/d4/d5/d6/d7/a0/a1/a2/a3/a4/a5/a6,-(a7)
*---------------------------------------------------




move.l	4,a6
jsr	-132(a6)	; forbid

cmp.b	#$3c,531(a6)	; NTSC Amiga ?
beq	pal		; oui

cmp.b	#$32,530(a6)
beq	Pal		; Pal Screen ?

jsr	-150(a6)	; SuperStates
jmp	$fc0000		; Reset

Pal:	

lea	intuitionname(pc),a1	
moveq	#0,d0
jsr	-552(a6)	; openlib
move.l	d0,intuitionbase

move.l	d0,a6
move.l	#$61000,a0
move.l	#232,d0
jsr	-132(a6)	; getdef
move.b	#9,$61000
move.l	#$61000,a0
move.l	#232,d0
move.l	#16384,d1
jsr	-324(a6)	; setpref
move.l	4,a6
	
lea	grafname(pc),a1	; graphics.library
moveq	#0,d0
jsr	-552(a6)	; openlib
move.l	d0,grafbase
move.l	d0,a6


move.l	#8800,d7
lea	$70000,a1

efface:
clr.b	(a1)+
dbra	d7,efface

lea	copper(pc),a1
move.w	#$0020,$dff096
move.l	a1,$32(a6)	; insere ma copper list
move.w	#$8380,$dff096


lea     $61000,a0
move.l  #1,d0		; 1 bitplan
move.l  #320,d1		; 320 pixel large ecran
move.l  #200,d2		; 200 hauteur ecran
jsr     -390(a6)	; initbitmap
move.l  #$70000,$61008	; mem ecran dans structure

lea     $61100,a1
jsr     -198(a6)	; initrastport
move.l  #$61000,$61104

clr.l	d4
clr.l	d7
move.b	numb(pc),d7
move.b	y(pc),d4
lea	func+1(pc),a3
lea	bootprogtext(pc),a4

move.l	#1,d0
bsr	coul

col=50 ; 80 pour 80 colones 50 pour 60 colones

loop:
lea	func(pc),a0
move.l	#2,d2
move.l	#col,d3
bsr	ecris

add.l	#bootprogfintext-bootprogtext,a4
add.l	#12,d4
add.b	#1,(a3)
dbra	d7,loop


lea	$61100,a1
move.l	#col-15,d3
move.b	y2(pc),d4
bsr	move
lea	title(pc),a0
move.l	#fintitle-title,d0
bsr	ecris2

lea	$61100,a1
move.l	#col-20,d3
move.b	y3(pc),d4
bsr	move
lea	copyright(pc),a0
move.l	#fintitle-title,d0
bsr	ecris2

clr.b	$bfec01
move.b	numb(pc),d1
add.b	#$50,d1

key:

move.b	$bfec01,d0
not.b	d0
lsr.b	#1,d0
cmp.b	#$4f,d0
bls.s	key
cmp.b	d1,d0
bhi.s	key
sub.b	#$50,d0
move.l	d0,$80.W

lea	copper(pc),a0
move.l	#$01800000,(a0)+
move.l	#$fffffffe,(a0)
move.w	#$0200,$dff100

*--------------------------------------

movem.l (a7)+,d0/d1/d2/d3/d4/d5/d6/d7/a0/a1/a2/a3/a4/a5/a6

jsr	-138(a6)	; permit
stopmenu:
nop
lea	dosname(pc),a1
jsr	-96(a6)
move.l	d0,a0
move.l	$16(a0),a0
moveq	#$00,d0


rts



coul:

* dans d0 coul pen

move.l	grafbase,a6
lea	$61100,a1	; rastport
jsr	-342(a6)	; setApen
rts


ecris:

* dans a0 pointeur text
* dans d2 nb lettre
* dans d3 coord x
* dans d4 coord y


lea	$61100,a1

bsr	move

move.l	d2,d0		; nb lettres
jsr	-60(a6)		; text

move.l	a4,a0
move.l	#bootprogfintext-bootprogtext,d0
ecris2:
lea	$61100,a1
jsr	-60(a6)

rts

move:
move.l	d3,d0
move.l	d4,d1
jsr	-240(a6)	; move x,y
rts


* -- Donnees -- *

even
copper:

dc.w	$0180,$0000
dc.w	$0100,$2200,$0108,$0000
dc.w	$010a,$0000,$0102,$0001
dc.w	$008e,$2c81,$0090,$f4c1
dc.w	$0092,$0038,$0094,$00d0
dc.w	$00e0,$0007,$00e2,$0000
dc.w	$00e4,$0007,$00e6,$0000

dc.w	$0182,$0000
dc.w	$0184,$0fff,$0186,$0fff

table:
dc.w	$8701,$fffe,$0180,$0ddd
dc.w	$8801,$fffe,$0180,$050f
dc.w	$9601,$fffe,$0180,$0ddd
dc.w	$9701,$fffe,$0180,$0666

dc.w	$b301,$fffe,$0180,$0ddd
dc.w	$b401,$fffe,$0180,$0f05
dc.w	$c101,$fffe,$0180,$0ddd
dc.w	$c201,$fffe,$0180,$0000


dc.w	$ffff,$fffe

grafname:
dc.b	"graphics.library",0
dosname:
dc.b	"dos.library",0
intuitionname:
dc.b	"intuition.library",0

func:
dc.b	"F1"

numb:
dc.b	1
dc.b	0

y:
dc.b	118
y2:
dc.b	102
y3:
dc.b	145

titre:
title:
dc.b	"GRC PRESENTE SON MENU 1.2"
fintitle:

logiciel:
bootprogtext:
dc.b	" ....SALUT A FABRICE"
bootprogfintext:
dc.b	" ....ET A MICHEL etc"
dc.b	"                    "
dc.b	"                    "
dc.b	"                    "
dc.b	"                    "
dc.b	"                    "
dc.b	"                    "
dc.b	"                    "

dc.b	0

effalong=*-titre

dc.b	0


copyright:
dc.b	"  BOOT MENU BY GRC ©1989 "

dc.b	0,"v1.2 HAVE FUN !"

endboot:

blk.b	20,0




** DONNEES **


intuiname:
dc.b	"intuition.library",0,0
dos:
dc.b	"dos.library",0,0
devicename:
dc.b	"console.device",0,0

even
boottextpointeur:
dc.b	1,2
dc.b	0,0
dc.w	8,14
dc.l	0
dc.l	boottext
dc.l	0

even
boottext:
blk.b	80,0

even
bootx:
dc.l	0
booty:
dc.l	0


even
WBenchMsg:  DC.L 0 
Own_Task:   DC.L 0
ExecBase:   DC.L 0
Initial_SP: DC.L 0
Msg:        DC.L 0

even
readio:
blk.b	20+12+16,0
writeio:
blk.b	20+12+16,0
even
readreply:
blk.l	8,0
writerep:
blk.l	8,0

diskio:
blk.l	20,0
diskrep:
blk.l	8,0
diskbuff:
blk.b	1024,0



prog:
dc.l	logiciel
compteur:
dc.l	0
bouclecomp:
dc.l	0
carachaut:
dc.l	122
caracbas:
dc.l	31
comp:
dc.l	0
number:
dc.l	0
choix:
dc.l	0
inbuff:
blk.b	20,0

;titre:
;blk.b	26,0
;logiciel:
;blk.b	21*9,0


even

correctable:

dc.l	8
dc.b	72,54,183,0
dc.w	$5801,$5901,$6601,$6701
dc.w	$d901,$da01,$e701,$e801

dc.l	7
dc.b	75,60,175,0
dc.w	$5d01,$5e01,$6c01,$6d01
dc.w	$d101,$d201,$df01,$e001

dc.l	6
dc.b	82,66,170,0
dc.w	$6301,$6401,$7201,$7301
dc.w	$cc01,$cd01,$da01,$db01

dc.l	5
dc.b	82,66,158,0
dc.w	$6301,$6401,$7201,$7301
dc.w	$c001,$c101,$ce01,$cf01

dc.l	4
dc.b	93,76,158,0
dc.w	$6d01,$6e01,$7c01,$7d01
dc.w	$c001,$c101,$ce01,$cf01

dc.l	3
dc.b	105,89,158,0
dc.w	$7a01,$7b01,$8901,$8a01
dc.w	$c001,$c101,$ce01,$cf01

dc.l	2
dc.b	105,89,145,0
dc.w	$7a01,$7b01,$8901,$8a01
dc.w	$b301,$b401,$c101,$c201

dc.l	1
dc.b	118,102,145,0
dc.w	$8701,$8801,$9601,$9701
dc.w	$b301,$b401,$c101,$c201






drivenb:
dc.l	0
intuibase:
dc.l	0
dosbase:
dc.l	0
boothandle:
dc.l	0
windowhandle:
dc.l	0
addrtext:
dc.l	0
longtext:
dc.l	0
coordy:
dc.l	0
windowhdle:
dc.l	0

even

border:
dc.w	0,0
dc.b	3,0
dc.b	0,5
dc.l	coordbord
dc.l	0

coordbord:
dc.w	-2,-2
dc.w	0,-2
dc.w	0,9
dc.w	-2,9
dc.w	-2,-2

windefs:
dc.w	110,56		; x,y
dc.w	400,113		; largeur,hauteur
dc.b	0,1		; couleurs
dc.l	$200		; closewindow
dc.l	$100e		; activate et certains gadgets
dc.l	0,0
dc.l	windowname
screenhandle:
dc.l	0
dc.l	0
dc.w	150,50		; largeur mini,hauteur mini
dc.w	320,200		; "    "  maxi,"    "  maxi
dc.w	15		; custom screen

windefs2:
dc.w	0,50		; x,y
dc.w	640,145		; largeur,hauteur
dc.b	0,1		; couleurs
dc.l	$200		; closewindow
dc.l	$1008		; activate et certains gadgets
dc.l	0,0
dc.l	windowname2
screenhandle2:
dc.l	0
dc.l	0
dc.w	150,50		; largeur mini,hauteur mini
dc.w	320,200		; "    "  maxi,"    "  maxi
dc.w	15		; custom screen


windowname:
dc.b	" Boot Menu Maker v1.2 by GRC ©1989 ",0
windowname2:
dc.b	" Ascii boot v1.1 ",0

even
structtext:
dc.b	1,0,0,0
dc.w	8,14
dc.l	0
pointext:
dc.l	text
dc.l	0

trddevice:
dc.b	"trackdisk.device",0

text:
dc.b	12,10
dc.b	" Entrer texte .............................",10,10,13
dc.b	" Ecrire le menu en boot ...................",10,10,13
dc.b	" Voir boot ................................",10,10,13
dc.b	" Changer de drive .........................",10,10,13
dc.b	" Informations .............................",10,10,13
driveline:
dc.b	  $9b,"15",$3b,"45",$48,"DF"
unit:
dc.b	"0:",$9b,$30,$20,$70

textlong=*-text
drivelinelong=*-driveline

opt1:
dc.b	12,10
dc.b	"  Entrez le titre du menu:",10,10,10,10
dc.b	"  RETURN pour la suite ....",11,11,13,"  "
dc.b	$9b,$20,$70

opt1long=*-opt1

opt1_2:

dc.b	12,10,"  Entrez le nombre choix (2 a 9):"
dc.b	10,10,10,10,10
dc.b	"  RETURN pour la suite ....",11,11,11,13
dc.b	"  ",$9b,$30,$20,$70

opt1_2long=*-opt1_2


opt1_3:

dc.b	12,10,"  Entrez le nom du programme "
numero:
dc.b	"1",10,10,10,10,10
dc.b	"  RETURN apres chaque nom ...."
dc.b	11,11,11,13,"  ",$9b,$20,$70

opt1_3long=*-opt1_3

info:
dc.b	12
dc.b	"Ce programme installe en boot un menu de 2 a 9",10,13
dc.b	"choix maximum."
dc.b "Le maximum de caracteres que vous  pouvez mettre est de 25"
dc.b " pour le titre et 19 pour chaques choix."
dc.b "Vous pouvez ecrire le Boot-Menu    soit sur le drive DF0:"
dc.b " soit sur le drive"
dc.b "  DF1:   (si vous en possedez un bien sur !)",10
dc.b "Les autres options parle d'elle meme (si si!)",10
dc.b	$9b,"32mNota:",$9b,"0;31m"

dc.b 10
dc.b "Le Boot-Menu contient un detecteur d'ecran pal   (bug de la"
dc.b " ROM) et un mini antivirus.",10

dc.b	$9b,"3m"

dc.b 10,"  Pressez la barre d'"
dc.b $9b,"0;4mEspace",$9b,"0;3m"
dc.b " pour le menu .... "

dc.b	$9b,"0m"

infolong=*-info

op2text:

dc.b	12,10,10,10,10
dc.b	"        Inserez votre disk puis pressez"
dc.b	10,"              la bar d'espace ..."

op2long=*-op2text


op2_2text:

dc.b	12,10
dc.b	" Maintenant copiez la commande RUN dans le",10
dc.b	" tiroir C,et mettez la commande LOADER dans",10
dc.b	" votre STARTUP-SEQUENCE.",10
dc.b	" Enfin renomez vos executables comme PROG-1,     "
dc.b	" PROG-2 etc ...",10,10
dc.b	" Pressez la barre d'espace pour le menu ..."


op2_2long=*-op2_2text


execute:
dc.b "DF"
ex:dc.b "0:LOADER",0


even

file:
dc.l	0

even


image3:
dc.w	350,14
dc.w	32,10
dc.w	2
dc.l	imagedata3
dc.b	2,0
dc.l	0

imagedata3:

dc.l	%00000000000000000000000000000000
dc.l	%00011111111111000011111100000000
dc.l	%00011000000000000110000110000000
dc.l	%00011000000000000000000110000000
dc.l	%00011000000000000000001100000000
dc.l	%00011111110000000000111110000000
dc.l	%00011000000000000000000110000000
dc.l	%00011000000000000110000110000000
dc.l	%00011000000000000011111100000000
dc.l	%00000000000000000000000000000000
dc.l	%00000000000000000000000000000000



image4:
dc.w	350,15
dc.w	32,10
dc.w	2
dc.l	imagedata4
dc.b	2,0
dc.l	0

imagedata4:

dc.l	%00000000000000000000000000000000
dc.l	%00011111111111000000011100000000
dc.l	%00011000000000000000111100000000
dc.l	%00011000000000000001101100000000
dc.l	%00011000000000000011001100000000
dc.l	%00011111110000000110001100000000
dc.l	%00011000000000001111111111000000
dc.l	%00011000000000000000001100000000
dc.l	%00011000000000000000001100000000
dc.l	%00000000000000000000000000000000
dc.l	%00000000000000000000000000000000

image5:
dc.w	350,16
dc.w	32,10
dc.w	2
dc.l	imagedata5
dc.b	2,0
dc.l	0

imagedata5:

dc.l	%00000000000000000000000000000000
dc.l	%00011111111111000111111111000000
dc.l	%00011000000000000110000000000000
dc.l	%00011000000000000110000000000000
dc.l	%00011000000000000111111110000000
dc.l	%00011111110000000000000011000000
dc.l	%00011000000000000000000011000000
dc.l	%00011000000000000110000011000000
dc.l	%00011000000000000011111110000000
dc.l	%00000000000000000000000000000000
dc.l	%00000000000000000000000000000000

image2:
dc.w	350,13
dc.w	32,10
dc.w	2
dc.l	imagedata2
dc.b	2,0
dc.l	0

even
imagedata2:

dc.l	%00000000000000000000000000000000
dc.l	%00011111111111000001111110000000
dc.l	%00011000000000000011000011000000
dc.l	%00011000000000000000000011000000
dc.l	%00011000000000000000000110000000
dc.l	%00011111110000000000011000000000
dc.l	%00011000000000000001100000000000
dc.l	%00011000000000000011000011000000
dc.l	%00011000000000000011111111000000
dc.l	%00000000000000000000000000000000
dc.l	%00000000000000000000000000000000



image:
dc.w	350,12
dc.w	32,10
dc.w	2
dc.l	imagedata
dc.b	2,0
dc.l	0

even
imagedata:

dc.l	%00000000000000000000000000000000
dc.l	%00011111111111000000011000000000
dc.l	%00011000000000000000111000000000
dc.l	%00011000000000000001111000000000
dc.l	%00011000000000000011011000000000
dc.l	%00011111110000000000011000000000
dc.l	%00011000000000000000011000000000
dc.l	%00011000000000000000011000000000
dc.l	%00011000000000000011111111000000
dc.l	%00000000000000000000000000000000
dc.l	%00000000000000000000000000000000



dc.l	%00000000000000000000000000000000
dc.l	%00011111111111000000000000000000
dc.l	%00011000000000000000000000000000
dc.l	%00011000000000000000000000000000
dc.l	%00011000000000000000000000000000
dc.l	%00011111110000000000000000000000
dc.l	%00011000000000000000000000000000
dc.l	%00011000000000000000000000000000
dc.l	%00011000000000000000000000000000
dc.l	%00000000000000000000000000000000
dc.l	%00000000000000000000000000000000


even
saveloader:

dc.l $000003F3,$00000000,$00000002,$00000000,$00000001,$00000052 
dc.l $00000001,$000003E9,$00000052,$23CF0000,$013A2C79,$00000004 
dc.l $23CE0000,$013693C9,$4EAEFEDA,$23C00000,$01322840,$4AAC00AC 
dc.l $661641EC,$005C4EAE,$FE8041EC,$005C4EAE,$FE8C23C0,$0000013E 
dc.l $28404AAC,$00AC6616,$41EC005C,$4EAEFE80,$41EC005C,$4EAEFE8C 
dc.l $23C00000,$012E2C79,$00000004,$43F90000,$011E7000,$4EAEFE68 
dc.l $23C00000,$012A2239,$00000080,$41F90000,$00D6B218,$66FC2C79 
dc.l $0000012A,$22087400,$76004EAE,$FF222C79,$0000012A,$4EAEFF7C 
dc.l $2A002C79,$00000004,$22790000,$012A4EAE,$FE624AB9,$0000012E 
dc.l $67142C79,$00000136,$4EAEFF7C,$22790000,$012E4EAE,$FE867000 
dc.l $7EFF2E79,$0000013A,$4E750050,$524F472D,$31000150,$524F472D 
dc.l $32000250,$524F472D,$33000350,$524F472D,$34000450,$524F472D 
dc.l $35000550,$524F472D,$36000650,$524F472D,$37000750,$524F472D 
dc.l $38000850,$524F472D,$3900646F,$732E6C69,$62726172,$79000000 
dc.l $00000000,$00000000,$00000000,$00000000,$00000000,$00003129 
dc.l $006D6F76,$000003EC,$0000000F,$00000000,$00000002,$0000000E 
dc.l $0000001A,$00000038,$00000056,$00000062,$0000006E,$0000007A 
dc.l $00000084,$00000094,$000000A6,$000000B0,$000000B8,$000000C2 
dc.l $000000D0,$00000000,$000003F2,$000003EB,$00000001,$000003F2 


even
pref:
blk.b	250,0
