Subject Computer Science Assembly Language Programming


Given the following C functions, implement equivalent assembly language function in the given space.

int countZeros(int *num, int count)
int i;
int zeros;
zeros = 0;
do {
       if (num[i] == 0)
                zeros ++;
                num[i] = -1;
      } while {i< count);


Solution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

.global _countzeros

pushl %ebp
movl %esp,%ebp   //
movl 8(%ebp),%ebx // ebx ->num...

This is only a preview of the solution. Please use the purchase button to see the entire solution

Assisting Tutor

Related Homework Solutions

Get help from a qualified tutor
Live Chats