Need help programing in assembly language

  • Thread starter Cathartics
  • Start date
  • #1
27
0

Main Question or Discussion Point

*****need help programing in assembly language*****

Hi there everyone. I am really new to this assembly language and i dont know how to code this simple programe.. Please help me with this. I would very much appreciate it.. here is the question..



Need to design assembly language programe IA-32 that could find the number of 0's [binary] in each integer in x and put and display the value in y.

.DATA

X SWORD -100,200,300,400,-500
Y BYTE 5 DUP (?)
 

Answers and Replies

  • #2
rcgldr
Homework Helper
8,691
522
Bit oriented method:

Assume value in EAX, zero bit count will be in EDX

Code:
        mov     ecx,32
        mov     edx,0
lp0:    rol     eax,1
        cmc
        adc     edx,0
        loop    lp0
 
Last edited:

Related Threads on Need help programing in assembly language

  • Last Post
Replies
18
Views
5K
  • Last Post
Replies
18
Views
8K
Replies
122
Views
8K
  • Last Post
Replies
4
Views
1K
  • Last Post
Replies
4
Views
2K
Replies
1
Views
2K
Replies
4
Views
13K
  • Last Post
Replies
2
Views
1K
  • Last Post
Replies
13
Views
1K
  • Last Post
Replies
5
Views
3K
Top