Re: Help Me
- Posted by Daniel Berstein <daber at PAIR.COM> Nov 29, 1998
- 455 views
>Hi, > >I read about this somewere but I foget how to do it. How do you take out >either ah or al from ax? I know you have to and it with something but I foget. >Do you and it with #00FF or #FF00 or neither? > >Albert AX is a 16bit number. AH an AL are the higer and lower 8bits respectivly. Getting AL is easy, just a binary "mask" to remove AH: AL = and_bits(AX,#00FF) With AH you do the same and then shift right: AH = and_bits(AX,#FF00)/256 Regards, Daniel Berstein daber at pair.com