answersLogoWhite

0

LXI H, 4150 ; Point to data

LXI B, 0000 ; Initialize hundreds= 0, Tens=0

MOV A, M ; Get hex data to A

LOOP: SUI 64

JC LOOP 1

INR B ; hundreds= hundreds+1

JMP LOOP

LOOP 1: ADI 64 ; if subtracted extra, add it clear carry flag

LOOP 2: SUI 0A

JC LOOP 3

INR C ; Tens=tens+1

JMP LOOP 2

LOOP 3: ADI 0A ; If subtracted extra, add it again

INX H ; A = Units

MOV M, B ; store hundreds

MOV B, A ; Combine Tens in C &

MOV A, C ; Units in A to form a

RLC ; Single 8-bit number

RLC

RLC

RLC

ADD B

INX H

MOV M, A ; Store tens & Units

HLT

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

Write a program to convert a 2 digit BCD number into hexadecimal number?

Write a program to convert a 2-digit BCD number into hexadecimal


2 Write a program to convert a 2-digit BCD number into hexadecimal?

WRITE A PROGRAM TO CONVERT A 2-DIGIT bcd NUMBER INTO HEXADECIMAL


Write a C program to convert hexadecimal number into decimal number?

pongada punda vayanungala ..................


Write a Program to convert decimal number into hexadecimal no without using function and string?

This is not a question.


What is SAP give you the brief solution?

Write a program to convert a 2-digit BCD number into hexadecimal


How do you write a C-program to convert an Octal number to a hexadecimal number?

try this i got output: int main(){ int o; scanf("%o",&o); printf("%x",o); getch(); }


How do you write a c program to convert binary to decimal by using while statement?

write a c++ program to convert binary number to decimal number by using while statement


Write a program to convert decimal numberto hexadecimal number?

One way to accomplish this is to allow the printf statement to do the work for you. Example: printf("Decimal %d = hex %02x\n", number, number); Or you could use the windows calculator. Select the Dec radian, type your number in, then select Hex radian.


How do you write the program for the hexadecimal 210?

int main (void) { puts ("210H"); return 0; }


How do you write the number 90 in binary?

90 = 1011010 (or 5A in hexadecimal).


Why you write H after number in microprocessor?

Writing H after a number means the number is a hexadecimal, or base 16, number.


How do you write 601 in base 10?

Assuming the original number is written in base 10, there is no need to convert this to base 10 as it is already there. The hexadecimal number represented as 601 in base 16 is represented in decimal as 1537.