The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: Neil on September 02, 2008, 04:03:22 PM

Title: getkey MACRO problem
Post by: Neil on September 02, 2008, 04:03:22 PM
I was thinking ahead about using the cursor keys in a console.
I did a little test piece :-

               @@: getkey
                      cmp al,0
                      jne @B
                     cmp ah,75
                     jne @B
                     print "LEFT ARROW"
                     getkey
                     ret
But it doesn't work, so I looked up the getkey macro & it calls ret_key which I haven't been able to find yet.
A little help would be appreciated
Title: Re: getkey MACRO problem
Post by: Neil on September 02, 2008, 04:19:41 PM
I've solved my own problem. I found ret_key (must have been blind before) & see that 1 is returned in ecx to denote an extended keypress. I was thinking in DOS terms with my method i.e. zero in al.