SlideShare a Scribd company logo
1 of 2
Download to read offline
Assume that you have the following set of hexadecimal values: $20, $25, $40, $50, $12. Write a
segment of a program to find the minimum and maximum values of the set.
Solution
DATASEGMENT
ARR DW $20, $25, $40, $50, $12
LEN DW $05
MIN DW ?
MAX DW ?
DATAENDS
CODESEGMENT
ASSUME DS:DATA CS:CODE
START:
MOV AX,DATA
MOV DS,AX
LEA SI,ARR
MOV AL,ARR[SI]
MOV MIN,AL
MOV MAX,AL
MOV CX,LEN
REPEAT:
MOV AL,ARR[SI]
CMP MIN,AL
JL CHECKMAX
MOV MIN,AL
CHECKMAX:
CMP MAX,AL
JG DONE
MOV MAX,AL
DONE:
INC SI
LOOPREPEAT
MOV AH,4CH
INT 21H
CODEENDS
END START

More Related Content

More from arhamgarmentsdelhi

Define social contract theory. What does it attempt to explainS.pdf
Define social contract theory. What does it attempt to explainS.pdfDefine social contract theory. What does it attempt to explainS.pdf
Define social contract theory. What does it attempt to explainS.pdfarhamgarmentsdelhi
 
Briefly explain why heating water close to boiling in a test tube wo.pdf
Briefly explain why heating water close to boiling in a test tube wo.pdfBriefly explain why heating water close to boiling in a test tube wo.pdf
Briefly explain why heating water close to boiling in a test tube wo.pdfarhamgarmentsdelhi
 
AP Biology II -1. What substrate does the enzyme Potassium Cyanide.pdf
AP Biology II -1. What substrate does the enzyme Potassium Cyanide.pdfAP Biology II -1. What substrate does the enzyme Potassium Cyanide.pdf
AP Biology II -1. What substrate does the enzyme Potassium Cyanide.pdfarhamgarmentsdelhi
 
allocation SolutionThe correct option is Depreciation.Depreci.pdf
allocation SolutionThe correct option is Depreciation.Depreci.pdfallocation SolutionThe correct option is Depreciation.Depreci.pdf
allocation SolutionThe correct option is Depreciation.Depreci.pdfarhamgarmentsdelhi
 
A) Explain five (5) challenges amphibians faced when colonizing land.pdf
A) Explain five (5) challenges amphibians faced when colonizing land.pdfA) Explain five (5) challenges amphibians faced when colonizing land.pdf
A) Explain five (5) challenges amphibians faced when colonizing land.pdfarhamgarmentsdelhi
 
Classful addressing describes the IP address scheme thata.) divid.pdf
Classful addressing describes the IP address scheme thata.) divid.pdfClassful addressing describes the IP address scheme thata.) divid.pdf
Classful addressing describes the IP address scheme thata.) divid.pdfarhamgarmentsdelhi
 
a. Explain how chronic bleeding leads to iron deficiency anemia. b. .pdf
a. Explain how chronic bleeding leads to iron deficiency anemia. b. .pdfa. Explain how chronic bleeding leads to iron deficiency anemia. b. .pdf
a. Explain how chronic bleeding leads to iron deficiency anemia. b. .pdfarhamgarmentsdelhi
 
8. Identify the causes and symptoms of endocarditis, myocarditis, an.pdf
8. Identify the causes and symptoms of endocarditis, myocarditis, an.pdf8. Identify the causes and symptoms of endocarditis, myocarditis, an.pdf
8. Identify the causes and symptoms of endocarditis, myocarditis, an.pdfarhamgarmentsdelhi
 
Can someone please help me with this question3. Describe the funct.pdf
Can someone please help me with this question3. Describe the funct.pdfCan someone please help me with this question3. Describe the funct.pdf
Can someone please help me with this question3. Describe the funct.pdfarhamgarmentsdelhi
 
2. The probability that a phone call will last more than t minutes i.pdf
2. The probability that a phone call will last more than t minutes i.pdf2. The probability that a phone call will last more than t minutes i.pdf
2. The probability that a phone call will last more than t minutes i.pdfarhamgarmentsdelhi
 
28. Which of the following is an example of temporal structure in a .pdf
28. Which of the following is an example of temporal structure in a .pdf28. Which of the following is an example of temporal structure in a .pdf
28. Which of the following is an example of temporal structure in a .pdfarhamgarmentsdelhi
 
