Results 1 to 2 of 2

Thread: assembly prime numbers please!!!!

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2007
    Posts
    3

    Exclamation assembly prime numbers please!!!!

    i need write a procedure that sets the zeroflag if the 32-bit integer passed in the EAX register is prime.
    ( hint ) A PRIME NUMBER IS EVENLY DIVISIBLE BY ITSELF AND 1. OPTIMISE THE PROGRAMS LOOP TO RUN AS EFFICIENTLY AS POSSIBLE. YOUR PROGRAM SHOULD PROMPT THE USER FOR A NUMBER AND THEN DISPLAY A MESSAGE INDICATING WHETHER OR NOT THE NUMBER IS PRIME. THE PROGRAM SHOULD THEN ASK FOR ANOTHER NUMBER FROM THE USER. CONTINUE THIS LOOP IN THIS FASHION UNTIL THE USER ENTERS PREARRANGED VALUE SUCH AS -1.

    please help!!!

  2. #2
    Interweb adm/o/distrator Paul M's Avatar
    Join Date
    Nov 2006
    Location
    Australia, Melbourne
    Posts
    2,306

    Re: assembly prime numbers please!!!!

    Sorry but this sort of looks like an extract from a homework assignment, is it?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width