ùúùú  <T  Äš                                ;############################################################################
;#
;#	asm one reporter for amiexpress v3.38+
;#
;############################################################################
;#
;#	v1.1 by price/tfa
;#	v1.2 by galaxy/tfa	(bugfree version)
;#	v1.3 by galaxy/tfa	(byte optimized and speeded version)
;#
;############################################################################
;#
;#	history:
;#
;#	- doslibrary was not closed after leaving programm
;#	- yak! i never saw such a coding style before!!! wuerggghhh!
;#	- some chars wheren't placed correctly (a4000 showed up a400)
;#	- strange things happened after recoding! like messages to manager
;#	  showed up realy corrupt. dunno what the problem was!
;#	- i think i found above bug. some cnop 0,4 must be set and assembled
;#	  with 68000 mode and no odd address.. i have best results with this
;#	  by now...
;#	- message written is ok till 0-9 then it shows up a-f but this
;#	  divided by $30. think thats not what we want! want we?
;#
;############################################################################
;#
;#	last action on this source was:
;#
;#	- message numbers not fixed..
;#
;############################################################################










;############################################################################
;#
;#	exec library lvo
;#
;############################################################################
_lvoallocmem		=	-198
_lvofreemem		=	-210
_lvocloselibrary	=	-414
_lvoopenlibrary		=	-552










;############################################################################
;#
;#	dos library lvo
;#
;############################################################################
_lvoopen		=	-30
_lvoclose		=	-36
_lvoread		=	-42
_lvowrite		=	-48
_lvodeletefile		=	-72
_lvorename		=	-78
_lvolock		=	-84
_lvounlock		=	-90
_lvoexamine		=	-102
_lvodatestamp		=	-192
_lvoexecute		=	-222
_lvodatetostr		=	-744










;############################################################################
;#
;#	amiexpress library lvo
;#
;############################################################################
_lvocreatecomm		=	-30
_lvodeletecomm		=	-36
_lvosendstrcmd		=	-48
_lvosendstrdatacmd	=	-60
_lvogetdata		=	-66
_lvogetstring		=	-72
_lvowritestr		=	-84
_lvogetdt		=	-108
_lvogetstr		=	-114
_lvocopystr		=	-120
_lvohotkey		=	-126










;############################################################################
;#
;#	first section of the code
;#
;############################################################################
	section	reportercode,code










;############################################################################
;#
;#	initializions
;#
;############################################################################
start:
	bsr.w	initdoor		;initialize door

	bsr.w	getinfo			;get user info

	bsr.w	readfiles		;read config files

	tst.l	d7			;check if config files loaded right
	beq.b	checkmanager		;oki? then go and check da user

;----------------------------------------------------------------------------
;	if error arrived while reading all files
;----------------------------------------------------------------------------
	neg.w	d7
	subq.l	#1,d7
	mulu	#(error2-error1),d7	;check how much bytes the line has
	lea	error1(pc),a0
	lea	0(a0,d7.l),a0
	moveq	#1,d1
	move.l	aedoorport(pc),a1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

	bra.w	enddoor			;quit due the error










;############################################################################
;#
;#	system manager part
;#
;############################################################################
checkmanager:
	bsr.w	checksystem		;is user system manager

	tst.l	d7			;if system manager then don't check
	bne.w	checkbeter		;if he was betatester

;----------------------------------------------------------------------------
;	options for system manager
;----------------------------------------------------------------------------
	lea	hellotext(pc),a0
	moveq	#0,d1
	move.l	aedoorport(pc),a1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)	;hello!

	lea	username2(pc),a0
	moveq	#0,d1
	move.l	aedoorport(pc),a1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)	;price!

	lea	welcometext(pc),a0
	moveq	#1,d1
	move.l	aedoorport(pc),a1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)	;welcome back

;----------------------------------------------------------------------------
;	check for new messages
;----------------------------------------------------------------------------
	move.l	masterplace(pc),a0
	lea	41(a0),a1		;last written msg
	lea	47(a0),a0		;last read msg
	moveq	#4,d7

.loop:
	cmpm.b	(a0)+,(a1)+
	bne.b	.foundmsg

	dbra	d7,.loop

;----------------------------------------------------------------------------
;	no new messages found and make menu
;----------------------------------------------------------------------------
	lea	sysmenutextnodl(pc),a0
	moveq	#0,d1
	move.l	aedoorport(pc),a1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)	;menu

.menu1:
	move.l	aedoorport(pc),a1
	lea	niets(pc),a0
	move.l	aebase(pc),a6
	jsr	_lvohotkey(a6)

	bclr	#5,d0
	cmp.b	#"U",d0			;upload >> do asmone upload
	beq.w	.doupasm

	cmp.b	#"Q",d0			;quit >> do quitting menu
	bne.b	.menu1

	bra.w	enddoor

;----------------------------------------------------------------------------
;	messages found and make menu
;----------------------------------------------------------------------------
.foundmsg:
	lea	sysmenutextdl(pc),a0
	moveq	#0,d1
	move.l	aedoorport(pc),a1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)	;menu

.menu2:
	move.l	aedoorport(pc),a1
	lea	niets(pc),a0
	move.l	aebase(pc),a6
	jsr	_lvohotkey(a6)

	bclr	#5,d0
	cmp.b	#"D",d0			;download >> do messages download
	beq.b	.dosysdown

	cmp.b	#"U",d0			;upload >> do asmone upload
	beq.w	.doupasm

	cmp.b	#"Q",d0			;quit >> do quitting menu
	bne.b	.menu2

	bra.w	enddoor

;----------------------------------------------------------------------------
;	do messages packing and downing
;----------------------------------------------------------------------------
.dosysdown:
	move.l	#messagefile,d1
	move.l	dosbase(pc),a6
	jsr	_lvodeletefile(a6)	;delete old allmsg.lha file

	lea	packingtext(pc),a0
	moveq	#0,d1
	move.l	aedoorport(pc),a1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)	;packing message(s), please hold

	move.l	#lhacommand,d1
	moveq	#0,d2
	moveq	#0,d3
	move.l	dosbase(pc),a6
	jsr	_lvoexecute(a6)		;execute lha command

	lea	packingdonetext(pc),a0
	moveq	#0,d1
	move.l	aedoorport(pc),a1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)	;packing done and press a key

	move.l	aedoorport(pc),a1
	lea	niets(pc),a0
	move.l	aebase(pc),a6
	jsr	_lvohotkey(a6)		;wait for key

	move.l	#137,d0			;z-modem send
	moveq	#0,d1
	lea	messagefile(pc),a0
	move.l	aedoorport(pc),a1
	move.l	aebase(pc),a6
	jsr	_lvosendstrdatacmd(a6)	;ok leech stuff

;----------------------------------------------------------------------------
;	something went wrong
;----------------------------------------------------------------------------
	move.l	dataptr(pc),a0		;check if lost carrier
	cmp.l	#1,(a0)
	bne.b	.dlerror

;----------------------------------------------------------------------------
;	reset old pointers
;----------------------------------------------------------------------------
	move.l	masterplace(pc),a0
	lea	41(a0),a0
	lea	6(a0),a1
	moveq	#4,d7
	moveq	#"0",d0

.looper:
	move.b	d0,(a0)+
	move.b	d0,(a1)+
	dbra	d7,.looper

	bsr.w	updatemaster		;write masterfile back
	bsr.w	getlastmsgind1		;get message index

	moveq	#0,d0

;----------------------------------------------------------------------------
;	deletemessages
;----------------------------------------------------------------------------
.deletemsgs:
	movem.l	d0/d1,-(sp)
	moveq	#4,d7
	lea	msgnrend(pc),a0

.dmloop:
	move.b	d0,d1
	and.b	#15,d1
	add.b	#"0",d1
	move.b	d1,-(a0)
	lsr.l	#4,d0
	dbra	d7,.dmloop

	move.l	#msgfile,d1
	move.l	dosbase(pc),a6
	jsr	_lvodeletefile(a6)	;delete msg_#?

	movem.l	(sp)+,d0/d1
	addq.l	#1,d0
	cmp.l	d0,d1
	bge.b	.deletemsgs

	lea	msgdldone(pc),a0
	moveq	#0,d1
	move.l	aedoorport(pc),a1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)	;dl complete returning to bbs

	bra.w	enddoor

;----------------------------------------------------------------------------
;	error in messagedowning
;----------------------------------------------------------------------------
.dlerror:
	lea	msgdlerror(pc),a0
	moveq	#0,d1
	move.l	aedoorport(pc),a1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)	;dl incomplete returning to bbs

	bra.w	enddoor

;----------------------------------------------------------------------------
;	yes he wants to upload a new version of asm one
;----------------------------------------------------------------------------
.doupasm:
	lea	startupload(pc),a0
	moveq	#1,d1
	move.l	aedoorport(pc),a1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)	;well start upping in z-modem

	move.l	#asmonefile,d1
	move.l	#asmbackfile,d2
	move.l	dosbase(pc),a6
	jsr	_lvorename(a6)		;rename old asm one file

	move.l	#138,d0			;z-modem recive
	moveq	#0,d1
	lea	asmonedir(pc),a0
	move.l	aedoorport(pc),a1
	move.l	aebase(pc),a6
	jsr	_lvosendstrdatacmd(a6)	;ok then pump up

	move.l	dataptr(pc),a0		;check if lost carrier
	cmp.l	#1,(a0)
	bne.b	.uperror

	move.l	#asmbackfile,d1
	move.l	dosbase(pc),a6
	jsr	_lvodeletefile(a6)	;delete old version

	lea	uploaddonetext(pc),a0
	moveq	#1,d1
	move.l	aedoorport(pc),a1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)	;upload complete updating new asm one

;----------------------------------------------------------------------------
;	update latest asm one date
;----------------------------------------------------------------------------
	move.l	masterplace(pc),a1
	lea	32(a1),a1
	lea	datestring(pc),a0
	moveq	#7,d7

.loop2:
	move.b	(a0)+,(a1)+
	dbra	d7,.loop2

	bsr.w	updatemaster		;update masterfile

	lea	pressanykey(pc),a0
	moveq	#0,d1
	move.l	aedoorport(pc),a1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)	;press a key to return

	move.l	aedoorport(pc),a1
	lea	niets(pc),a0
	move.l	aebase(pc),a6
	jsr	_lvohotkey(a6)		;wait for key

	bra.w	enddoor

