Re: Help Me

new topic     » goto parent     » topic index » view thread      » older message » newer message

>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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu