- Feb
- 16
- 0
Latest TCC version.
No problems with SETDOS from the command line.
From within a BTM:
set XSTR=-245689A
setdos /x%XSTR
setdos
and then later:
set XSTR=-24689A
setdos /x%XSTR
setdos
After the first setting, setdos will show EXPANSION=245689A
After the second, setdos will still show EXPANSION=245689A
If a setdos /x0 is performed prior to the second setting, then the results are as expected.
The following produces the problem every time.
No problems with SETDOS from the command line.
From within a BTM:
set XSTR=-245689A
setdos /x%XSTR
setdos
and then later:
set XSTR=-24689A
setdos /x%XSTR
setdos
After the first setting, setdos will show EXPANSION=245689A
After the second, setdos will still show EXPANSION=245689A
If a setdos /x0 is performed prior to the second setting, then the results are as expected.
The following produces the problem every time.
Code:
@echo off
setlocal
alias safemode=gosub setdosx safe
alias semisafe=gosub setdosx semi
alias unsafe=gosub setdosx off
goto start
:: ---------------------------------------------------------
:setdosx [mode]
switch "%mode"
case "safe"
set SETDOSX_MODE=-245689A
case "semi"
set SETDOSX_MODE=-24589A
default
set SETDOSX_MODE=0
endswitch
setdos /x%SETDOSX_MODE
RETURN
:: ---------------------------------------------------------
:test [mode]
echo Checking %mode
%mode
echo SETDOSX_MODE=%SETDOSX_MODE
setdos
echo ----------
pause
return
:: ---------------------------------------------------------
:start
gosub test safemode
gosub test semisafe
gosub test unsafe
gosub test safemode
gosub test unsafe