SlideShare a Scribd company logo
1 of 1
Download to read offline
Write a short assembly code that does the following:
Add the contents of rax to rbx.
If the result is positive, then make rcx zero
else, do nothing
Solution
add %rbx %rax //The add instruction adds together its two operands, storing the result in its first
operand
mov %rcx, 0 //store the value 0 into rcx
Endcase:
L1:
Endcase:

More Related Content

More from archanenterprises

Factor the expression completely. Begin by factoring out the lowest .pdf
Factor the expression completely. Begin by factoring out the lowest .pdfFactor the expression completely. Begin by factoring out the lowest .pdf
Factor the expression completely. Begin by factoring out the lowest .pdfarchanenterprises
 
Describe the principal costs incurred in the business that employs y.pdf
Describe the principal costs incurred in the business that employs y.pdfDescribe the principal costs incurred in the business that employs y.pdf
Describe the principal costs incurred in the business that employs y.pdfarchanenterprises
 
Compare and contrast swabs and contact (RODAC) plates for their abil.pdf
Compare and contrast swabs and contact (RODAC) plates for their abil.pdfCompare and contrast swabs and contact (RODAC) plates for their abil.pdf
Compare and contrast swabs and contact (RODAC) plates for their abil.pdfarchanenterprises
 
Briefly explain the ventral and dorsal body cavities and the membran.pdf
Briefly explain the ventral and dorsal body cavities and the membran.pdfBriefly explain the ventral and dorsal body cavities and the membran.pdf
Briefly explain the ventral and dorsal body cavities and the membran.pdfarchanenterprises
 
a connective tissue that is responsible for the shape of our nose..pdf
a connective tissue that is responsible for the shape of our nose..pdfa connective tissue that is responsible for the shape of our nose..pdf
a connective tissue that is responsible for the shape of our nose..pdfarchanenterprises
 
6. In humans, having a widow’s peak (W) is dominant to not having a .pdf
6. In humans, having a widow’s peak (W) is dominant to not having a .pdf6. In humans, having a widow’s peak (W) is dominant to not having a .pdf
6. In humans, having a widow’s peak (W) is dominant to not having a .pdfarchanenterprises
 
28. What is the proposed role of thioredoxin in seed protein mobiliz.pdf
28. What is the proposed role of thioredoxin in seed protein mobiliz.pdf28. What is the proposed role of thioredoxin in seed protein mobiliz.pdf
28. What is the proposed role of thioredoxin in seed protein mobiliz.pdfarchanenterprises
 
Write a 250-300 word abstract explaining that the internet is the gr.pdf
Write a 250-300 word abstract explaining that the internet is the gr.pdfWrite a 250-300 word abstract explaining that the internet is the gr.pdf
Write a 250-300 word abstract explaining that the internet is the gr.pdfarchanenterprises
 
Write a program in java in which you will build the“Sink theShipsGam.pdf
Write a program in java in which you will build the“Sink theShipsGam.pdfWrite a program in java in which you will build the“Sink theShipsGam.pdf
Write a program in java in which you will build the“Sink theShipsGam.pdfarchanenterprises
 
Write a functionWe want a function, called split, that has three p.pdf
Write a functionWe want a function, called split, that has three p.pdfWrite a functionWe want a function, called split, that has three p.pdf
Write a functionWe want a function, called split, that has three p.pdfarchanenterprises
 
Why is it recommended that vegans take an oral vitamin B12 supplemen.pdf
Why is it recommended that vegans take an oral vitamin B12 supplemen.pdfWhy is it recommended that vegans take an oral vitamin B12 supplemen.pdf
Why is it recommended that vegans take an oral vitamin B12 supplemen.pdfarchanenterprises
 
16. The respirations that accompany metabolic acidosis are frequentl.pdf
16. The respirations that accompany metabolic acidosis are frequentl.pdf16. The respirations that accompany metabolic acidosis are frequentl.pdf
16. The respirations that accompany metabolic acidosis are frequentl.pdfarchanenterprises
 
What sorts of network monitoring tools are available to network admi.pdf
What sorts of network monitoring tools are available to network admi.pdfWhat sorts of network monitoring tools are available to network admi.pdf
What sorts of network monitoring tools are available to network admi.pdfarchanenterprises
 
What is the difference between site and source energySolutionS.pdf
What is the difference between site and source energySolutionS.pdfWhat is the difference between site and source energySolutionS.pdf
What is the difference between site and source energySolutionS.pdfarchanenterprises
 
