[Simh] Reading directly from console in RT-11

Timothe Litt litt at ieee.org
Fri Feb 19 17:01:00 EST 2016


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:
> 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
> Simh at trailing-edge.com
> http://mailman.trailing-edge.com/mailman/listinfo/simh


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4994 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mailman.trailing-edge.com/pipermail/simh/attachments/20160219/2860035b/attachment.bin>


More information about the Simh mailing list