[Oberon] PO2013 - Oberon mouse location

Chris Burrows chris at cfbsoftware.com
Wed Nov 21 12:30:33 CET 2018


> -----Original Message-----
> From: Oberon [mailto:oberon-bounces at lists.inf.ethz.ch] On Behalf Of
> Tomas Kral
> Sent: Wednesday, 21 November 2018 9:31 PM
> To: Oberon at lists.inf.ethz.ch
> Subject: [Oberon] PO2013 - Oberon mouse location
> 
> Hi,
> 
> In Linz Oberon accessing/setting mouse pointer is done as pure
> assignment, e.g.
> 
> Oberon.Pointer.X := m.x + x;
> y := Oberon.Pointer.Y;
> 
> How can this be coded in PO2013, System V?

Read section 9.2 Keyboard and Mouse in the Project Oberon 2013
documentation. That tells you how to read the x and y values.

I haven't tried it but I guess you could reverse the process that Mouse
performs if you want to set the x and y values:

1. Look for the procedure Mouse in Input.mod. 

2. Refer to Fig 9.1. 'Format of the mouse register' to work out how to
encode your x and y values into an integer (w, say) and then call
SYSTEM.PUT(msAdr, w) where msAdr = -40.

Regards,
Chris Burrows
CFB Software
http://www.astrobe.com/RISC5




More information about the Oberon mailing list