[Simh] Reading directly from console in RT-11

Will Senn will.senn at gmail.com
Fri Feb 19 16:58:28 EST 2016


Given the following test program that I wrote (GETC.MAC):

    .title getc

     .mcall    .exit

TKS = 177560
TKB = 177562
;TPS = 177564
;TPB = 177566

begin:
     inc    TKS        ;set the ASR read enable bit
getc:
     tstb    TKS        ;is a character available?
     bpl    getc        ;loop until there is

     movb    TKB,R0        ;put the character into register 0

     .exit

     .end begin

I would expect the console to wait until I typed a single character and 
then for the program to exit. What is happening is that the program 
appears to accept any number of characters and only ends when I type 
CTRL-C twice.

Here are some questions that arise:

1. Is it reasonable to expect to be able to read directly from the ASR 
Keyboard buffer while running RT-11 in SimH or does this somehow compete 
with the running OS? (I can print characters using the ASR Punch Buffer 
just fine)
2. Is there a flaw in the program? (Nevermind that it doesn't do 
anything much with the character).
3. Is this a totally abnormal way to read a character?
4. What's up with needing to hit CTRL-C twice?

Answers to any of the above would be appreciated or if you have 
something else, that's fine too.

Thanks,

Will


More information about the Simh mailing list