@echo off
echo .
echo .
echo . create an RxDOS boot floppy 
echo . ------------------------------------------
echo .

if %1x==x goto Help
if %1==h goto Help
if %1==help goto Help
if %1==-h goto Help
if %1==-help goto Help
if %1==? goto Help

if %1==a: goto GoMake
if %1==A: goto GoMake
if %1==b: goto GoMake
if %1==B: goto GoMake
goto Bad_Parameter

:GoMake
if not exist rxdosbio.sys goto Cant_Copy
if not exist rxdos.sys goto Cant_Copy
if not exist rxdoscmd.exe goto Cant_Copy

echo do you want to write to disk %1 ?
echo (control-C to abort)
pause 

dir/w %1
echo .
echo . Disk in drive %1: should not have any files
echo . and should be formatted.  This above directory 
echo . will help you decide whether you want to erase 
echo . all files.
echo . 
echo . If there are any files you must delete them.
echo . continue ?
echo (control-C to abort)
pause 

echo .
echo . rxd_boot first places a boot program on the boot sector.
rxd_boot %1

echo .
echo . 
copy rxdosbio.sys %1
copy rxdos.sys %1
copy rxdoscmd.exe %1

echo . copy completed.
dir/w %1
goto Done

:Cant_Copy
echo .
echo . Could not find one or more of these files:
echo .   rxdosbio.sys, rxdos.sys, rxdoscmd.exe
echo .
echo . (you must run makeboot from the rxdos files directory)
goto Done

:Bad_Parameter
echo .
echo . Bad parameter  '%1'
echo .

:Help
echo . Help info:
echo .
echo . makeboot drive:
echo .

:Done
