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:

Assembly Language

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: 21
Respect (36%):
Date Posted: 10/12/2007 10:50:39 AM  Status: Live
Assembly Language
Course Textbook Chapter Problem
Computer Architecture N/A N/A N/A
Question Details:
 

Q#1.

 

 

If AX=8FFF and BX=0FFF and “cmp ax, bx” is executed, which of the following jumps will be taken? Each part is independent of others. Also give the value of Z, S, and C flags.

                                                              i.      jg greater

                                                            ii.      jl smaller

                                                          iii.      ja above

                                                          iv.      jb below

 

Instructions

Jump

ZF

SF

CF

Jg greater

 

 

 

 

Jl smaller

 

 

 

 

Ja above

 

 

 

 

Jb below

 

 

 

 

Answers:

Member's Avatar

Guru
Karma Points: 1,806
Date Posted: 10/12/2007 12:18:27 PM  Status: Live
Asker's Rating: Lifesaver   
Response:
 

Instructions

Jump

ZF

SF

CF

Jg greater

 Not taken

 0

 1

 0

Jl smaller

 taken

 0

 1

 0

Ja above

 taken

 0

Jb below

 Not taken

 0

M Asad's Comment:
Thanks

                                        *..*..*..*..*..   Trying Best   ..*..*..*..*..*..

Member's Avatar

Pupil
Karma Points: 51
Date Posted: 10/12/2007 12:24:53 PM  Status: Live
Asker's Rating: Helpful   
Response:
INSTRUCTION    OPERATION                                      FLAGS
                                                            C (carry)                   Z(zero)                  S(sign)
CMP AX, BX          
 
  JG                         AX > BX       
                            8FFF > 0FFF           0                               0                             0
 
  JL                           AX < BX       
                             8FFF < 0FFF          0                               0                             0
 
  JA                           BX < AX       
                             0FFF < 8FFF          1                               0                             1
 
 JB                           BX < AX       
                             0FFF < 8FFF          1                               0                             1
                               
                               
                               
M Asad's Comment:
Thanks



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.