17 Testing Your Knowledge s. Why are biologists sointerested inchemis.pdf
17 Testing Your Knowledge s. Why are biologists sointerested inchemis.pdf17 Testing Your Knowledge s. Why are biologists sointerested inchemis.pdf
17 Testing Your Knowledge s. Why are biologists sointerested inchemis.pdfarhamgarmentsdelhi
 
Which species are included in the order InsectivoraShrews, moles .pdf
Which species are included in the order InsectivoraShrews, moles .pdfWhich species are included in the order InsectivoraShrews, moles .pdf
Which species are included in the order InsectivoraShrews, moles .pdfarhamgarmentsdelhi
 
Will you explain chemical bondsSolutionA chemical bond can .pdf
Will you explain chemical bondsSolutionA chemical bond can .pdfWill you explain chemical bondsSolutionA chemical bond can .pdf
Will you explain chemical bondsSolutionA chemical bond can .pdfarhamgarmentsdelhi
 
What is a stub and why is it used in testingSolutionStub is a.pdf
What is a stub and why is it used in testingSolutionStub is a.pdfWhat is a stub and why is it used in testingSolutionStub is a.pdf
What is a stub and why is it used in testingSolutionStub is a.pdfarhamgarmentsdelhi
 
What specific balance sheet account provides the link between the ba.pdf
What specific balance sheet account provides the link between the ba.pdfWhat specific balance sheet account provides the link between the ba.pdf
What specific balance sheet account provides the link between the ba.pdfarhamgarmentsdelhi
 
What are the basic building blocks for Consumer Based Brand Equity .pdf
What are the basic building blocks for Consumer Based Brand Equity .pdfWhat are the basic building blocks for Consumer Based Brand Equity .pdf
What are the basic building blocks for Consumer Based Brand Equity .pdfarhamgarmentsdelhi
 
What does reconcile total assets to net operating assets mean an.pdf
What does reconcile total assets to net operating assets mean an.pdfWhat does reconcile total assets to net operating assets mean an.pdf
What does reconcile total assets to net operating assets mean an.pdfarhamgarmentsdelhi
 
Vegetation cover and aspect influence temperature Temperature is alw.pdf
Vegetation cover and aspect influence temperature  Temperature is alw.pdfVegetation cover and aspect influence temperature  Temperature is alw.pdf
Vegetation cover and aspect influence temperature Temperature is alw.pdfarhamgarmentsdelhi
 
The grouping Archaea is which of the following in the modern taxonom.pdf
The grouping Archaea is which of the following in the modern taxonom.pdfThe grouping Archaea is which of the following in the modern taxonom.pdf
The grouping Archaea is which of the following in the modern taxonom.pdfarhamgarmentsdelhi
 

More from arhamgarmentsdelhi (20)

Define social contract theory. What does it attempt to explainS.pdf
Define social contract theory. What does it attempt to explainS.pdfDefine social contract theory. What does it attempt to explainS.pdf
Define social contract theory. What does it attempt to explainS.pdf
 
Briefly explain why heating water close to boiling in a test tube wo.pdf
Briefly explain why heating water close to boiling in a test tube wo.pdfBriefly explain why heating water close to boiling in a test tube wo.pdf
Briefly explain why heating water close to boiling in a test tube wo.pdf
 
AP Biology II -1. What substrate does the enzyme Potassium Cyanide.pdf
AP Biology II -1. What substrate does the enzyme Potassium Cyanide.pdfAP Biology II -1. What substrate does the enzyme Potassium Cyanide.pdf
AP Biology II -1. What substrate does the enzyme Potassium Cyanide.pdf
 
allocation SolutionThe correct option is Depreciation.Depreci.pdf
allocation SolutionThe correct option is Depreciation.Depreci.pdfallocation SolutionThe correct option is Depreciation.Depreci.pdf
allocation SolutionThe correct option is Depreciation.Depreci.pdf
 
A) Explain five (5) challenges amphibians faced when colonizing land.pdf
A) Explain five (5) challenges amphibians faced when colonizing land.pdfA) Explain five (5) challenges amphibians faced when colonizing land.pdf
A) Explain five (5) challenges amphibians faced when colonizing land.pdf
 
Classful addressing describes the IP address scheme thata.) divid.pdf
Classful addressing describes the IP address scheme thata.) divid.pdfClassful addressing describes the IP address scheme thata.) divid.pdf
Classful addressing describes the IP address scheme thata.) divid.pdf
 
a. Explain how chronic bleeding leads to iron deficiency anemia. b. .pdf
a. Explain how chronic bleeding leads to iron deficiency anemia. b. .pdfa. Explain how chronic bleeding leads to iron deficiency anemia. b. .pdf
a. Explain how chronic bleeding leads to iron deficiency anemia. b. .pdf
 
