1

I'm programmig in x86 assembly language, and I found one problem. I call C function getch to get single character from stdin. But the problem is that the return value is stored in register EAX. And I want to know, how to get one character. Not 4 byte value. Thanks.

Mike
  • 43,847
  • 27
  • 105
  • 174
Smax Smaxović
  • 540
  • 2
  • 7
  • 17

1 Answers1

7

you can use one-byte part of the EAX that is AL

mov [MEMORY], al

AL is the LOW byte of the AX register. You also can use AH - HIGH byte of the AX

Gangadhar
  • 9,880
  • 3
  • 29
  • 50