On 22 Jan 2011, at 15:44, Norman Dunbar wrote:

> 
> On 22/01/11 10:22, gdgqler wrote:
>> I think you have to test at the start of the hit routine ahit0 what key was 
>> pressed. Any key at all pressed while the pointer is in the application 
>> window will cause the hit routine to be called. D2 will contain the 
>> uppercased keystroke with SPACE, ($20), converted to 1 and ENTER ($0A), 
>> converted to 2. So, if you wanted pressing "M" to do add to the count of 
>> hits you should check that D2.L = $4D.
> I'm not bothered by which key causes the counter to go up by one - it's
> a simple demo to show an application sub-window in action. I just found
> it odd that certain things causes a HIT while others seemed to cause two.
> 
> I may, if I can be bothered, adapt the code to dump the registers on the
> first and second hit and print them out to screen on the subsequent ones
> - just to see the contents of the registers on entry to the "mysterious"
> hits. On the other hand, I may not! ;-)
> 

I simply use QMON. Putting a break point at ahit0 allows you to see all the 
registers on entry to the routine without altering the program.

George
_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm

Reply via email to