;----------------------------------------------------------------------------
;	upload failed
;----------------------------------------------------------------------------
.uperror:
	lea	uploaderrortext(pc),a0
	moveq	#0,d1
	move.l	aedoorport(pc),a1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)	;upload not complete old asm stay

	move.l	#asmonefile,d1
	move.l	dosbase(pc),a6
	jsr	_lvodeletefile(a6)	;delete partial upload

	move.l	#asmbackfile,d1
	move.l	#asmonefile,d2
	move.l	dosbase(pc),a6
	jsr	_lvorename(a6)		;reactivate old asmone.lha

	lea	pressanykey(pc),a0
	moveq	#0,d1
	move.l	aedoorport(pc),a1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)	;press a key to return

	move.l	aedoorport(pc),a1
	lea	niets(pc),a0
	move.l	aebase(pc),a6
	jsr	_lvohotkey(a6)		;wait for key

	bra.w	enddoor










;############################################################################
;#
;#	here are the betatester available options
;#
;############################################################################
checkbeter:
	bsr.w	checkbeta		;check if user is a betatester

	tst.l	d7
	bne.w	checkusa		;nope, goto user menu

	bsr.w	checkuser		;see if he used this door before

	tst.l	d7
	beq.b	.userknown

	st	newuser
	bsr.w	askuserinfo

.userknown:
	lea	welcometext2(pc),a0
	moveq	#1,d1
	move.l	aedoorport(pc),a1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)	;welcome back

;----------------------------------------------------------------------------
;	check if betatester has the asm one version
;----------------------------------------------------------------------------
	lea	asmver(pc),a0
	move.l	masterplace(pc),a1
	lea	32(a1),a1
	moveq	#7,d7

.loop1:
	cmpm.b	(a0)+,(a1)+
	bne.b	.newversion

	dbra	d7,.loop1

;----------------------------------------------------------------------------
;	no new asm one version detected
;----------------------------------------------------------------------------
	moveq	#0,d1
	move.l	aedoorport(pc),a1
	lea	betamenunodl1a(pc),a0
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)	;menu

	moveq	#0,d1
	move.l	aedoorport(pc),a1
	lea	betamenunodl1b(pc),a0
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)	;menu

.menu1:
	move.l	aedoorport(pc),a1
	lea	niets(pc),a0
	move.l	aebase(pc),a6
	jsr	_lvohotkey(a6)

	bclr	#5,d0
	cmp.b	#"V",d0			;view >> view user info
	bne.b	.no1
	bsr.w	showuserinfo
	bra.b	.userknown

.no1:
	cmp.b	#"C",d0			;ask >> ask user again
	bne.b	.no2
	bsr.w	askuserinfo
	bra.b	.userknown

.no2:
	cmp.b	#"B",d0			;bug >> leave bug
	beq.w	dobugreport

	cmp.b	#"I",d0			;idea >> leave idea
	beq.w	doideareport

	cmp.b	#"Q",d0			;quit >> quitting menu
	bne.b	.menu1

	bra.w	enddoor

;----------------------------------------------------------------------------
;	new asm one version detected
;----------------------------------------------------------------------------
.newversion:
	move.l	masterplace(pc),a1
	lea	32(a1),a1
	lea	asmdate(pc),a0
	moveq	#7,d7

.movedate:
	move.b	(a1)+,(a0)+
	dbra	d7,.movedate

	moveq	#0,d1
	move.l	aedoorport(pc),a1
	lea	betamenudl1a(pc),a0
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)	;menu

	moveq	#0,d1
	move.l	aedoorport(pc),a1
	lea	betamenudl1b(pc),a0
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)	;menu

.menu2:
	move.l	aedoorport(pc),a1
	lea	niets(pc),a0
	move.l	aebase(pc),a6
	jsr	_lvohotkey(a6)

	bclr	#5,d0
	cmp.b	#"V",d0			;view >> view user info
	bne.b	.no3
	bsr.w	showuserinfo
	bra.w	.userknown

.no3:
	cmp.b	#"C",d0			;ask >> ask user again
	bne.b	.no4
	bsr.w	askuserinfo
	bra.w	.userknown

.no4:
	cmp.b	#"B",d0			;bug >> leave bug
	beq.w	dobugreport

	cmp.b	#"I",d0			;idea >> leave idea
	beq.w	doideareport

	cmp.b	#"D",d0			;download >> download new asm one
	beq.b	.downloadversion

	cmp.b	#"Q",d0			;quit >> quitting menu
	bne.b	.menu2

	bra.w	enddoor

;----------------------------------------------------------------------------
;	download asm one
;----------------------------------------------------------------------------
.downloadversion:
	move.l	#137,d0			;z-modem send
	moveq	#0,d1
	lea	asmonefile(pc),a0
	move.l	aedoorport(pc),a1
	move.l	aebase(pc),a6
	jsr	_lvosendstrdatacmd(a6)	;do download

	move.l	dataptr(pc),a0		;check if all was ok
	cmp.l	#1,(a0)
	beq.b	.dlok

	cmp.l	#-2,(a0)
	bra.w	enddoor			;lost carrier

	moveq	#0,d1
	move.l	aedoorport(pc),a1
	lea	dlerrortext(pc),a0
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)	;download was unsuccessfull

	bra.w	enddoor

;----------------------------------------------------------------------------
;	download was ok
;----------------------------------------------------------------------------
.dlok:
	moveq	#0,d1
	move.l	aedoorport(pc),a1
	lea	dloktext(pc),a0
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)	;download was ok

	move.l	#asmdate,0.w		;oha!!!
	lea	asmdate(pc),a0
	move.l	betauser(pc),a1
	lea	32(a1),a1
	moveq	#7,d7

.loop2:
	move.b	(a0)+,(a1)+		;zet betatesters datum op
	dbra	d7,.loop2		;laatste versie van asm-one

	bsr.w	updatebeta		;write betafile back.

	bra.w	enddoor










;############################################################################
;#
;#	if normal user then direkt here
;#
;############################################################################
checkusa:
	bsr.w	checkuser		;see if he used this door before

	tst.l	d7
	beq.b	.userfound

	st	newuser
	bsr.w	askuserinfo

.userfound:
	lea	welcometext2(pc),a0
	moveq	#1,d1
	move.l	aedoorport(pc),a1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)	;welcome back

	lea	usermenu1a(pc),a0
	moveq	#0,d1
	move.l	aedoorport,a1
	move.l	aebase,a6
	jsr	_lvowritestr(a6)

	lea	usermenu1b(pc),a0
	moveq	#0,d1
	move.l	aedoorport,a1
	move.l	aebase,a6
	jsr	_lvowritestr(a6)

.menu:
	move.l	aedoorport,a1
	lea	niets,a0
	move.l	aebase,a6
	jsr	_lvohotkey(a6)

	bclr	#5,d0
	cmp.b	#"V",d0			;view >> view user info
	bne.b	.no1
	bsr.w	showuserinfo
	bra.b	.userfound

.no1:
	cmp.b	#"C",d0			;ask >> ask user again
	bne.b	.no2
	bsr.b	askuserinfo
	bra.b	.userfound

.no2:
	cmp.b	#"B",d0			;bug >> leave bug
	beq.w	dobugreport

	cmp.b	#"I",d0			;idea >> leave idea
	beq.w	doideareport

	cmp.b	#"Q",d0			;quit >> quitting menu
	bne.b	.menu

	bra.w	enddoor










