When I was using VT420 (and VT520) video terminals I used this Escape sequence sometimes because it is useful. It can 'lock' the top and bottom part of the screen - so scrolling is only done in the area between. (works on Windows 10 and on systems that support ANSI ESC codes):
Code: Select all
@echo off
REM see VT420 Programmer Reference Manual
REM Set Top and Bottom Margins (DECSTBM)
REM page 134 (pdf page 156/378)
call :makebinvalue 27 DEL
mode CON: COLS=80 LINES=24
cls
for /L %%f in (1,1,24) do echo Some text %%f
echo %chr27%[4;20;r
dir %systemroot%
echo Press enter key many times...
goto :EOF
:makebinvalue
REM par1=value
REM par2: if value is DEL then variable is defined and tmp file is deleted
md _chrs_>nul 2>nul
set "options=/d compress=off /d reserveperdatablocksize=26"
if %~1 neq 26 (type nul >_chrs_\t.tmp
makecab %options% /d reserveperfoldersize=%~1 _chrs_\t.tmp _chrs_\%~1.chr >nul
type _chrs_\%~1.chr | (
(for /l %%N in (1 1 38) do pause)>nul&findstr "^">_chrs_\t.tmp)
>nul copy /y _chrs_\t.tmp /a _chrs_\%~1.chr /b
del _chrs_\t.tmp
) else (copy /y nul + nul /a _chrs_\26.chr /a >nul)
if "%2"=="DEL" (
for /F "delims=" %%y in (_chrs_\%1.chr) do set "chr%1=%%y"
del _chrs_\%1.chr
rd _chrs_
)
goto :EOF
(Manuals can still be downloaded www.kockarna.si/vt.zip)