Westminster Financial has released a summary of investor and investme.pdf
Westminster Financial has released a summary of investor and investme.pdfWestminster Financial has released a summary of investor and investme.pdf
Westminster Financial has released a summary of investor and investme.pdfarchanenterprises
 
What are the application that uses Bernoulli equations.pdf
What are the application that uses Bernoulli equations.pdfWhat are the application that uses Bernoulli equations.pdf
What are the application that uses Bernoulli equations.pdfarchanenterprises
 
Under which type of loading does fatigue occur static load plane l.pdf
Under which type of loading does fatigue occur  static load  plane l.pdfUnder which type of loading does fatigue occur  static load  plane l.pdf
Under which type of loading does fatigue occur static load plane l.pdfarchanenterprises
 
True False1. The primary difference, in terms of processing, bet.pdf
True  False1. The primary difference, in terms of processing, bet.pdfTrue  False1. The primary difference, in terms of processing, bet.pdf
True False1. The primary difference, in terms of processing, bet.pdfarchanenterprises
 
The graph to the right shows the number of cities with certain averag.pdf
The graph to the right shows the number of cities with certain averag.pdfThe graph to the right shows the number of cities with certain averag.pdf
The graph to the right shows the number of cities with certain averag.pdfarchanenterprises
 
Snort started as what type of systemA. Behavior-based IPS system.pdf
Snort started as what type of systemA. Behavior-based IPS system.pdfSnort started as what type of systemA. Behavior-based IPS system.pdf
Snort started as what type of systemA. Behavior-based IPS system.pdfarchanenterprises
 

More from archanenterprises (20)

Factor the expression completely. Begin by factoring out the lowest .pdf
Factor the expression completely. Begin by factoring out the lowest .pdfFactor the expression completely. Begin by factoring out the lowest .pdf
Factor the expression completely. Begin by factoring out the lowest .pdf
 
Describe the principal costs incurred in the business that employs y.pdf
Describe the principal costs incurred in the business that employs y.pdfDescribe the principal costs incurred in the business that employs y.pdf
Describe the principal costs incurred in the business that employs y.pdf
 
Compare and contrast swabs and contact (RODAC) plates for their abil.pdf
Compare and contrast swabs and contact (RODAC) plates for their abil.pdfCompare and contrast swabs and contact (RODAC) plates for their abil.pdf
Compare and contrast swabs and contact (RODAC) plates for their abil.pdf
 
Briefly explain the ventral and dorsal body cavities and the membran.pdf
Briefly explain the ventral and dorsal body cavities and the membran.pdfBriefly explain the ventral and dorsal body cavities and the membran.pdf
Briefly explain the ventral and dorsal body cavities and the membran.pdf
 
a connective tissue that is responsible for the shape of our nose..pdf
a connective tissue that is responsible for the shape of our nose..pdfa connective tissue that is responsible for the shape of our nose..pdf
a connective tissue that is responsible for the shape of our nose..pdf
 
6. In humans, having a widow’s peak (W) is dominant to not having a .pdf
6. In humans, having a widow’s peak (W) is dominant to not having a .pdf6. In humans, having a widow’s peak (W) is dominant to not having a .pdf
6. In humans, having a widow’s peak (W) is dominant to not having a .pdf
 
28. What is the proposed role of thioredoxin in seed protein mobiliz.pdf
28. What is the proposed role of thioredoxin in seed protein mobiliz.pdf28. What is the proposed role of thioredoxin in seed protein mobiliz.pdf
28. What is the proposed role of thioredoxin in seed protein mobiliz.pdf
 
Write a 250-300 word abstract explaining that the internet is the gr.pdf
Write a 250-300 word abstract explaining that the internet is the gr.pdfWrite a 250-300 word abstract explaining that the internet is the gr.pdf
Write a 250-300 word abstract explaining that the internet is the gr.pdf
 
Write a program in java in which you will build the“Sink theShipsGam.pdf
Write a program in java in which you will build the“Sink theShipsGam.pdfWrite a program in java in which you will build the“Sink theShipsGam.pdf
Write a program in java in which you will build the“Sink theShipsGam.pdf
 
Write a functionWe want a function, called split, that has three p.pdf
Write a functionWe want a function, called split, that has three p.pdfWrite a functionWe want a function, called split, that has three p.pdf
Write a functionWe want a function, called split, that has three p.pdf
 
