home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.asm.x86      Ahh, the lost art of x86 assembly      4,675 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 3,114 of 4,675   
   Melzzzzz to Richmond   
   Re: sys_read from stdin   
   28 Nov 17 16:02:37   
   
   From: Melzzzzz@nospicedham.zzzzz.com   
      
   On 2017-11-28, Richmond  wrote:   
   > I am trying to read a key from the keyboard. I have switched off   
   > canonical mode so it doesn't wait for the return key. But it does not   
   > seem to pick up the key in AX.   
   >   
   > GCHAR:  push rax   
   >         push rbx   
   >         push rcx   
   >         push rdx   
   >         mov rsi, charbuffer    ; buffer = address to store the bytes read   
   >         mov rcx,rsi   
   >         mov rdx, 0x4        ; number of bytes to read   
   >                            (setting this to 1 makes no difference)   
   >         mov rax, 0x3        ; number for sys_read   
   >         mov rbx, 0x2        ; From stdin   
   stdin is 0 not 2   
      
      
   --   
   press any key to continue or any other to quit...   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca