In TurboPascal program i took an advantage of DOS processed output and use Tab control character to form columns in the output:
const Tab = #09;
...
Writeln(X, Tab, F(X));
However, when i tried to add a pause
-like functionality via ReadKey
call and used Crt
module, processed output broke, and the statement illustrated above began writing generic Tab glyph instead forming columns at the tab stops.
As i figured out, source of this phenomenon is AssignCrt(Output)
call at the module initialization, which redefines means how Writeln
works - it no longer uses DOS for output, but either video BIOS or direct video memory access (depending on DirectVideo
value) instead.
How do i reverse whatever AssignCrt
does? As far as i know from the documentation, there Crt
module provides no means to restore normal output.