Other Programming Languages
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreOther Programming Languages

Closed Thread
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 7th, 2010, 02:42 PM
aoko aoko is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2010
Posts: 3 aoko Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 27 m 51 sec
Reputation Power: 0
Unhappy Assembly - 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 ...

Reply With Quote
  #2  
Old May 11th, 2010, 08:47 AM
ManiacDan's Avatar
ManiacDan ManiacDan is offline
Sarcky
Dev Shed God 10th Plane (9500 - 9999 posts)
 
Join Date: Oct 2006
Location: Pennsylvania, USA
Posts: 9,917 ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)  Folding Points: 127430 Folding Title: Super Ultimate Folder - Level 1Folding Points: 127430 Folding Title: Super Ultimate Folder - Level 1Folding Points: 127430 Folding Title: Super Ultimate Folder - Level 1Folding Points: 127430 Folding Title: Super Ultimate Folder - Level 1Folding Points: 127430 Folding Title: Super Ultimate Folder - Level 1Folding Points: 127430 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 2 Months 3 Weeks 1 Day 10 h 25 m 30 sec
Reputation Power: 6113
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.

Reply With Quote
Closed Thread

Viewing: Dev Shed ForumsProgramming Languages - MoreOther Programming Languages > Assembly - Please help me solve this one !!

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap