0

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
  • 40,613
  • 26
  • 100
  • 171
Smax Smaxović
  • 490
  • 2
  • 7
  • 16

1 Answers1

6

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,510
  • 3
  • 27
  • 48