Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
I am trying write a program which count number of 1 in the 8-bit. I am storing input number in decimal and trying to find out how many 1 is there in binary 1. But not getting how to do. Please find my code as follow:
n db 7 ;Define input number data ends
assume cs:code, ds:data, ss:stack1
mov ax, data
mov ds, ax
mov al, 0
mov bl, n
;and bl, 00000001b
mov ah, 4ch
Is any one can help me?
0 · ·