News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

getkey MACRO problem

Started by Neil, September 02, 2008, 04:03:22 PM

Previous topic - Next topic

Neil

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

Neil

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.