Cramster.com - Homework Solutions, Lecture Notes, Exams, and Free Online Homework Help
Sign Up Now! Login Customer Support
McAfee Secure sites help keep you safe from identity theft, credit card fraud, spyware, spam, viruses and online scams
Problem Solved.
    Home    
    Homework Help    
   Answer Board   
    Resources (Beta)    
   
Member's Topic Headline:

CS401 Assembly Language Question

Know the answer? Have a better solution? Share it.
Sign Up Now for FREE!
Join the thousands of students
getting ahead in their classes.
Member Testimonials

Question:

Advertisement:

Answer | Ask New Question | Customize Profile | Leaderboards | 
FAQ

Member's Avatar

Scholar
Karma Points: 204
Respect (73%):
Date Posted: 7/22/2008 11:43:17 PM  Status: Closed
CS401 Assembly Language Question
Course Textbook Chapter Problem
Computer Architecture N/A N/A N/A
Question Details:

Take the example and explain the purpose and working of each instruction written in the following lines

1)      From lines 104 to 112

2)      From lines 129 to 135

3)      From lines 149 to 154

Answers:

Member's Avatar

Expert
Karma Points: 954
Date Posted: 7/29/2008 10:10:16 PM  Status: Live
Asker's Rating: Helpful   
Response:
Dear.....
 
1)Lines 104-112
 
push bp            : save value of bp
mov bp, sp       : mark start of stack frame
sub sp, 2         : subtracts value of sp by 2
push ax           : save value of ax
push bx           : save value of bx 
xor ax, ax       : Performs boolean exclusive-OR between operands and stores value in ax
mov bx, 70      : sets 70 value to bx
mov word [bp-2], 0 : save bp and assign to 0
 
 
2) Lines 129-135
 
push ax   : place ax value on the top of  stack, top is incremented by 1
push bx            : place bx value on the top of stack
push es            : place bx value on the top of stack
mov ax, 0xb800 : assign  value at 0xb800 to ax 
mov es, ax         : move the value of ax to es  
xor bx, bx          : Performs boolean exclusive-OR between operands and stores value in ax
 
3)Lines 149-154
 
push bp           : save value of bp
mov bp, sp      : mark start of stack frame
sub sp, 2         : subtracts value of sp by 2
push ax           : save value of ax
push bx           : save value of bx 
push cx           : save value of cx



By reading or posting messages on these forums, you are agreeing to the Answer Board's Terms of Service and Conduct (TSC).


About Cramster | Terms of Use | Privacy Policy | Contact Us | Press Room | Site Map | Support | Anti-Cheating Policy

Cramster.com is not affiliated with any publisher. Book covers, title and author names appear for reference only.
Copyright © 2008 Cramster, Inc.