[comp.sys.acorn] RS423 Interrupts/Events under RiscOS

rogersh%t3a@uk.ac.man.cs (Huw J. Rogers) (06/14/91)

	Does anyone know how to get RiscOS to generate an event/interrupt
to the application on receipt of a RS423 character? I *have* looked in
my (Arthur version) PRMs...

	-Huw

[ H.J.Rogers (INTERNET: rogersh%p4%cs.man.ac.uk@cunyvm.cuny.edu)       ]
[    ,_,     (BITNET/EARN: rogersh%p4%cs.man.ac.uk@UKACRL.BITNET)      ]
[  :-(_)-o   (UUCP: ...!uunet!cunyvm.cuny.edu!cs.man.ac.uk!p4!rogersh) ]
[   _} {_    (JANET: rogersh%p4@uk.ac.man.cs)                          ]

nbvs@cl.cam.ac.uk (Nicko van Someren) (06/17/91)

In article <2692@m1.cs.man.ac.uk> rogersh%t3a@uk.ac.man.cs (Huw J. Rogers) writes:
>	Does anyone know how to get RiscOS to generate an event/interrupt
>to the application on receipt of a RS423 character? I *have* looked in
>my (Arthur version) PRMs...

Every time a character comes in on the RS423 it gets put into an input buffer,
buffer number 1.  All insertion (and removal) into buffers goes through the
various buffer vectors insv, remv, cnpv.  If you intercept the insert vector
by calling OS_Claim with R0=&14 your code will be called every time a character
is put in a buffer.  R1 will contain the buffer number so check to see if that
is 1 for the RS423 input buffer and you're away.  Remember to make sure that
the vector code is in the module area if you are running in the desktop as it 
could get paged out otherwise.

Nicko


+-----------------------------------------------------------------------------+
| Nicko van Someren, nbvs@cl.cam.ac.uk, (44) 223 358707 or (44) 860 498903    |
+-----------------------------------------------------------------------------+

gtoal@tardis.computer-science.edinburgh.ac.uk (06/21/91)

In article <1991Jun17.090017.19118@cl.cam.ac.uk> nbvs@cl.cam.ac.uk (Nicko van Someren) writes:
:In article <2692@m1.cs.man.ac.uk> rogersh%t3a@uk.ac.man.cs (Huw J. Rogers) writes:
:>	Does anyone know how to get RiscOS to generate an event/interrupt
:>to the application on receipt of a RS423 character? I *have* looked in
:>my (Arthur version) PRMs...
:
:Every time a character comes in on the RS423 it gets put into an input buffer,
:buffer number 1.  All insertion (and removal) into buffers goes through the
:various buffer vectors insv, remv, cnpv.  If you intercept the insert vector
:by calling OS_Claim with R0=&14 your code will be called every time a character
:is put in a buffer.  R1 will contain the buffer number so check to see if that
:is 1 for the RS423 input buffer and you're away.  Remember to make sure that
:the vector code is in the module area if you are running in the desktop as it 
:could get paged out otherwise.
:
:Nicko
:
:
:+-----------------------------------------------------------------------------+
:| Nicko van Someren, nbvs@cl.cam.ac.uk, (44) 223 358707 or (44) 860 498903    |
:+-----------------------------------------------------------------------------+


Say nick, do you know how to write a C procedure to sit on a vector?
I've got a good use for something which could intercept OSWRCH for
instance, but I've never worked out how to do it.

Graham
PS By the way, I'm still waiting for you to mail me your address so
I can post you this SOSS disk...