[Simh] SIMH console settings for escape sequence support

J. David Bryan jdbryan at acm.org
Fri Jan 1 16:16:05 EST 2016


On Friday, January 1, 2016 at 22:02, Johnny Billquist wrote:

> Um. What does 7B and 7P stand for here?

>From the "Writing a Simulator for the SIMH System" manual:

   SIMH provides routines to convert ASCII input characters to the
   format expected VM, and to convert VM-supplied ASCII characters to
   C-standard format.  [...]  The supported modes are:

     TTUF_MODE_8B: 8b mode; no conversion.

     TTUF_MODE_7B: 7b mode; the high-order bit is masked off.

     TTUF_MODE_7P: 7b printable mode; the high-order bit is masked off.
     In addition, on output, if the character is not printable, -1 is
     returned. 

     TTUF_MODE_UC: 7b upper case mode; the high-order bit is masked off.
     In addition, lower case is converted to upper case. If the character
     is not printable, -1 is returned. 

   The set of printable control characters is contained in the global
   bit-vector variable sim_tt_pchar. Each bit represents the character
   corresponding to the bit number (e.g., bit 0 represents NUL, bit 1
   represents SOH, etc.). If a bit is set, the corresponding control
   character is considered printable. It initially contains the following
   characters: BEL, BS, HT, LF, and CR. 

So "7B" designates the set of 7-bit characters, and "7P" designates the set 
of 7-bit characters considered printable.


> And if you are using anything that manage to print something visible
> when outputting a NUL, that sounds like something broken somewhere
> else. 

Tell it to Microsoft.  ;-)  Putting a Windows console window into "raw" 
mode, as the simulator does when it's running, prints control characters as 
graphic symbols.  That interferes with programs running under simulation 
that expect echoed control characters to be non-printing.

                                      -- Dave



More information about the Simh mailing list