8. Identify the causes and symptoms of endocarditis, myocarditis, an.pdf
8. Identify the causes and symptoms of endocarditis, myocarditis, an.pdf8. Identify the causes and symptoms of endocarditis, myocarditis, an.pdf
8. Identify the causes and symptoms of endocarditis, myocarditis, an.pdf
 
Can someone please help me with this question3. Describe the funct.pdf
Can someone please help me with this question3. Describe the funct.pdfCan someone please help me with this question3. Describe the funct.pdf
Can someone please help me with this question3. Describe the funct.pdf
 
2. The probability that a phone call will last more than t minutes i.pdf
2. The probability that a phone call will last more than t minutes i.pdf2. The probability that a phone call will last more than t minutes i.pdf
2. The probability that a phone call will last more than t minutes i.pdf
 
28. Which of the following is an example of temporal structure in a .pdf
28. Which of the following is an example of temporal structure in a .pdf28. Which of the following is an example of temporal structure in a .pdf
28. Which of the following is an example of temporal structure in a .pdf
 
17 Testing Your Knowledge s. Why are biologists sointerested inchemis.pdf
17 Testing Your Knowledge s. Why are biologists sointerested inchemis.pdf17 Testing Your Knowledge s. Why are biologists sointerested inchemis.pdf
17 Testing Your Knowledge s. Why are biologists sointerested inchemis.pdf
 
Which species are included in the order InsectivoraShrews, moles .pdf
Which species are included in the order InsectivoraShrews, moles .pdfWhich species are included in the order InsectivoraShrews, moles .pdf
Which species are included in the order InsectivoraShrews, moles .pdf
 
Will you explain chemical bondsSolutionA chemical bond can .pdf
Will you explain chemical bondsSolutionA chemical bond can .pdfWill you explain chemical bondsSolutionA chemical bond can .pdf
Will you explain chemical bondsSolutionA chemical bond can .pdf
 
What is a stub and why is it used in testingSolutionStub is a.pdf
What is a stub and why is it used in testingSolutionStub is a.pdfWhat is a stub and why is it used in testingSolutionStub is a.pdf
What is a stub and why is it used in testingSolutionStub is a.pdf
 
What specific balance sheet account provides the link between the ba.pdf
What specific balance sheet account provides the link between the ba.pdfWhat specific balance sheet account provides the link between the ba.pdf
What specific balance sheet account provides the link between the ba.pdf
 
What are the basic building blocks for Consumer Based Brand Equity .pdf
What are the basic building blocks for Consumer Based Brand Equity .pdfWhat are the basic building blocks for Consumer Based Brand Equity .pdf
What are the basic building blocks for Consumer Based Brand Equity .pdf
 
What does reconcile total assets to net operating assets mean an.pdf
What does reconcile total assets to net operating assets mean an.pdfWhat does reconcile total assets to net operating assets mean an.pdf
What does reconcile total assets to net operating assets mean an.pdf
 
Vegetation cover and aspect influence temperature Temperature is alw.pdf
Vegetation cover and aspect influence temperature  Temperature is alw.pdfVegetation cover and aspect influence temperature  Temperature is alw.pdf
Vegetation cover and aspect influence temperature Temperature is alw.pdf
 
The grouping Archaea is which of the following in the modern taxonom.pdf
The grouping Archaea is which of the following in the modern taxonom.pdfThe grouping Archaea is which of the following in the modern taxonom.pdf
The grouping Archaea is which of the following in the modern taxonom.pdf
 

Recently uploaded

Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdfssuserdda66b
 

Recently uploaded (20)

Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
 

Assume that you have the following set of hexadecimal values $20, $.pdf

  • 1. Assume that you have the following set of hexadecimal values: $20, $25, $40, $50, $12. Write a segment of a program to find the minimum and maximum values of the set. Solution DATASEGMENT ARR DW $20, $25, $40, $50, $12 LEN DW $05 MIN DW ? MAX DW ? DATAENDS CODESEGMENT ASSUME DS:DATA CS:CODE START: MOV AX,DATA MOV DS,AX LEA SI,ARR MOV AL,ARR[SI] MOV MIN,AL MOV MAX,AL MOV CX,LEN REPEAT: MOV AL,ARR[SI] CMP MIN,AL JL CHECKMAX MOV MIN,AL CHECKMAX: CMP MAX,AL JG DONE MOV MAX,AL DONE: INC SI LOOPREPEAT MOV AH,4CH INT 21H