[comp.sys.acorn] Keyboard Interrupt

mrp@minster.york.ac.uk (06/14/91)

When I have my screenblanker module loaded in my Arc (310), in a
couple of games, the screen goes into blank mode while I'm still
bashing away at the keys.  One of my friends said this was probably
acheived by turning off the keyboard interrupt to make things go
faster, but still being able to read the status of keys.

Assuming this is correct how can I do this (from C)?  I don't have the
PRM's but managed to scrounge a brief look and I couldn't see how to
do it.

As a thought, if this was possible, wouldn't turning it off when the
hourglass was on be a good idea and speed things up a bit.   

   - Martin

#===============================#===========================================#
| Martin Portman                | Phone: (0904) 432735                      |
| Dept. of Comp. Science        | JANET:  mrp@uk.ac.york.minster            |
| University of York            | UUCP: ...!mcsun!ukc!minster!mrp           |
| Heslington                    | ARPA:                                     |
| YORK YO1 5DD ENGLAND          | mrp%minster.york.ac.uk@nsfnet-relay.ac.uk |
#===============================#===========================================#
|	My heart is beating, I'm alive but I don't call this living	    |
#===========================================================================#

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

In article <676893474.5183@minster.york.ac.uk> mrp@minster.york.ac.uk writes:
>When I have my screenblanker module loaded in my Arc (310), in a
>couple of games, the screen goes into blank mode while I'm still
>bashing away at the keys.  One of my friends said this was probably
>acheived by turning off the keyboard interrupt to make things go
>faster, but still being able to read the status of keys.
>
>Assuming this is correct how can I do this (from C)?  I don't have the
>PRM's but managed to scrounge a brief look and I couldn't see how to
>do it.

	The problem with the screenblankers is that they don't intercept
the key pressed/released event. This event is what drives the games and
thus the keypresses never get seen by the screenblanker. The event
generates internal key numbers on key press AND release and is documented
in the PRMs. You can do it in C by using a function pointer to generate
the address of the handler routine that needs to be passed to the
appropriate SWI - be careful when coding event routines in C however...
>
>As a thought, if this was possible, wouldn't turning it off when the
>hourglass was on be a good idea and speed things up a bit.   

	Er... no. ;-)

[ 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)                          ]