;############################################################################
;#
;#	ask questions
;#
;############################################################################
askuserinfo:
	lea	getuserinfotext(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

	lea	username2(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

	tst.b	newuser
	beq.b	.nonewuser

	lea	getuserinfotext2a(pc),a0
	bsr.b	.getinforest
	rts

.nonewuser:
	lea	getuserinfotext2b(pc),a0

.getinforest:
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

	lea	getuserinfotext3(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

	lea	wanbttoconttext(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

.menu:
	lea	niets(pc),a0
	move.l	aedoorport(pc),a1
	move.l	aebase(pc),a6
	jsr	_lvohotkey(a6)

	bclr	#5,d0
	cmp.b	#"Y",d0
	beq.b	.doasktable

	cmp.b	#"N",d0
	bne.b	.menu
	rts

;----------------------------------------------------------------------------
;	begin meerkeuze vragen
;----------------------------------------------------------------------------
.doasktable:
	lea	asktable(pc),a4

.loop:
	move.l	(a4)+,a0		;vraagstelling
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

	lea	empty0(pc),a0
	moveq	#9,d7
	bsr.w	setlines		;schoonmaken beeldscherm

	move.l	(a4)+,a0		;begin text 1ste vraag
	move.l	(a4)+,d7		;aantal vragen
	move.l	d7,-(sp)		;save aantal vragen
	bsr.w	setlines

	move.l	(sp),d7
	add.b	#"0",d7
	move.b	d7,maxchoose

.waitkey:
	lea	asktext(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)	;ask met hotkey

	lea	niets(pc),a0
	move.l	aedoorport(pc),a1
	move.l	aebase(pc),a6
	jsr	_lvohotkey(a6)		;ask met hotkey

	move.l	(a4)+,a0		;antwoord buffer
	move.l	(sp)+,d7		;aantal vragen restoren
	add.b	#"0",d7			;bruikbaar maken voor compare
	cmp.b	d7,d0
	bgt.b	.nogood

	cmp.b	#"1",d0
	blt.b	.nogood

	move.b	d0,(a0)
	cmp.l	#-1,(a4)		;einde vragen tabel
	bne.b	.loop

	bra.b	.endmk

.nogood:
	subq.w	#4,a4			;aantwoord buffer opniew zetten
	subq.w	#4,sp
	bra.b	.waitkey

.endmk:
;----------------------------------------------------------------------------
;	harddrives
;----------------------------------------------------------------------------
.gethdsize:
	lea	specifyhdtext(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

	move.l	aedoorport(pc),a1
	lea	niets(pc),a0
	moveq	#(hdstringend-hdstring),d1
	move.l	aebase(pc),a6
	jsr	_lvogetstr(a6)

	move.l	d0,a0
	lea	hdstring(pc),a1
	moveq	#(hdstringend-hdstring),d7
	bsr.w	copystring

	tst.b	hdstring
	beq.b	.gethdsize

;----------------------------------------------------------------------------
;	diskdrives & dualdrives
;----------------------------------------------------------------------------
.askdiskstring:
	lea	askdisktext(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

	move.l	aedoorport(pc),a1
	lea	niets(pc),a0
	moveq	#(diskstringend-diskstring),d1
	move.l	aebase(pc),a6
	jsr	_lvogetstr(a6)

	move.l	d0,a0
	lea	diskstring(pc),a1
	moveq	#(diskstringend-diskstring),d7
	bsr.w	copystring

	tst.b	diskstring
	beq.b	.askdiskstring

;----------------------------------------------------------------------------
;	ask asm-one version they use
;----------------------------------------------------------------------------
.askasmstring:
	lea	askasmtext(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

	move.l	aedoorport(pc),a1
	lea	niets(pc),a0
	moveq	#(asmstringend-asmstring),d1
	move.l	aebase(pc),a6
	jsr	_lvogetstr(a6)

	move.l	d0,a0
	lea	asmstring(pc),a1
	moveq	#(asmstringend-asmstring),d7
	bsr.w	copystring

	tst.b	asmstring
	beq.b	.askasmstring

;----------------------------------------------------------------------------
;	ask reqtools version they use
;----------------------------------------------------------------------------
.askreqstring:
	lea	askreqtext(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

	move.l	aedoorport(pc),a1
	lea	niets(pc),a0
	moveq	#(reqstringend-reqstring),d1
	move.l	aebase(pc),a6
	jsr	_lvogetstr(a6)

	move.l	d0,a0
	lea	reqstring(pc),a1
	moveq	#(reqstringend-reqstring),d7
	bsr.w	copystring

	tst.b	reqstring
	beq.b	.askreqstring

;----------------------------------------------------------------------------
;	ask extensions they use
;----------------------------------------------------------------------------
.askext:
	lea	askexttext(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

	lea	ext1postext(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

	move.l	aedoorport(pc),a1
	lea	niets(pc),a0
	moveq	#(ext1stringend-ext1string),d1
	move.l	aebase(pc),a6
	jsr	_lvogetstr(a6)

	move.l	d0,a0
	lea	ext1string(pc),a1
	moveq	#(ext1stringend-ext1string),d7
	bsr.w	copystring

	lea	ext2postext(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

	move.l	aedoorport(pc),a1
	lea	niets(pc),a0
	moveq	#(ext2stringend-ext2string),d1
	move.l	aebase(pc),a6
	jsr	_lvogetstr(a6)

	move.l	d0,a0
	lea	ext2string(pc),a1
	moveq	#(ext2stringend-ext2string),d7
	bsr.w	copystring

	lea	ext3postext(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

	move.l	aedoorport(pc),a1
	lea	niets(pc),a0
	moveq	#(ext3stringend-ext3string),d1
	move.l	aebase(pc),a6
	jsr	_lvogetstr(a6)

	move.l	d0,a0
	lea	ext3string(pc),a1
	moveq	#(ext3stringend-ext3string),d7
	bsr.w	copystring

;----------------------------------------------------------------------------
;	copy computer answer
;----------------------------------------------------------------------------
	moveq	#0,d0
	move.b	compans(pc),d0
	sub.b	#"1",d0
	lea	comp00(pc),a0
	mulu	#(comp01-comp00),d0
	lea	(compstringend-compstring+1)(a0,d0.w),a0
	lea	compstring(pc),a1
	moveq	#(compstringend-compstring),d7
	bsr.w	copystring

;----------------------------------------------------------------------------
;	copy processor answer
;----------------------------------------------------------------------------
	moveq	#0,d0
	move.b	procans(pc),d0
	sub.b	#"1",d0
	lea	proc00(pc),a0
	mulu	#(proc10-proc00),d0
	lea	(procstringend-procstring+1)(a0,d0.w),a0
	lea	procstring(pc),a1
	moveq	#(procstringend-procstring),d7
	bsr.w	copystring

;----------------------------------------------------------------------------
;	copy fpu answer
;----------------------------------------------------------------------------
	moveq	#0,d0
	move.b	fpuans(pc),d0
	sub.b	#"1",d0
	lea	fpu0(pc),a0
	mulu	#(fpu1-fpu0),d0
	lea	(fpustringend-fpustring+1)(a0,d0.w),a0
	lea	fpustring(pc),a1
	moveq	#(fpustringend-fpustring),d7
	bsr.w	copystring

;----------------------------------------------------------------------------
;	copy mmu answer
;----------------------------------------------------------------------------
	moveq	#0,d0
	move.b	mmuans(pc),d0
	sub.b	#"1",d0
	lea	mmu0(pc),a0
	mulu	#(mmu1-mmu0),d0
	lea	(mmustringend-mmustring+1)(a0,d0.w),a0
	lea	mmustring(pc),a1
	moveq	#(mmustringend-mmustring),d7
	bsr.w	copystring

;----------------------------------------------------------------------------
;	copy kickstart answer
;----------------------------------------------------------------------------
	moveq	#0,d0
	move.b	kickans(pc),d0
	sub.b	#"1",d0
	lea	kick0(pc),a0
	mulu	#(kick1-kick0),d0
	lea	(kickstringend-kickstring+1)(a0,d0.w),a0
	lea	kickstring(pc),a1
	moveq	#(kickstringend-kickstring),d7
	bsr.w	copystring

;----------------------------------------------------------------------------
;	copy chip mem answer
;----------------------------------------------------------------------------
	moveq	#0,d0
	move.b	chipans(pc),d0
	sub.b	#"1",d0
	lea	chipm0(pc),a0
	mulu	#(chipm1-chipm0),d0
	lea	(chipstringend-chipstring+1)(a0,d0.w),a0
	lea	chipstring(pc),a1
	moveq	#(chipstringend-chipstring),d7
	bsr.w	copystring

;----------------------------------------------------------------------------
;	copy fake fast mem answer
;----------------------------------------------------------------------------
	moveq	#0,d0
	move.b	ffastans(pc),d0
	sub.b	#"1",d0
	lea	ffast0(pc),a0
	mulu	#(ffast1-ffast0),d0
	lea	(ffaststringend-ffaststring+1)(a0,d0.w),a0
	lea	ffaststring(pc),a1
	moveq	#(ffaststringend-ffaststring),d7
	bsr.w	copystring

;----------------------------------------------------------------------------
;	copy real fast mem answer
;----------------------------------------------------------------------------
	moveq	#0,d0
	move.b	rfastans(pc),d0
	sub.b	#"1",d0
	lea	rfast0(pc),a0
	mulu	#(rfast1-rfast0),d0
	lea	(rfaststringend-rfaststring+1)(a0,d0.w),a0
	lea	rfaststring(pc),a1
	moveq	#(rfaststringend-rfaststring),d7
	bsr.w	copystring

;----------------------------------------------------------------------------
;	write that config stuff back
;----------------------------------------------------------------------------
.useit:
	bsr.w	setnulsspace

	move.l	newuserplace(pc),a0
	lea	userinfostart(pc),a1
	lea	userinfoend(pc),a2

.loop2:
	move.b	(a1)+,(a0)+
	cmp.l	a1,a2
	bne.b	.loop2

	move.l	#userfile,d1		;get userbug file
	move.l	#1004,d2		;mode-readwrite
	move.l	dosbase(pc),a6
	jsr	_lvoopen(a6)

	move.l	d0,confighandle
	move.l	confighandle(pc),d1
	move.l	configplace(pc),d2
	move.l	configsize(pc),d3
	tst.b	newuser
	bne.b	.writeit

	sub.l	#992,d3

.writeit:
	move.l	dosbase(pc),a6
	jsr	_lvowrite(a6)

	move.l	confighandle(pc),d1
	move.l	dosbase(pc),a6
	jsr	_lvoclose(a6)

	move.l	#0,confighandle

.alldone:
	moveq	#0,d7
	rts










;############################################################################
;#
;#	show user information
;#
;############################################################################
showuserinfo:
	bsr.w	setnulsnul

	lea	profiltext(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

	lea	username2(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

;----------------------------------------------------------------------------
;	show computer type
;----------------------------------------------------------------------------
	lea	comptext(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

	lea	compstring(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

;----------------------------------------------------------------------------
;	show processor type
;----------------------------------------------------------------------------
	lea	proctext(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

	lea	procstring(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

;----------------------------------------------------------------------------
;	show floating point type
;----------------------------------------------------------------------------
	lea	fputext(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

	lea	fpustring(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

;----------------------------------------------------------------------------
;	show memory management unit type
;----------------------------------------------------------------------------
	lea	mmutext(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

	lea	mmustring(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

;----------------------------------------------------------------------------
;	show kickstart type
;----------------------------------------------------------------------------
	lea	kicktext(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

	lea	kickstring(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

;----------------------------------------------------------------------------
;	show chipmem size
;----------------------------------------------------------------------------
	lea	chiptext(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

	lea	chipstring(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

;----------------------------------------------------------------------------
;	show fake fast memory size
;----------------------------------------------------------------------------
	lea	ffasttext(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

	lea	ffaststring(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

;----------------------------------------------------------------------------
;	show real fast memory size
;----------------------------------------------------------------------------
	lea	rfasttext(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

	lea	rfaststring(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

;----------------------------------------------------------------------------
;	show hd used
;----------------------------------------------------------------------------
	lea	hdtext(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

	lea	hdstring(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

;----------------------------------------------------------------------------
;	show dd used
;----------------------------------------------------------------------------
	lea	ddtext(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

	lea	diskstring(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

;----------------------------------------------------------------------------
;	show asm used
;----------------------------------------------------------------------------
	lea	asmtext(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

	lea	asmstring(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

;----------------------------------------------------------------------------
;	show reqtools used
;----------------------------------------------------------------------------
	lea	reqtext(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

	lea	reqstring(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

;----------------------------------------------------------------------------
;	show ext_1 used
;----------------------------------------------------------------------------
	lea	ext1text(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

	lea	ext1string(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

;----------------------------------------------------------------------------
;	show ext_2 used
;----------------------------------------------------------------------------
	lea	ext2text(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

	lea	ext2string(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

;----------------------------------------------------------------------------
;	show ext_3 used
;----------------------------------------------------------------------------
	lea	ext3text(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

	lea	ext3string(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

;----------------------------------------------------------------------------
;	press any key
;----------------------------------------------------------------------------
	lea	pressanykey(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

	move.l	aedoorport(pc),a1
	lea	niets(pc),a0
	move.l	aebase(pc),a6
	jsr	_lvohotkey(a6)

	moveq	#-1,d7
	rts










;############################################################################
;#
;#	initialize the door
;#
;############################################################################
initdoor:
	move.b	(a0),d7			;save node number
	move.b	d7,nodenumber		;save nodenumber for temp file

	moveq	#0,d0
	lea	dosname(pc),a1
	move.l	4.w,a6
	jsr	_lvoopenlibrary(a6)
	move.l	d0,dosbase		;open dos library

	moveq	#0,d0
	lea	aelibname(pc),a1
	move.l	4.w,a6
	jsr	_lvoopenlibrary(a6)
	move.l	d0,aebase		;open amiex library

	move.b	nodenumber(pc),d0	;get node number for replyport
	move.l	aebase(pc),a6
	jsr	_lvocreatecomm(a6)
	move.l	d0,aedoorport		;create communication port

	move.l	aedoorport(pc),a1
	move.l	aebase(pc),a6
	jsr	_lvogetdata(a6)		;get data pointer
	move.l	d0,dataptr

	move.l	aedoorport(pc),a1
	move.l	aebase(pc),a6
	jsr	_lvogetstring(a6)
	move.l	d0,stringptr		;get stringpointer
	rts










;############################################################################
;#
;#	get some information about the user
;#
;############################################################################
getinfo:
	move.l	aedoorport(pc),a1
	moveq	#100,d0				;dt-name
	sub.l	a0,a0
	move.l	aebase(pc),a6
	jsr	_lvogetdt(a6)

	move.l	aedoorport(pc),a1
	lea	username2(pc),a0
	move.l	aebase(pc),a6
	jsr	_lvocopystr(a6)			;get username2

	move.l	stringptr(pc),a0
	lea	username(pc),a1
	moveq	#(usernameend-username),d7	;32 chars for username
	bsr.w	copystring

	move.l	aedoorport(pc),a1
	moveq	#102,d0				;dt-location
	sub.l	a0,a0
	move.l	aebase(pc),a6
	jsr	_lvogetdt(a6)

	move.l	stringptr(pc),a0
	lea	userloc,a1
	moveq	#(userlocend-userloc),d7	;32 chars for userlocation
	bsr.w	copystring

	move.l	aedoorport(pc),a1
	moveq	#104,d0				;dt-slotnumber
	sub.l	a0,a0
	move.l	aebase(pc),a6
	jsr	_lvogetdt(a6)

	move.l	stringptr(pc),a0
	lea	userslot(pc),a1
	moveq	#(userslotend-userslot),d7	;10 chars for userslot
	bsr.w	copystring

	move.l	#datestruct,d1
	move.l	dosbase(pc),a6
	jsr	_lvodatestamp(a6)		;get current date

	move.l	#datestruct,d1
	move.l	dosbase(pc),a6
	jsr	_lvodatetostr(a6)		;convert to dd-mm-yy
	rts










;############################################################################
;#
;#	open three files 'user.bug', 'user.beta' and 'systemfile'
;#
;############################################################################
readfiles:
;----------------------------------------------------------------------------
;	get user file
;----------------------------------------------------------------------------
	bsr.w	clearinfo		;clear the fileinfo

	move.l	#userfile,d1
	moveq	#-2,d2			;access-read
	move.l	dosbase(pc),a6
	jsr	_lvolock(a6)		;lock file
	move.l	d0,configlock

	beq.w	configerror

	move.l	d0,d1
	move.l	#fileinfo,d2
	move.l	dosbase(pc),a6
	jsr	_lvoexamine(a6)		;check if file exists

	lea	fileinfo(pc),a0
	move.l	124(a0),configsize
	move.l	configsize(pc),newuserplace
	add.l	#(userinfoend-userinfostart),configsize
	move.l	configlock(pc),d1
	move.l	dosbase(pc),a6
	jsr	_lvounlock(a6)		;unlock file

	move.l	configsize(pc),d0
	move.l	#$10001,d1		;memf-public+memf-clear
	move.l	4.w,a6
	jsr	_lvoallocmem(a6)	;allocmem
	move.l	d0,configplace

	beq.w	configerror2

	add.l	d0,newuserplace
	move.l	#userfile,d1
	move.l	#1004,d2		;mode-readwrite
	move.l	dosbase(pc),a6
	jsr	_lvoopen(a6)		;open file
	move.l	d0,confighandle

	beq.w	configerror3

	move.l	confighandle(pc),d1
	move.l	configplace(pc),d2
	move.l	configsize(pc),d3
	move.l	dosbase(pc),a6
	jsr	_lvoread(a6)		;read file

	add.l	#(userinfoend-userinfostart),d0
	cmp.l	configsize(pc),d0

	bne.w	configerror4

	move.l	confighandle(pc),d1
	move.l	dosbase(pc),a6
	jsr	_lvoclose(a6)		;close file

	move.l	#0,confighandle

;----------------------------------------------------------------------------
;	get betafile
;----------------------------------------------------------------------------
getbetafile:
	bsr.w	clearinfo		;clear the fileinfo

	move.l	#betafile,d1
	moveq	#-2,d2			;access-read
	move.l	dosbase(pc),a6
	jsr	_lvolock(a6)		;lock file
	move.l	d0,betalock

	beq.w	betaerror

	move.l	d0,d1
	move.l	#fileinfo,d2
	move.l	dosbase(pc),a6
	jsr	_lvoexamine(a6)		;check if file exists

	lea	fileinfo(pc),a0
	move.l	124(a0),betasize
	move.l	betalock(pc),d1
	move.l	dosbase(pc),a6
	jsr	_lvounlock(a6)		;unlock file

	move.l	betasize(pc),d0
	move.l	#$10001,d1		;memf-public+memf-clear
	move.l	4.w,a6
	jsr	_lvoallocmem(a6)	;allocmem
	move.l	d0,betaplace

	beq.w	betaerror2

	move.l	#betafile,d1
	move.l	#1004,d2		;mode-readwrite
	move.l	dosbase(pc),a6
	jsr	_lvoopen(a6)		;open file
	move.l	d0,betahandle

	beq.w	betaerror3

	move.l	betahandle(pc),d1
	move.l	betaplace(pc),d2
	move.l	betasize(pc),d3
	move.l	dosbase(pc),a6
	jsr	_lvoread(a6)		;read file

	cmp.l	betasize(pc),d0

	bne.w	betaerror4

	move.l	betahandle(pc),d1
	move.l	dosbase(pc),a6
	jsr	_lvoclose(a6)		;close file

	move.l	#0,betahandle

;----------------------------------------------------------------------------
;	get system manager file
;----------------------------------------------------------------------------
getmasterfile:
	bsr.w	clearinfo		;clear the fileinfo

	move.l	#masterfile,d1
	moveq	#-2,d2			;access-read
	move.l	dosbase(pc),a6
	jsr	_lvolock(a6)		;lock file
	move.l	d0,masterlock

	beq.w	mastererror

	move.l	d0,d1
	move.l	#fileinfo,d2
	move.l	dosbase(pc),a6
	jsr	_lvoexamine(a6)		;check if file exists

	lea	fileinfo(pc),a0
	move.l	124(a0),mastersize
	move.l	masterlock(pc),d1
	move.l	dosbase(pc),a6
	jsr	_lvounlock(a6)		;unlock file

	move.l	mastersize(pc),d0
	move.l	#$10001,d1		;memf-public+memf-clear
	move.l	4.w,a6
	jsr	_lvoallocmem(a6)	;allocmem
	move.l	d0,masterplace

	beq.w	mastererror2

	move.l	#masterfile,d1
	move.l	#1004,d2		;mode-readwrite
	move.l	dosbase(pc),a6
	jsr	_lvoopen(a6)		;open file
	move.l	d0,masterhandle

	beq.w	mastererror3

	move.l	masterhandle(pc),d1
	move.l	masterplace(pc),d2
	move.l	mastersize(pc),d3
	move.l	dosbase(pc),a6
	jsr	_lvoread(a6)		;read file

	cmp.l	mastersize(pc),d0

	bne.w	mastererror4

	move.l	masterhandle(pc),d1
	move.l	dosbase(pc),a6
	jsr	_lvoclose(a6)		;close file

	move.l	#0,masterhandle
	moveq	#0,d7
	rts










;############################################################################
;#
;#	clear the fileinfo structure
;#
;############################################################################
clearinfo:
	lea	fileinfo(pc),a0
	moveq	#(260/4)-1,d7

.loop:
	move.l	#0,(a0)+
	dbra	d7,.loop

	rts










;############################################################################
;#
;#	normal copy routine
;#
;############################################################################
copystring:
	movem.l	d0/d7/a0/a1,-(sp)
	subq.w	#1,d7

.loop:
	move.b	(a0)+,d0
	tst.b	d0
	bne.b	.nonull

	bra.b	.fillrest

.nonull:
	move.b	d0,(a1)+
	dbra	d7,.loop

	bra.b	.done

.fillrest:
	move.b	#" ",(a1)+
	dbra	d7,.fillrest

.done:
	move.b	#10,(a1)
	movem.l	(sp)+,d0/d7/a0/a1
	rts










;############################################################################
;#
;#	configuration file error report
;#
;############################################################################
configerror4:
	move.l	confighandle(pc),d1
	move.l	dosbase(pc),a6
	jsr	_lvoclose(a6)		;close file

	move.l	#0,confighandle
	moveq	#-4,d7
	rts

configerror3:
	moveq	#-3,d7
	rts

configerror2:
	moveq	#-2,d7
	rts

configerror:
	move.l	#userfile,d1
	move.l	#1004,d2		;mode-readwrite
	move.l	dosbase(pc),a6
	jsr	_lvoopen(a6)		;open file

	move.l	d0,d1
	move.l	dosbase(pc),a6
	jsr	_lvoclose(a6)		;close file

	bra.w	readfiles










;############################################################################
;#
;#	betatester file error report
;#
;############################################################################
betaerror4:
	move.l	betahandle(pc),d1
	move.l	dosbase(pc),a6
	jsr	_lvoclose(a6)		;close file

	move.l	#0,betahandle
	moveq	#-7,d7
	rts

betaerror3:
	moveq	#-6,d7
	rts

betaerror2:
	moveq	#-5,d7
	rts

betaerror:
	move.l	#userfile,d1
	move.l	#1004,d2		;mode-readwrite
	move.l	dosbase(pc),a6
	jsr	_lvoopen(a6)		;open file

	move.l	d0,d1
	move.l	dosbase(pc),a6
	jsr	_lvoclose(a6)		;close file

	bra.w	getbetafile










;############################################################################
;#
;#	master file error report
;#
;############################################################################
mastererror4:
	move.l	masterhandle(pc),d1
	move.l	dosbase(pc),a6
	jsr	_lvoclose(a6)		;close file

	move.l	#0,masterhandle
	moveq	#-10,d7
	rts

mastererror3:
	moveq	#-9,d7
	rts

mastererror2:
	moveq	#-8,d7
	rts

mastererror:
	move.l	#masterfile,d1
	move.l	#1004,d2		;mode-readwrite
	move.l	dosbase(pc),a6
	jsr	_lvoopen(a6)		;open file

	move.l	d0,d1
	move.l	dosbase(pc),a6
	jsr	_lvoclose(a6)		;close file

	bra.w	getmasterfile










;############################################################################
;#
;#	quit the door and close everything
;#
;############################################################################
enddoor:
	bsr.b	freemem			;free allocated mem

	lea	tfaproducttext(pc),a0
	moveq	#0,d1
	move.l	aedoorport(pc),a1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)	;write production string

	move.l	aedoorport(pc),a1
	move.l	aebase(pc),a6
	jsr	_lvodeletecomm(a6)	;close communication port

	move.l	dosbase,a1
	move.l	4.w,a6
	jsr	_lvocloselibrary(a6)	;close dos library

	move.l	aebase,a1
	move.l	4.w,a6
	jsr	_lvocloselibrary(a6)	;close amiex library

	moveq	#0,d0
	rts










;############################################################################
;#
;#	free allocated memory
;#
;############################################################################
freemem:
	tst.l	masterplace
	beq.b	.nofreemaster

	move.l	masterplace(pc),a1
	move.l	mastersize(pc),d0
	move.l	4.w,a6
	jsr	_lvofreemem(a6)		;free masterfile size

	move.l	#0,masterplace
	move.l	#0,mastersize

.nofreemaster:
	tst.l	betaplace
	beq.b	.nofreebeta

	move.l	betaplace(pc),a1
	move.l	betasize(pc),d0
	move.l	4.w,a6
	jsr	_lvofreemem(a6)		;free betafile size

	move.l	#0,betaplace
	move.l	#0,betasize

.nofreebeta:
	tst.l	configplace
	beq.b	.nofreeconfig

	move.l	configplace(pc),a1
	move.l	configsize(pc),d0
	move.l	4.w,a6
	jsr	_lvofreemem(a6)		;free configfile size

	move.l	#0,configplace
	move.l	#0,configsize

.nofreeconfig:
	rts










;############################################################################
;#
;#	get last message written
;#
;############################################################################
getlastmsgind1:
	move.l	masterplace(pc),a0
	lea	41(a0),a0
	moveq	#0,d1
	moveq	#4,d7

.setlastmsg:
	move.b	(a0)+,d0
	sub.b	#"0",d0
	and.b	#15,d0
	add.b	d0,d1
	lsl.l	#4,d1
	dbra	d7,.setlastmsg		;get last message written

	lsr.l	#4,d1			;number ascii->hex
	rts










;############################################################################
;#
;#	update betatest file
;#
;############################################################################
updatebeta:
	move.l	#betafile,d1
	move.l	#1004,d2		;mode-readwrite
	move.l	dosbase(pc),a6
	jsr	_lvoopen(a6)		;open file
	move.l	d0,betahandle

	move.l	d0,d1
	move.l	betaplace(pc),d2
	move.l	betasize(pc),d3
	move.l	dosbase(pc),a6
	jsr	_lvowrite(a6)		;write file

	move.l	betahandle(pc),d1
	move.l	dosbase(pc),a6
	jsr	_lvoclose(a6)		;close file

	move.l	#0,betahandle
	rts










;############################################################################
;#
;#	update master file
;#
;############################################################################
updatemaster:
	move.l	#masterfile,d1
	move.l	#1004,d2		;mode-readwrite
	move.l	dosbase(pc),a6
	jsr	_lvoopen(a6)		;open file
	move.l	d0,masterhandle

	move.l	d0,d1
	move.l	masterplace(pc),d2
	move.l	mastersize(pc),d3
	move.l	dosbase(pc),a6
	jsr	_lvowrite(a6)		;write file

	move.l	masterhandle(pc),d1
	move.l	dosbase(pc),a6
	jsr	_lvoclose(a6)		;close file

	move.l	#0,masterhandle
	rts










;############################################################################
;#
;#	setlines routine
;#
;############################################################################
setlines:
	subq.w	#1,d7

.loop:
	movem.l	d7/a0,-(sp)

	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)	;writestring

	movem.l	(sp)+,d7/a0

.loop2:
	tst.b	(a0)+
	bne.b	.loop2

	dbra	d7,.loop

	rts










;############################################################################
;#
;#	set nulls null
;#
;############################################################################
setnulsnul:
	moveq	#0,d0
	bra.b	edittable

setnulsspace:
	moveq	#10,d0

edittable:
	lea	nultable(pc),a0

.scantable:
	move.l	(a0)+,a1
	cmp.l	#-1,a1
	beq.b	.endoftable

	move.b	d0,(a1)
	bra.b	.scantable

.endoftable:
	rts










;############################################################################
;#
;#	check if dude is systemmanager
;#
;############################################################################
checksystem:
	move.l	masterplace(pc),a0
	lea	username2(pc),a1
	moveq	#31,d7

.checkloop:
	tst.b	(a1)
	beq.b	.endofname

	cmpm.b	(a0)+,(a1)+
	bne.b	.notsystem

	dbra	d7,.checkloop

.thisissystem:
	moveq	#0,d7
	rts

.endofname:
	cmp.b	#" ",(a0)
	beq.b	.thisissystem

.notsystem:
	moveq	#-1,d7
	rts










;############################################################################
;#
;#	check if the dude was betatester
;#
;############################################################################
checkbeta:
	move.l	betaplace(pc),a0
	move.l	a0,a1
	add.l	betasize(pc),a1

.checkloop1:
	lea	username2(pc),a2
	move.l	a0,-(sp)
	move.l	a0,betauser

.checkloop:
	cmp.l	a0,a1
	blt.b	.endofall

	tst.b	(a2)
	bne.b	.check

	cmp.b	#" ",(a0)
	bne.b	.check

	move.l	(sp)+,a0
	lea	32(a0),a0
	lea	asmver(pc),a1
	moveq	#7,d7

.setupdate:
	move.b	(a0)+,(a1)+
	dbra	d7,.setupdate

	moveq	#0,d7
	rts

.check:
	cmpm.b	(a0)+,(a2)+
	beq.b	.checkloop

	move.l	(sp)+,a0
	lea	41(a0),a0
	bra.b	.checkloop1

.endofall:
	move.l	(sp)+,a0
	moveq	#-1,d7
	rts










;############################################################################
;#
;#	check if the dude was normal user
;#
;############################################################################
checkuser:
	move.l	configplace(pc),a0	;start searching
	move.l	newuserplace(pc),a1	;end searching

.checkloop1:
	lea	username2(pc),a2	;compare string
	move.l	a0,-(sp)
	lea	51(a0),a0

.checkloop:
	cmp.l	a0,a1
	blt.b	.endofall

	tst.b	(a2)
	bne.b	.check

	cmp.b	#" ",(a0)
	bne.b	.check

	move.l	(sp)+,a0
	bra.b	setuserinfo

.check:
	cmpm.b	(a0)+,(a2)+
	beq.b	.checkloop

	move.l	(sp)+,a0
	lea	992(a0),a0
	bra.b	.checkloop1

.endofall:
	move.l	(sp)+,a0
	moveq	#-1,d7
	rts










;############################################################################
;#
;#	copy all stuff to it's right places
;#
;############################################################################
setuserinfo:
	move.l	a0,newuserplace
	move.l	a0,a2
	lea	20(a2),a0
	lea	userslot(pc),a1
	moveq	#(userslotend-userslot),d7
	bsr.w	copystring

	lea	51(a2),a0
	lea	username(pc),a1
	moveq	#(usernameend-username),d7
	bsr.w	copystring

	lea	104(a2),a0
	lea	userloc(pc),a1
	moveq	#(userlocend-userloc),d7
	bsr.w	copystring

	lea	157(a2),a0
	lea	compstring(pc),a1
	moveq	#(compstringend-compstring),d7
	bsr.w	copystring

	lea	188(a2),a0
	lea	kickstring(pc),a1
	moveq	#(kickstringend-kickstring),d7
	bsr.w	copystring

	lea	219(a2),a0
	lea	chipstring(pc),a1
	moveq	#(chipstringend-chipstring),d7
	bsr.w	copystring

	lea	250(a2),a0
	lea	ffaststring(pc),a1
	moveq	#(ffaststringend-ffaststring),d7
	bsr.w	copystring

	lea	281(a2),a0
	lea	rfaststring(pc),a1
	moveq	#(rfaststringend-rfaststring),d7
	bsr.w	copystring

	lea	312(a2),a0
	lea	diskstring(pc),a1
	moveq	#(diskstringend-diskstring),d7
	bsr.w	copystring

	lea	391(a2),a0
	lea	hdstring(pc),a1
	moveq	#(hdstringend-hdstring),d7
	bsr.w	copystring

	lea	470(a2),a0
	lea	procstring(pc),a1
	moveq	#(procstringend-procstring),d7
	bsr.w	copystring

	lea	501(a2),a0
	lea	fpustring(pc),a1
	moveq	#(fpustringend-fpustring),d7
	bsr.w	copystring

	lea	532(a2),a0
	lea	mmustring(pc),a1
	moveq	#(mmustringend-mmustring),d7
	bsr.w	copystring

	lea	563(a2),a0
	lea	asmstring(pc),a1
	moveq	#(asmstringend-asmstring),d7
	bsr.w	copystring

	lea	642(a2),a0
	lea	reqstring(pc),a1
	moveq	#(reqstringend-reqstring),d7
	bsr.w	copystring

	lea	721(a2),a0
	lea	ext1string(pc),a1
	moveq	#(ext1stringend-ext1string),d7
	bsr.w	copystring

	lea	818(a2),a0
	lea	ext2string(pc),a1
	moveq	#(ext2stringend-ext2string),d7
	bsr.w	copystring

	lea	915(a2),a0
	lea	ext3string(pc),a1
	moveq	#(ext3stringend-ext3string),d7
	bsr.w	copystring

	bsr.w	setnulsnul

	moveq	#0,d7
	rts










;############################################################################
;#
;#	write message
;#
;############################################################################
doideareport:
;----------------------------------------------------------------------------
;	idea report
;----------------------------------------------------------------------------
	move.b	#1,bugidea
	bra.b	gettext

;----------------------------------------------------------------------------
;	bugreport
;----------------------------------------------------------------------------
dobugreport:
	move.b	#2,bugidea

gettext:
	lea	writereporttextb(pc),a0
	cmp.b	#1,bugidea
	beq.b	.settext

	lea	writereporttexta(pc),a0

.settext:
	moveq	#0,d1
	move.l	aedoorport(pc),a1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

	lea	writereporttext2(pc),a0
	moveq	#0,d1
	move.l	aedoorport(pc),a1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

	move.l	#tempfile,d1		;remove file van eventuele
	move.l	dosbase(pc),a6
	jsr	_lvodeletefile(a6)	;vorige user.

	lea	abouttext(pc),a0
	moveq	#0,d1
	move.l	aedoorport(pc),a1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

	move.l	aedoorport(pc),a1
	lea	niets(pc),a0
	moveq	#(aboutstrend-aboutstring),d1
	move.l	aebase(pc),a6
	jsr	_lvogetstr(a6)

	move.l	stringptr(pc),a0
	lea	aboutstring(pc),a1
	moveq	#(aboutstrend-aboutstring),d7
	bsr.w	copystring

;----------------------------------------------------------------------------
;	jump in internal editor
;	use file ram:asmbug_temp{x}
;	{x} = node nummer.
;----------------------------------------------------------------------------
	move.l	aedoorport(pc),a1
	lea	tempfile(pc),a0
	moveq	#9,d0			;jh-ef
	moveq	#70,d1
	move.l	aebase(pc),a6
	jsr	_lvosendstrcmd(a6)

	move.l	dataptr(pc),a0
	cmp.l	#1,(a0)
	bne.w	.nomsgwritten

	bsr.w	getlastmsgind1

	addq.l	#1,d1			;add 1 to number
	lea	msgnr(pc),a1
	move.l	masterplace(pc),a0
	lea	41(a0),a0
	rol.l	#8,d1
	rol.l	#8,d1
	moveq	#4,d7

.loop:
	move.b	d1,d0
	and.b	#15,d0			;place last message
	add.b	#"0",d0			;(increased with 1 )
	move.b	d0,(a0)+		;back into the system file
	move.b	d0,(a1)+		;and into the filename
	rol.l	#4,d1
	dbra	d7,.loop		;for the message.

	bsr.w	updatemaster

	move.l	#msgfile,d1
	move.l	#1004,d2		;mode-readwrite
	move.l	dosbase(pc),a6
	jsr	_lvoopen(a6)

	move.l	d0,msghandle
	beq.w	.msgerror

	bsr.w	clearinfo

	move.l	#tempfile,d1
	moveq	#-2,d2			;access-read
	move.l	dosbase(pc),a6
	jsr	_lvolock(a6)

	move.l	d0,templock
	beq.w	.msgerror

	move.l	d0,d1
	move.l	#fileinfo,d2
	move.l	dosbase(pc),a6
	jsr	_lvoexamine(a6)

	lea	fileinfo(pc),a0
	move.l	124(a0),tempsize
	move.l	templock(pc),d1
	move.l	dosbase(pc),a6
	jsr	_lvounlock(a6)

	move.l	tempsize(pc),d0
	move.l	#$10001,d1		;memf-public+memf-clear
	move.l	4.w,a6
	jsr	_lvoallocmem(a6)

	move.l	d0,tempplace
	beq.w	.msgerror

	move.l	#tempfile,d1
	move.l	#1004,d2		;mode-readwrite
	move.l	dosbase(pc),a6
	jsr	_lvoopen(a6)

	move.l	d0,temphandle
	beq.w	.msgerror

	move.l	temphandle(pc),d1
	move.l	tempplace(pc),d2
	move.l	tempsize(pc),d3
	move.l	dosbase(pc),a6
	jsr	_lvoread(a6)

	cmp.l	tempsize(pc),d0
	bne.w	.msgerror

	move.l	temphandle(pc),d1
	move.l	dosbase(pc),a6
	jsr	_lvoclose(a6)

	move.l	#0,temphandle
	move.l	msghandle(pc),d1
	move.l	#userinfostart,d2
	move.l	#(userinfoend-userinfostart),d3
	move.l	dosbase(pc),a6
	jsr	_lvowrite(a6)

	move.l	msghandle(pc),d1
	move.l	#aboutmsg,d2
	move.l	#(aboutstrend-aboutmsg),d3
	move.l	dosbase(pc),a6
	jsr	_lvowrite(a6)

	move.l	msghandle(pc),d1
	move.l	#linetext,d2
	moveq	#(linetextend-linetext),d3
	move.l	dosbase(pc),a6
	jsr	_lvowrite(a6)

	move.l	msghandle(pc),d1
	move.l	tempplace(pc),d2
	move.l	tempsize(pc),d3
	move.l	dosbase(pc),a6
	jsr	_lvowrite(a6)

	move.l	msghandle(pc),d1
	move.l	dosbase(pc),a6
	jsr	_lvoclose(a6)

	move.l	#0,msghandle
	move.l	tempplace(pc),a1
	move.l	tempsize(pc),d0
	move.l	4.w,a6
	jsr	_lvofreemem(a6)

	move.l	#0,tempplace
	move.l	#0,tempsize
	lea	msgwrittentext(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

	move.l	aedoorport(pc),a1
	lea	niets(pc),a0
	move.l	aebase(pc),a6
	jsr	_lvohotkey(a6)		;goto bug/idea reporter

	bra.w	enddoor

.msgerror:
	tst.l	templock
	beq.b	.notemplock

	move.l	templock(pc),d1
	move.l	dosbase(pc),a6
	jsr	_lvounlock(a6)

	move.l	#0,templock

.notemplock:
	tst.l	temphandle
	beq.b	.notemphandle

	move.l	temphandle(pc),d1
	move.l	dosbase(pc),a6
	jsr	_lvoclose(a6)

	move.l	#0,temphandle

.notemphandle:
	tst.l	tempplace
	beq.b	.notempplace

	move.l	tempplace(pc),a1
	move.l	tempsize(pc),d0
	move.l	4.w,a6
	jsr	_lvofreemem(a6)

	move.l	#0,tempplace
	move.l	#0,tempsize

.notempplace:
	lea	msgerrortext(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

	bra.w	enddoor

.nomsgwritten:
	lea	msgaborttext(pc),a0
	move.l	aedoorport(pc),a1
	moveq	#0,d1
	move.l	aebase(pc),a6
	jsr	_lvowritestr(a6)

	bra.w	enddoor










;############################################################################
;#
;#	second section of the code
;#
;############################################################################
;	section	reporterdata,data

	cnop	0,4

fileinfo:
	dcb.b	260,0

	cnop	0,4

configlock:
	dc.l	0

configsize:
	dc.l	0

configplace:
	dc.l	0

confighandle:
	dc.l	0

betalock:
	dc.l	0

betasize:
	dc.l	0

betaplace:
	dc.l	0

betahandle:
	dc.l	0

betauser:
	dc.l	0

masterlock:
	dc.l	0

mastersize:
	dc.l	0

masterplace:
	dc.l	0

masterhandle:
	dc.l	0

msghandle:
	dc.l	0

templock:
	dc.l	0

tempsize:
	dc.l	0

tempplace:
	dc.l	0

temphandle:
	dc.l	0

aebase:
	dc.l	0

aedoorport:
	dc.l	0

dosbase:
	dc.l	0

dataptr:
	dc.l	0

stringptr:
	dc.l	0

newuserplace:
	dc.l	0

betatesterplace:
	dc.l	0

datestruct:
	dc.l	0,0,0,$3000000		;format
	dc.w	0
	dc.l	datestring
	dc.w	0,0

datestring:
	dc.l	0,0

nultable:
	dc.l	nul0
	dc.l	nul1
	dc.l	nul2
	dc.l	nul3
	dc.l	nul4
	dc.l	nul5
	dc.l	nul6
	dc.l	nul7
	dc.l	nul8
	dc.l	nul9
	dc.l	nul10
	dc.l	nul11
	dc.l	nul12
	dc.l	nul13
	dc.l	nul14
	dc.l	nul15
	dc.l	nul16
	dc.l	nul17
	dc.l	-1

asktable:
	dc.l	compask
	dc.l	comp00,9
	dc.l	compans
	dc.l	procask
	dc.l	proc00,5
	dc.l	procans
	dc.l	fpuask
	dc.l	fpu0,3
	dc.l	fpuans
	dc.l	mmuask
	dc.l	mmu0,4
	dc.l	mmuans
	dc.l	kickask
	dc.l	kick0,4
	dc.l	kickans
	dc.l	chipask
	dc.l	chipm0,5
	dc.l	chipans
	dc.l	ffastask
	dc.l	ffast0,6
	dc.l	ffastans
	dc.l	rfastask
	dc.l	rfast0,6
	dc.l	rfastans
	dc.l	-1,-1,-1

	cnop	0,4

compans:
	dc.b	0

procans:
	dc.b	0

fpuans:
	dc.b	0

mmuans:
	dc.b	0

kickans:
	dc.b	0

chipans:
	dc.b	0

ffastans:
	dc.b	0

rfastans:
	dc.b	0

newuser:
	dc.b	0

userchange:
	dc.b	0

bugidea:
	dc.b	0

aelibname:
	dc.b	"AEDoor.library",0

dosname:
	dc.b	"dos.library",0

lhacommand:
	dc.b	"C:Lha a Doors:AsmOne/AllMsg.Lha Doors:AsmOne/Messages/Msg_#?",0

messagefile:
	dc.b	"Doors:AsmOne/AllMsg.Lha",0

userfile:
	dc.b	"Doors:AsmOne/Reporter.UserConfig",0

betafile:
	dc.b	"Doors:AsmOne/Reporter.BetaConfig",0

masterfile:
	dc.b	"Doors:AsmOne/Reporter.SystemConfig",0

asmbackfile:
	dc.b	"Doors:AsmOne/AsmOne.Backup.Lha",0

asmonefile:
	dc.b	"Doors:AsmOne/AsmOne.Lha",0

asmonedir:
	dc.b	"Doors:AsmOne/",0

msgfile:
	dc.b	"Doors:AsmOne/Messages/Msg_"

msgnr:
	dc.b	"     "

msgnrend:
	dc.b	0

tempfile:
	dc.b	"Ram:AsmOne_Temp"

nodenumber:
	dc.b	" ",0

error1:
	dc.b	"Unable To Lock / Examine UserFile     ",0

error2:
	dc.b	"Insufficient Memory To Load UserFile  ",0

error3:
	dc.b	"Unable To Read UserFile               ",0

error4:	
	dc.b	"Read / Write Error -> UserFile        ",0

error5:
	dc.b	"Insufficient Memory To Load BetaFile  ",0

error6:
	dc.b	"Unable To Read BetaFile               ",0

error7:
	dc.b	"Read / Write Error -> BetaFile        ",0

error8:
	dc.b	"Insufficient Memory To Load SystemFile",0

error9:	
	dc.b	"Unable To Read SystemFile             ",0

error10:
	dc.b	"Read / Write Error -> SystemFile      ",0

msgerrortext:
	dc.b	$a,$d
	dc.b	"Unable To Create Message To System Manager. Please Inform Sysop",0

msgwrittentext:
	dc.b	$a,$d
	dc.b	"Message Written. Price Will Be Notified The First Time He Logges In"

pressanykey:
	dc.b	$a,$d,$a,$d
	dc.b	"Press Any Key To Return To The Board",$a,$d,0

msgaborttext:
	dc.b	$a,$d
	dc.b	"Message Aborted, Returning To The Board",$a,$d,0

packingtext:
	dc.b	$a,$d
	dc.b	"Packing All Messages For DownLoading! Hold On ...",$a,$d,0

packingdonetext:
	dc.b	$a,$d
	dc.b	"Done! Press Any Key To Start DownLoading",$a,$d,0

msgdlerror:
	dc.b	$a,$d
	dc.b	"DownLoad Incomplete. All Stats Will Remain",$a,$d
	dc.b	"Returning To The Board",$a,$d,0

msgdldone:
	dc.b	$a,$d
	dc.b	"DownLoad Complete. All Stats Updated",$a,$d
	dc.b	"Returning To The Board",$a,$d,0

usermenu1a:
	dc.b	$a,$d
	dc.b	"User Menu",$a,$a,$d
	dc.b	"[V] = View Your Configuration",$a,$d
	dc.b	"[C] = Change Your Configuration",$a,$d
	dc.b	"[B] = Write Bug Message",$a,$d,0

usermenu1b:
	dc.b	"[I] = Write Idea Message",$a,$d
	dc.b	"[Q] = Quit For Board",$a,$a,$d
	dc.b	"Please Choose Option [ ]",$a,$a,$d
	dc.b	"--------------------------------------------",$1b,"[13;23H",0

writereporttexta:
	dc.b	$c,$a,$d
	dc.b	"Please Enter Your Bug ",0

writereporttextb:
	dc.b	$c,$a,$d
	dc.b	"Please Enter Your Idea ",0

writereporttext2:
	dc.b	"Report. Be As Precise As Possible !",$a,$d,0

hellotext:
	dc.b	$c,$a,$d
	dc.b	"Hello ",0

welcometext2:
	dc.b	$c

welcometext:
	dc.b	$a,$d
	dc.b	"Welcome Back To This Incredible System Dude!",$a,$d
	dc.b	"--------------------------------------------",0

sysmenutextdl:
	dc.b	$a,$d
	dc.b	"System Manager Menu",$a,$a,$d
	dc.b	"[D] = Download Messages",$a,$d
	dc.b	"[U] = Upload New Asm-One",$a,$d
	dc.b	"[Q] = Quit For Board",$a,$a,$d
	dc.b	"Please Choose Option [ ]",$a,$a,$d
	dc.b	"--------------------------------------------",$1b,"[12;23H",0

sysmenutextnodl:
	dc.b	$a,$d
	dc.b	"System Manager Menu",$a,$a,$d
	dc.b	"[U] = Upload New Asm-One",$a,$d
	dc.b	"[Q] = Quit For Board",$a,$a,$d
	dc.b	"Please Choose Option [ ]",$a,$a,$d
	dc.b	"--------------------------------------------",$1b,"[11;23H",0

startupload:
	dc.b	$a,$a,$d
	dc.b	"Well, Start Uploading In Z-Modem Then ...",$a,$d,0

uploaddonetext:
	dc.b	$a,$a,$d
	dc.b	"Upload Completed.",$a,$d
	dc.b	"Updating Latest Asm-One Version ...",$a,$d,0

uploaderrortext:
	dc.b	$a,$a,$d
	dc.b	"Upload Incomplete.",$a,$d
	dc.b	"Last Version Of Asm-One Will Stay Online ...",$a,$d,0

abouttext:
	dc.b	$a,$d
	dc.b	"What's It About :",$a,$d
	dc.b	"[",$1b,"[5;78H]",$1b,"[5;2H",0

betamenunodl1a:
	dc.b	$a,$d
	dc.b	"BetaTester Menu",$a,$a,$d
	dc.b	"[V] = View Your Configuration",$a,$d
	dc.b	"[C] = Change Your Configuration",$a,$d
	dc.b	"[B] = Write Bug Message",$a,$d,0

betamenunodl1b:
	dc.b	"[I] = Write Idea Message",$a,$d
	dc.b	"[Q] = Quit For Board",$a,$a,$d
	dc.b	"Please Choose Option [ ]",$a,$a,$d
	dc.b	"--------------------------------------------",$1b,"[13;23H",0

betamenudl1a:
	dc.b	$a,$d
	dc.b	"BetaTester Menu",$a,$a,$d
	dc.b	"[V] = View Your Configuration",$a,$d
	dc.b	"[C] = Change Your Configuration",$a,$d
	dc.b	"[B] = Write Bug Message",$a,$d,0

betamenudl1b:
	dc.b	"[I] = Write Idea Message",$a,$d
	dc.b	"[D] = DownLoad New Asm-One",$a,$d
	dc.b	"[Q] = Quit For Board",$a,$a,$d
	dc.b	"Please Choose Option [ ]",$a,$a,$d
	dc.b	"--------------------------------------------",$1b,"[14;23H",0

dlerrortext:
	dc.b	$a,$d
	dc.b	"** Error **",$a,$d,$a,$d
	dc.b	"It Seems That Your Download Wasn't Completed, Your Last Asm-One Version",$a,$d
	dc.b	"Will Not Be Updated",$a,$d,0

dloktext:
	dc.b	$a,$d
	dc.b	"** DownLoad Completed **",$a,$d,$a,$d
	dc.b	"You Now Have The Latest Version Of Asm-One. Your Statistics Will Be",$a,$d
	dc.b	"Updated. Have Phun And Report Bug's As Soon As Possible",$a,$d,0

getuserinfotext:
	dc.b	$c,$a,$d
	dc.b	$1b,"[36;40;3m",$1b,"[2;25HAsm-One Reporter v1.3",$a,$d,$a,$d
	dc.b	$1b,"[31;40;0mWelcome ",0

getuserinfotext2a:
	dc.b	", I Didn't Find You In My UserData File !",$a,$d,$a,$d
	dc.b	"You Will Have To Fill In The Next Few Questions. These Questions",$a,$d
	dc.b	"Concern Your Standard Programming Environment And SetUp ...",$a,$d,0

getuserinfotext2b:
	dc.b	", You Want To Change Your Standard Configuration !",$a,$d,$a,$d
	dc.b	"You Will Have To Fill In The Next Few Questions. These Questions",$a,$d
	dc.b	"Concern Your Standard Programming Environment And SetUp ...",$a,$d,0

getuserinfotext3:
	dc.b	$a,$d
	dc.b	"Please Answer As Precise As Possible. This Will Provide Me With",$a,$d
	dc.b	"The Posibility To Correctly Check The Reported Message Out MySelf",$a,$d,0

wanbttoconttext:
	dc.b	$a,$d
	dc.b	"Do You Want To Continue (Y/N) : ",0

asktext:
	dc.b	$a,$d
	dc.b	$1b,"[31;40;3m",$1b,"[15;2HYour Choise : ",$1b,"[31;40;0m[ ]      ",$1b,"[31;40;3m(choose 1-"

maxchoose:
	dc.b	" )",$1b,"[31;40;0m",$1b,"[15;17H",0

specifyhdtext:
	dc.b	$c,$a,$d
	dc.b	"Please Specify Size, Type And Sort Of HardDisk(s) You Use",$a,$d
	dc.b	"[",$1b,"[3;60H]",$1b,"[3;2H",0

askdisktext:
	dc.b	$c,$a,$d
	dc.b	"How Many DiskDrives Do You Use And Are They DD Or HD",$a,$d
	dc.b	$1b,"[31;40;3m(Mention Things Like DualDrives And FastCopiers)",$a,$d
	dc.b	$1b,"[0m[",$1b,"[4;60H]",$1b,"[4;2H",0

askasmtext:
	dc.b	$c,$a,$d
	dc.b	"Please Specify Which Asm-One Version You Are Currently Using",$a,$d
	dc.b	"[",$1b,"[3;60H]",$1b,"[3;2H",0

askreqtext:
	dc.b	$c,$a,$d
	dc.b	"Please Specify Which ReqTools Version You Are Currently Using",$a,$d
	dc.b	"[",$1b,"[3;60H]",$1b,"[3;2H",0

askexttext:
	dc.b	$c,$a,$d
	dc.b	"Please Specify Which Extensions You Are Currently Using",$a,$d
	dc.b	$1b,"[31;40;3m(DSP, CPU Board Type, Memory Board Type, Etc. 3 Lines Max)",$a,$d
	dc.b	$1b,"[0m",0

	cnop	0,4

ext1postext:
	dc.b	$1b,"[4;0H[",$1b,"[4;78H]",$1b,"[4;2H",0

ext2postext:
	dc.b	$1b,"[5;0H[",$1b,"[5;78H]",$1b,"[5;2H",0

ext3postext:
	dc.b	$1b,"[6;0H[",$1b,"[6;78H]",$1b,"[6;2H",0

	cnop	0,4

comp00:
	dc.b	$1b,"[05;2H1.) Amiga 500   ",0

comp01:
	dc.b	$1b,"[06;2H2.) Amiga 500+  ",0

comp02:
	dc.b	$1b,"[07;2H3.) Amiga 600   ",0

comp03:
	dc.b	$1b,"[08;2H4.) Amiga 1000  ",0

comp04:
	dc.b	$1b,"[09;2H5.) Amiga 1200  ",0

comp05:
	dc.b	$1b,"[10;2H6.) Amiga 2000  ",0

comp06:
	dc.b	$1b,"[11;2H7.) Amiga 2500  ",0

comp07:
	dc.b	$1b,"[12;2H8.) Amiga 3000  ",0

comp08:
	dc.b	$1b,"[13;2H9.) Amiga 4000  ",0

fpu0:
	dc.b	$1b,"[05;2H1.) None        ",0

fpu1:
	dc.b	$1b,"[06;2H2.) Mc68881     ",0

fpu2:
	dc.b	$1b,"[07;2H3.) Mc68882     ",0

proc00:
	dc.b	$1b,"[05;2H1.) MC68000     ",0

proc10:
	dc.b	$1b,"[06;2H2.) Mc68010     ",0

proc20:
	dc.b	$1b,"[07;2H3.) Mc68020     ",0

proc30:
	dc.b	$1b,"[08;2H4.) Mc68030     ",0

proc40:
	dc.b	$1b,"[09;2H5.) Mc68040     ",0

mmu0:
	dc.b	$1b,"[05;2H1.) None        ",0

mmu1:
	dc.b	$1b,"[06;2H2.) Mc68030     ",0

mmu2:
	dc.b	$1b,"[07;2H3.) Mc68040     ",0

mmu3:
	dc.b	$1b,"[08;2H4.) Mc68851     ",0

kick0:
	dc.b	$1b,"[05;2H1.) 1.0/1.1     ",0

kick1:
	dc.b	$1b,"[06;2H2.) 1.2/1.3     ",0

kick2:
	dc.b	$1b,"[07;2H3.) 2.0+        ",0

kick3:
	dc.b	$1b,"[08;2H4.) 3.0+        ",0

chipm0:
	dc.b	$1b,"[05;2H1.) 256 Kb      ",0

chipm1:
	dc.b	$1b,"[06;2H2.) 512 Kb      ",0

chipm2:
	dc.b	$1b,"[07;2H3.) 1.0 Mb      ",0

chipm3:
	dc.b	$1b,"[08;2H4.) 1.5 Mb      ",0

chipm4:
	dc.b	$1b,"[09;2H5.) 2.0 Mb +    ",0

ffast0:
	dc.b	$1b,"[05;2H1.) None        ",0

ffast1:
	dc.b	$1b,"[06;2H2.) 512 Kb      ",0

ffast2:
	dc.b	$1b,"[07;2H3.) 1.0 Mb      ",0

ffast3:
	dc.b	$1b,"[08;2H4.) 1.5 Mb      ",0

ffast4:
	dc.b	$1b,"[09;2H5.) 2.0 Mb      ",0

ffast5:
	dc.b	$1b,"[10;2H6.) 4.0 Mb +    ",0

rfast0:
	dc.b	$1b,"[05;2H1.) None        ",0

rfast1:
	dc.b	$1b,"[06;2H2.) 1.0 Mb +    ",0

rfast2:
	dc.b	$1b,"[07;2H3.) 2.0 Mb +    ",0

rfast3:
	dc.b	$1b,"[08;2H4.) 4.0 Mb +    ",0

rfast4:
	dc.b	$1b,"[09;2H5.) 8.0 Mb +    ",0

rfast5:
	dc.b	$1b,"[10;2H6.) 16.0 Mb +   ",0

	cnop	0,4

tfaproducttext:
	dc.b	$a,$d,$a,$d,$a,$d,$a,$d
	dc.b	$1b,"[36;40;3mAsm-One Reporter V1.3 ",$1b,"[0mAnother Quality Product By T.F.A.",$a,$d,$a,$d,0

compask:
	dc.b	$c,$a,$d
	dc.b	"Please Specify Which Amiga System You Use For Programming",$a,$d
	dc.b	"(Cpu, Fpu, Mmu Questions Will Follow, Just Specify ComputerType)",0

procask:
	dc.b	$c,$a,$d
	dc.b	"Please Specify Which Processor Is In The System You Use To",$a,$d
	dc.b	"Program On Usualy. (This Will Be Used As Default)",0

fpuask:
	dc.b	$c,$a,$d
	dc.b	"Please Specify Which Floating Point Unit Your System Contains.",0

mmuask:
	dc.b	$c,$a,$d
	dc.b	"Please Specify Which Memory Management Unit (Mmu) Your System Contains",$a,$d
	dc.b	"-> If You Have An Mc68030 Or Mc68040 Specify So. the Lc And Ec Versions",$a,$d
	dc.b	"   Of Those Processors Do Not Contain An Mmu!",0

kickask:
	dc.b	$c,$a,$d
	dc.b	"Please Specify Which KickStart Version You Are Programming On",$a,$d
	dc.b	"If Your KickStart Isn't Specified Below Please Choose The Most",$a,$d
	dc.b	"Compatible One.",0

chipask:
	dc.b	$c,$a,$d
	dc.b	"Please Specify How Much Chip (Dma) Memory Your System Contains",$a,$d
	dc.b	"If You Have A Size Which Isn't Specified Please Choose The One",$a,$d
	dc.b	"Which Comes The Closest",0

ffastask:
	dc.b	$c,$a,$d
	dc.b	"Please Specify How Much Fake Fast (16Bit) Memory Your System",$a,$d
	dc.b	"Contains. If You Have A Size Which Isn't Specified Please Choose",$a,$d
	dc.b	"The One Which Comes The Closest",0

rfastask:
	dc.b	$c,$a,$d
	dc.b	"Please Specify How Much Real Fast (32Bit) Memory Your System",$a,$d
	dc.b	"Contains. If You Have A Size Which Isn't Specified Please Choose",$a,$d
	dc.b	"The One Which Comes The Closest",0

asmdate:
	dc.b	$a,$d
	dc.b	"Do You Wish To DownLoad This Version Now (Y/N) : [ ]",$1b,"[7;51H",0

profiltext:
	dc.b	$c,$a,$d
	dc.b	"System Configuration For : ",0

	cnop	0,4

comptext:
	dc.b	$1b,"[04;2HComputer Type     : ",0

proctext:
	dc.b	$1b,"[05;2HCpu               : ",0

fputext:
	dc.b	$1b,"[06;2HFpu               : ",0

mmutext:
	dc.b	$1b,"[07;2HMmu               : ",0

kicktext:
	dc.b	$1b,"[08;2HKickStart         : ",0

chiptext:
	dc.b	$1b,"[09;2HChip Mem  (Dma)   : ",0

ffasttext:
	dc.b	$1b,"[10;2HFake Fast (16Bit) : ",0

rfasttext:
	dc.b	$1b,"[11;2HReal Fast (32Bit) : ",0

hdtext:
	dc.b	$1b,"[12;2HHardDisk(s)       : ",0

ddtext:
	dc.b	$1b,"[13;2HDiskDrive(s)      : ",0

asmtext:
	dc.b	$1b,"[14;2HAsm-One Version   : ",0

reqtext:
	dc.b	$1b,"[15;2HReqTools Library  : ",0

ext1text:
	dc.b	$1b,"[16;2HExtension(s)"
	dc.b	$1b,"[17;2H",0

ext2text:
	dc.b	$1b,"[18;2H",0

ext3text:
	dc.b	$1b,"[19;2H",0

empty0:
	dc.b	$1b,"[05;2H                                                                        ",0

empty1:
	dc.b	$1b,"[06;2H                                                                        ",0

empty2:
	dc.b	$1b,"[07;2H                                                                        ",0

empty3:
	dc.b	$1b,"[08;2H                                                                        ",0

empty4:
	dc.b	$1b,"[09;2H                                                                        ",0

empty5:
	dc.b	$1b,"[10;2H                                                                        ",0

empty6:
	dc.b	$1b,"[11;2H                                                                        ",0

empty7:
	dc.b	$1b,"[12;2H                                                                        ",0

empty8:
	dc.b	$1b,"[13;2H                                                                        ",0

	cnop	0,4

niets:
	dcb.b	100,0

	cnop	0,4

username2:
	dcb.b	32,0

	cnop	0,4

asmver:
	dcb.b	8,0

	cnop	0,4

linetext:
	dc.b	$a
	dc.b	"------------------------------------------------------------------",$a
linetextend:

	cnop	0,4

aboutmsg:
	dc.b	"==================================================================",$a
	dc.b	"About : "
aboutmsgend:

aboutstring:
	dcb.b	76,0
aboutstrend:
	dc.b	0

	cnop	0,4

userinfostart:
	dc.b	"User Slot         : "

userslot:
	dcb.b	10,0
userslotend:

nul0:
	dc.b	0
	dc.b	"User Name         : "

username:
	dcb.b	32,0
usernameend:

nul1:
	dc.b	0
	dc.b	"User Location     : "

userloc:
	dcb.b	32,0
userlocend:

nul2:
	dc.b	0
	dc.b	"Computer Type     : "

compstring:
	dcb.b	10,0
compstringend:

nul3:
	dc.b	0
	dc.b	"KickStart Used    : "

kickstring:
	dcb.b	10,0
kickstringend:

nul4:
	dc.b	0
	dc.b	"Chip Memory       : "

chipstring:
	dcb.b	10,0
chipstringend:

nul5:
	dc.b	0
	dc.b	"Fake Fast Memory  : "

ffaststring:
	dcb.b	10,0
ffaststringend:

nul6:
	dc.b	0
	dc.b	"Real Fast Memory  : "

rfaststring:
	dcb.b	10,0
rfaststringend:

nul7:
	dc.b	0
	dc.b	"DiskDrive(s)      : "

diskstring:
	dcb.b	58,0
diskstringend:

nul8:
	dc.b	0
	dc.b	"HardDisk(s)       : "

hdstring:
	dcb.b	58,0
hdstringend:

nul9:
	dc.b	0
	dc.b	"Processor         : "

procstring:
	dcb.b	10,0
procstringend:

nul10:
	dc.b	0
	dc.b	"Floating Point    : "

fpustring:
	dcb.b	10,0
fpustringend:

nul11:
	dc.b	0
	dc.b	"Memory Management : "

mmustring:
	dcb.b	10,0
mmustringend:

nul12:
	dc.b	0
	dc.b	"Asm-One Version   : "

asmstring:
	dcb.b	58,0
asmstringend:

nul13:
	dc.b	0
	dc.b	"ReqTools Version  : "

reqstring:
	dcb.b	58,0
reqstringend:

nul14:
	dc.b	0
	dc.b	"Extensions        : "

ext1string:
	dcb.b	76,0
ext1stringend:

nul15:
	dc.b	0
	dc.b	"                  : "

ext2string:
	dcb.b	76,0
ext2stringend:

nul16:
	dc.b	0
	dc.b	"                  : "

ext3string:
	dcb.b	76,0
ext3stringend:

nul17:
	dc.b	0
userinfoend:
