;
;	>>> SillyPack - Beep'em All Loader by JAC! <<<
;
;	Thanks to xxl for this support regarding xBIOS.
;	Output file extension must be patched in "xbios-2.0.com" manually.
;	The resulting XAUTORUN file my be located in the root directory of the disk.
;
;	@com.wudsn.ide.asm.outputfile=XAUTORUN.bee

xBIOS			= $800
xBIOS_LOAD_FILE 	= xBIOS+$06
xBIOS_CHANGE_DIR	= xBIOS+$2d

	org  $600	;Anyway used by BEEP4.COM

	.proc loader

	ldy #<dir1
	ldx #>dir1
	jsr xBIOS_CHANGE_DIR
	bcs error

	ldy #<dir2
	ldx #>dir2
	jsr xBIOS_CHANGE_DIR
	bcs error

	ldy #<xexfile
	ldx #>xexfile
	jsr xBIOS_LOAD_FILE
	bcs error
error	mva #$34 712
	lda 764
	cmp #$ff
	beq error
	jmp $e477

dir1	.byte c'DEMO       '
dir2	.byte c'BEEPEMAL   '
xexfile .byte c'BEEP4   COM'
	.endp
	
	run loader
