0
37kviews
Write 8086 assembly language program to count number of 0's and 1's in a given 8 bit number.
1 Answer
written 5.1 years ago by | modified 5.1 years ago by |
Program:
Data segment.
NUM DB 564
ZEROS DB ?
ONES DB ?
Data ENDS
CODE SEGMENT
ASSUME CS : CODE, DS : DATA
START :
MOV AX, DATA
MOV . DS, AX ; Initialize Data Segment
MOV AL, NUM ; Get number into Accumulator
MOV BL, 00H ; initially ZERO …