Sunday, January 16, 2022

Write a program that counts number of 1 bits (bits having value 1) stored in register AX. Display whether there are even or odd number of 1 bits.

 INCLUDE C:\IRVINE\IRVINE32.INC

.386

.STACK 4096

EXITPROCESS PROTO,DWEXITCODE:DWORD                                          

.CODE

MAIN PROC

    call ReadInt

AND eax,1

INVOKE EXITPROCESS,0

MAIN ENDP

END MAIN

No comments:

Post a Comment