Google

Jun 26, 2008

seperate the digits of hexa decimal number assembly language program

seperate the digits of a hexa decimal numbers and store in different locations

first get the packed BCD number and mask the lower nibble then move to the required position in the number and adjust the higher BCD digit as a lower digit then store the partial result now get the orignal BCD number and mask the higher nibble store the result and stop the program

LDA 2200H
ANI F0H
RRC
RRC
RRC
RRC
STA 2300H
LDA 2200H
ANI 0FH
STA 2301H
HLT

You might be also interested in:

:: Assembly Language Source Codes
:: why there are two ground pins in 8086
:: Program to display ASCII characters on the display unit

No comments: