log in | register | forums
Show:
Go:
Forums
Username:

Password:

User accounts
Register new account
Forgot password
Forum stats
List of members
Search the forums

Advanced search
Recent discussions
- Git client updated to 0.07 (News:1)
- Archive Edition 27:1 reviewed (News:)
- Rougol April 2024 meeting on monday is Anniversary time (News:1)
- WROCC April 2024 meeting o...changes to our phone lines (News:1)
- April developer 'fireside' chat is on saturday night (News:)
- March 2024 News Summary (News:4)
- WROCC Newsletter Volume 41:11 reviewed (News:)
- WROCC March 2024 meeting o... Hughes and Peter Richmond (News:1)
- Rougol March 2024 meeting on monday with Bernard Boase (News:)
- Drag'n'Drop 13i2 edition reviewed (News:)
Latest postings RSS Feeds
RSS 2.0 | 1.0 | 0.9
Atom 0.3
Misc RDF | CDF
 
View on Mastodon
@www.iconbar.com@rss-parrot.net
Site Search
 
Article archives
The Icon Bar: Programming: Mouse border SWI
 
  Mouse border SWI
  (15:10 2/2/2001)
  Phlamethrower (16:42 2/2/2001)
    andrew (18:17 2/2/2001)
      Phlamethrower (11:55 3/2/2001)
        andrew (14:12 3/2/2001)
          Phlamethrower (14:58 15/6/2002)
 
andrew Message #4731, posted at 15:10, 2/2/2001
Unregistered user I was trying to use the OS Word 21,1 call to set the mouse limits relative to an origin of 320,240 in MODE 28. I think it needs 2's complement values split into two bytes though. Is there a reference on how to work these out and can anybody say whether I'm on the right lines here?

regards,

Andrew

  ^[ Log in to reply ]
 
Phlamethrower Message #4732, posted at 16:42, 2/2/2001, in reply to message #4731
Unregistered user According to the PRM's (You should really get a copy, or at least the Strong Help manuals), R1 is a pointer to a parameter block:

R1+0 = 1
R1+1 = LSB of left coordinate
R1+2 = MSB of left coordinate
R1+3 = LSB of bottom coordinate
R1+4 = MSB of bottom coordinate
R1+5 = LSB of right coordinate
R1+6 = MSB of right coordinate
R1+7 = LSB of top coordinate
R1+8 = MSB of top coordinate

All are treated as signed 16-bit values, relative to the screen origin at the time of the call.

  ^[ Log in to reply ]
 
andrew Message #4733, posted at 18:17, 2/2/2001, in reply to message #4732
Unregistered user Thanks very much for the help Jeffrey but the only reason I mention that I might need to find out anout 2's complement is that the example in the PRMs, which have got, as I understand shows these numbers being represented.
This is why I think my code didn't work.
  ^[ Log in to reply ]
 
Phlamethrower Message #4734, posted at 11:55, 3/2/2001, in reply to message #4733
Unregistered user You mean the infinite box example? Those are just the largest positive and negative numbers you can get, so the fact that they add up to make -1 has nothing to do with it. Without seeing your code (Or bothering to have a fiddle with the command myself) I can't really help you. I'll probably have a fiddle in an hour or two when I get to work on XSpr.
  ^[ Log in to reply ]
 
andrew Message #4735, posted at 14:12, 3/2/2001, in reply to message #4734
Unregistered user What I'm wondering is, how do these numbers represent negative values? I'm assuming it's the two's complement system.
I've found another ay to set the bundaries I want for the mouse-driven code I was doing but I'll have another look at the call myself anyway.
  ^[ Log in to reply ]
 
Phlamethrower Message #4736, posted at 14:58, 15/6/2002, in reply to message #4735
Unregistered user I've had a fiddle with the call, and it seems to work based on OS units.

About the negatives - now that I've reminded myself what two's complement actually is (I know quite a few things but can't quite link them together sometimes wink), yes that is the system it uses.

  ^[ Log in to reply ]
 

The Icon Bar: Programming: Mouse border SWI