multitasking prob

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
octa
Member
Member
Posts: 50
Joined: Sat Jun 28, 2008 9:15 am

multitasking prob

Post by octa »

i have setup multitasking successfully (i think)..
there is task switching every 1/18th of a second..

but when i type anything i get a scan code of -64 during key released why is it ??
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: multitasking prob

Post by AJ »

Hi,

Remember that the keyboard scancodes are unsigned, making that code 0xC0 - the top bit is a release bit, making the actual keypress 0x40 (which translates to F6 on my key map).

Are you pressing F6 as the first key and have you declared all appropriate keyboard variables volatile?

Cheers,
Adam
User avatar
octa
Member
Member
Posts: 50
Joined: Sat Jun 28, 2008 9:15 am

Re: multitasking prob

Post by octa »

AJ wrote:
Are you pressing F6 as the first key and have you declared all appropriate keyboard variables volatile?
No.. i do not pres F6..
only when i create thread i get this problem..
otherwise the keyboard driver works fine..

and after i press each key i get a scan code of -64...
not when i hold a key..
and this is not the release code as i have handled it..
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Re: multitasking prob

Post by pcmattman »

Umm...
and after i press each key i get a scan code of -64...
-64d == 0xC0.

So you are getting F6 scancodes if AJ is correct.

EDIT: 0xC0 in an unsigned environment, anyway. Don't use signed integers ;)
Post Reply