The Write and Writeln procedures are unable to send the necessary control sequences to change the text mode to 40 columns black and white; use the Unitwrite procedure instead. The correct syntax is: Program Demo; Var ans :String; Procedure Control (number:integer); Var tryit :CHAR; Begin tryit := CHR (number); Unitwrite (1, tryit, 1, , 12); End; Begin Control (16); Control (0); Readln (ANS); End.