echo off
echo.
echo ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
echo ³ Choose the boot configuration for the next boot ³
echo ³ By Prof. Timo Salmi, ts@uwasa.fi, Tue 15-Sep-92 ³
echo ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
echo.

rem Put a line with the word "Description:" into your alternative
rem autoexec.bat files to show which boot is now on, E.g.
rem Description: LastByte upper memory manager boot

rem Prevent accidental booting with a program from TSTSR*.ZIP
rem Also needs mark-release from Turbo Power TSRCOM*.ZIP
if not exist c:\tuki\noboot.exe goto _checkpar
mark bootd > nul
c:\tuki\noboot > nul

rem If no parameter give help, and show the current boot choice
:_checkpar
if "%1"=="" goto _help

rem Turn off the read-only attribute
attrib -r c:\autoexec.bat
attrib -r c:\config.sys

rem Choose the next boot
for %%f in (1 2 3 4 5 6) do if "%1"=="%%f" goto _%%f
echo Unknown option %1
echo.
goto :_help

:_1
copy c:\confnorm.sys c:\config.sys > nul
copy c:\autonorm.bat c:\autoexec.bat > nul
goto _common

:_2
copy c:\conftlb.sys c:\config.sys > nul
copy c:\autotlb.bat c:\autoexec.bat > nul
goto _common

:_3
copy c:\confcd.sys c:\config.sys > nul
copy c:\autocd.bat c:\autoexec.bat > nul
goto _common

:_4
copy c:\conftest.sys c:\config.sys > nul
copy c:\autotest.bat c:\autoexec.bat > nul
goto _common

:_5
copy c:\confntsr.sys c:\config.sys > nul
copy c:\autontsr.bat c:\autoexec.bat > nul
goto _common

:_6
copy c:\confansi.sys c:\config.sys > nul
copy c:\autoansi.bat c:\autoexec.bat > nul
goto _common

rem Instructions to the user
:_common
set _return=_altcd
goto _subru
:_altcd
echo.
echo ALT-CTRL-DEL to boot

rem Turn on the read-only attribute for safety
attrib +r c:\autoexec.bat
attrib +r c:\config.sys
goto :_out

rem Help for the user.  Customize as appropriate. If you have a number
rem of options from mine, also edit the "for" statement earlier
:_help
echo Usage: BOOT [Choice]
echo.
echo 1 = My normal MsDos 3.3 boot
echo 2 = LastByte upper memory manager boot
echo 3 = CDROM boot
echo 4 = Test configuration
echo 5 = MsDos 3.3 boot with no TSRs loaded
echo 6 = LastByte upper memory manager boot with ansi
echo.
set _return=_out

:_subru
rem Batch subroutine to show which boot choice is the currently selected
echo The current boot is
find "Description:" c:\autoexec.bat
goto %_return%

:_out
set _return=
if exist c:\tuki\noboot.exe release bootd > nul
echo on
