<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Timothe,<br>
    <br>
    Thanks for responding. This sounds reasonable. I'm ok with using the
    .TTYOU and .TTYIN macros which call EMT's for actual programs in
    RT-11. But, while learning, there are some things like this that I
    want to do that may be tricky/ill advised to do in RT-11. <br>
    <br>
    What do you think the easiest way is to load a program like this
    directly onto the bare hardware (simulated, of course)?<br>
    <br>
    Thanks,<br>
    <br>
    Will<br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 2/19/16 4:01 PM, Timothe Litt wrote:<br>
    </div>
    <blockquote cite="mid:56C7909C.3000409@ieee.org" type="cite">
      <pre wrap="">The console terminal driver won't like you touching the device registers.

Don't do that.  Use the RT-11 syscalls instead.

Or load your program into the (emulated) bare hardware, and have fun.

This communication may not represent my employer's views,
if any, on the matters discussed. 

On 19-Feb-16 16:58, Will Senn wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">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
_______________________________________________
Simh mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Simh@trailing-edge.com">Simh@trailing-edge.com</a>
<a class="moz-txt-link-freetext" href="http://mailman.trailing-edge.com/mailman/listinfo/simh">http://mailman.trailing-edge.com/mailman/listinfo/simh</a>
</pre>
      </blockquote>
      <pre wrap="">

</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Simh mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Simh@trailing-edge.com">Simh@trailing-edge.com</a>
<a class="moz-txt-link-freetext" href="http://mailman.trailing-edge.com/mailman/listinfo/simh">http://mailman.trailing-edge.com/mailman/listinfo/simh</a></pre>
    </blockquote>
    <br>
  </body>
</html>