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:

Plzzzz solve it.

Know the answer? Have a better solution? Share it.
Get Help Now.
View homework problems
explained for free!
Member Testimonials

Question:

Advertisement:

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

Member's Avatar

Rookie
Karma Points: 0
Respect (69%):
Date Posted: 7/24/2008 2:33:19 AM  Status: Live
Plzzzz solve it.
Course Textbook Chapter Problem
Computer Architecture N/A N/A N/A
Question Details:
 

Explain the purpose and working of each instruction written in the following lines

 

mytask:      push bp

              mov  bp, sp

              sub  sp, 2              ; thread local variable

              push ax

              push bx

 

              xor  ax, ax             ; use line number 0

              mov  bx, 70             ; use column number 70

              mov  word [bp-2], 0     ; initialize local variable

mytask2:      push ax

              push bx

              push es

 

              mov ax, 0xb800

              mov es, ax             ; point es to video base

              xor bx, bx             ; initialize to use first shape

mytask3:      push bp

              mov  bp, sp

              sub  sp, 2              ; thread local variable

              push ax

              push bx

              push cx

 

Answers:

Member's Avatar

Expert
Karma Points: 954
Date Posted: 7/29/2008 10:06:48 PM  Status: Live
Asker's Rating: Helpful   
Response:
 
Dear.....
 
Mytask1:
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
 
 
Mytask2:
 
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
 
Mytask3:
 
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.