1. swty_todd

    Thread Starter Active Member

    Aug 3, 2008
    82
    0
    Hey I read this solution for calulating the mulitplcation of (09)H & (04)H in Assembly Language Programming for 8085.
    I am not sure how the RAL works in this case, Help me out please.

    MVI A, 09
    RAL
    RAL
    RST 1
     
  2. AlexR

    Well-Known Member

    Jan 16, 2008
    735
    54
    Shifting a binary number 1 bit to the left is the same as multiplying it by 2.
    Try it for yourself with a pencil and paper on a couple of simple binary numbers!
     
  3. bertus

    Administrator

    Apr 5, 2008
    15,649
    2,348
    Hello,

    The RAL command is one of the undocumented commands.
    Here is an explanation:
    Code ( (Unknown Language)):
    1.  
    2. [B][B]RAL (Rotate left through carry)  [/B][/B][B]
    3. (An+1) <-- (An); (CY) <-- (A7); (A0) <-- (CY)
    4.  
    5. [FONT=fixed]00010111 [/FONT]
    6.  
    7. Flags: CY [/B]
    This comes from this page:
    http://www.geocities.com/bschhabra/instruction.html

    Greetings,
    Bertus
     
  4. swty_todd

    Thread Starter Active Member

    Aug 3, 2008
    82
    0
    hey thanks friends, I think my problem is solved
     
Loading...