Why is it recommended that vegans take an oral vitamin B12 supplemen.pdf
Why is it recommended that vegans take an oral vitamin B12 supplemen.pdfWhy is it recommended that vegans take an oral vitamin B12 supplemen.pdf
Why is it recommended that vegans take an oral vitamin B12 supplemen.pdf
 
16. The respirations that accompany metabolic acidosis are frequentl.pdf
16. The respirations that accompany metabolic acidosis are frequentl.pdf16. The respirations that accompany metabolic acidosis are frequentl.pdf
16. The respirations that accompany metabolic acidosis are frequentl.pdf
 
What sorts of network monitoring tools are available to network admi.pdf
What sorts of network monitoring tools are available to network admi.pdfWhat sorts of network monitoring tools are available to network admi.pdf
What sorts of network monitoring tools are available to network admi.pdf
 
What is the difference between site and source energySolutionS.pdf
What is the difference between site and source energySolutionS.pdfWhat is the difference between site and source energySolutionS.pdf
What is the difference between site and source energySolutionS.pdf
 
Westminster Financial has released a summary of investor and investme.pdf
Westminster Financial has released a summary of investor and investme.pdfWestminster Financial has released a summary of investor and investme.pdf
Westminster Financial has released a summary of investor and investme.pdf
 
What are the application that uses Bernoulli equations.pdf
What are the application that uses Bernoulli equations.pdfWhat are the application that uses Bernoulli equations.pdf
What are the application that uses Bernoulli equations.pdf
 
Under which type of loading does fatigue occur static load plane l.pdf
Under which type of loading does fatigue occur  static load  plane l.pdfUnder which type of loading does fatigue occur  static load  plane l.pdf
Under which type of loading does fatigue occur static load plane l.pdf
 
True False1. The primary difference, in terms of processing, bet.pdf
True  False1. The primary difference, in terms of processing, bet.pdfTrue  False1. The primary difference, in terms of processing, bet.pdf
True False1. The primary difference, in terms of processing, bet.pdf
 
The graph to the right shows the number of cities with certain averag.pdf
The graph to the right shows the number of cities with certain averag.pdfThe graph to the right shows the number of cities with certain averag.pdf
The graph to the right shows the number of cities with certain averag.pdf
 
Snort started as what type of systemA. Behavior-based IPS system.pdf
Snort started as what type of systemA. Behavior-based IPS system.pdfSnort started as what type of systemA. Behavior-based IPS system.pdf
Snort started as what type of systemA. Behavior-based IPS system.pdf
 

Recently uploaded

Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportBasic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportDenish Jangid
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxAdelaideRefugio
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSean M. Fox
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽中 央社
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...EduSkills OECD
 
UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024Borja Sotomayor
 
How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17Celine George
 
MOOD STABLIZERS DRUGS.pptx
MOOD     STABLIZERS           DRUGS.pptxMOOD     STABLIZERS           DRUGS.pptx
MOOD STABLIZERS DRUGS.pptxPoojaSen20
 
Improved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppImproved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppCeline George
 
Đề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinhĐề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinhleson0603
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...EADTU
 
diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....Ritu480198
 
Trauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesTrauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesPooky Knightsmith
 
male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................MirzaAbrarBaig5
 
8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital ManagementMBA Assignment Experts
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnershipsexpandedwebsite
 

Recently uploaded (20)

Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"
 
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportBasic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
 
OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptx
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...
 
UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024
 
VAMOS CUIDAR DO NOSSO PLANETA! .
VAMOS CUIDAR DO NOSSO PLANETA!                    .VAMOS CUIDAR DO NOSSO PLANETA!                    .
VAMOS CUIDAR DO NOSSO PLANETA! .
 
How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17
 
MOOD STABLIZERS DRUGS.pptx
MOOD     STABLIZERS           DRUGS.pptxMOOD     STABLIZERS           DRUGS.pptx
MOOD STABLIZERS DRUGS.pptx
 
Improved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppImproved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio App
 
Đề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinhĐề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinh
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
 
diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....
 
Trauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesTrauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical Principles
 
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
 
male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................
 
8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
 

Write a short assembly code that does the followingAdd the conten.pdf

  • 1. Write a short assembly code that does the following: Add the contents of rax to rbx. If the result is positive, then make rcx zero else, do nothing Solution add %rbx %rax //The add instruction adds together its two operands, storing the result in its first operand mov %rcx, 0 //store the value 0 into rcx Endcase: L1: Endcase: