#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2010
    Posts
    3
    Rep Power
    0

    Unhappy Please help me solve this one !!


    please help me solve this one !!

    Code:
    1.       The Macro program given below displays one character passed to it as an argument on the output screen. Use it complete the Main Proc to display an array of characters on the screen.
    
     
    
     
    
     
    
    mPutchar MACRO char
    
            push eax
    
            mov al, char
    
            call WriteChar
    
            pop eax
    
    ENDM
    
    .data
    
            myName                               BYTE  “Welcome to Ajman University!”,0
    
    .code
    
            Main PROC
    
    Start: MOV SI, OFFSET myName
    
               MOV CX, LENGTHOF  myName
    
    L1:     MOV BL, [SI]
    
                ----------------------------
    
                ----------------------------
    
                ----------------------------
    
                ----------------------------
    
                ----------------------------
    
                ----------------------------
    
                ----------------------------
    
    2.       Write assembly program that reads a word from the key board and compares it with an already defined word in the data segment. If the two words are the same it display “Correct Password” else it will display “Incorrect Password”.
    
    Extra 1 mark: Incase of incorrect password it will give the user 3 tries.
    
    3.       Description: The greatest common divisor of two integers is the largest
    
    integer that will evenly divide both integers. The GCD algorithm involves
    
    integer division in a loop, described by the following C++ code:
    
                    int GCD(int x, int y)
    
                    {
    
                      x = abs(x);            // absolute value of x
    
                      y =  absyes ;        // absolute value of y
    
                      do {
    
                        int n = x % y;                  // REMAINDER
    
                        x = y;
    
                        y = n;
    
                      } while y > 0;
    
                      return y;
    
                    }
    
    Implement this function in assembly language

    Comments on this post

    • medialint disagrees : You'll have to do more than just cut and paste the assignment ...
  2. #2
  3. Sarcky
    Devshed Supreme Being (6500+ posts)

    Join Date
    Oct 2006
    Location
    Pennsylvania, USA
    Posts
    10,908
    Rep Power
    6351
    Aoko, this forum is not designed for people to do your homework for you. If you're having trouble, contact your TA or your professor, that's their job. Thread closed.

    -Dan
    HEY! YOU! Read the New User Guide and Forum Rules

    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

    "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

    Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.

IMN logo majestic logo threadwatch logo seochat tools logo