Expert needed here!!
I have to write an 8086 program using MS-Dos Debug utility. The program is to convert a given hexadecimal number into its binary form and display the result on the screen. This my program but somehow it prints some absurd result on the screen. Someone please check out my program and discover the problem.
Please check whether this program is correct because it doesn't work for me.
I have to write an 8086 program using MS-Dos Debug utility. The program is to convert a given hexadecimal number into its binary form and display the result on the screen. This my program but somehow it prints some absurd result on the screen. Someone please check out my program and discover the problem.
Rich (BB code):
MOV AH,02 ;Displays the contents of DL register
MOV DL,00
MOV CL,08 ;Counter for the 8-bit number
MOV BL,XX ;8 bit Hex number to be converted
Again RCL BL,1 ;Rotate BL through Carry
ADC DL,30 ;Add contents of DL and 30 with carry
INT21 ;Displays contents of DL (30/31 = Ascii code of 0/1)
LOOP Again
INT20 ;Terminate the program