SlideShare a Scribd company logo
1 of 11
TEMPERATURE
CONVERTER
COMPUTER ORGANIZATION AND
ASSEMBLY LANGUAGE
UNIVERSITY OF ENGINEERING AND
TECHNOLOGY
LAHORE, NAROWAL CAMPUS
Submitted To: MA’AM Fatima
Submitted By: Zoha Afzal (2022 – CS – 563)
Asim Shahzad (2022 – CS – 547)
Abdulahad (2022 – CS – 549)
Aiza Eman (2022 – CS – 563)
Section: A
INTRODUCTION
The assembly code is designed for a
temperature conversion program on the Intel
x8086 architecture. This program serves as a
practical example of implementing a menu-
driven interface to convert temperatures
between Celsius, Fahrenheit, and Kelvin.
Developed with the purpose of educational
illustration, the code employs fundamental
assembly language concepts such as
input/output operations, conditional branching,
and subroutine usage.
Temperature Converter 3
PRIMARY GOALS
To convert the temperature
between Celsius, kelvin and
Fahrenheit using emu8086
assembly language. The
conversions are from:
• Celsius to
Fahrenheit
• Fahrenheit to
Celsius
• Celsius to Kelvin
CODE OVERVIEW
Overview of the main components:
• ".data" section: Declaration of input and output strings, menu prompts and
error messages.
• ".code" section: Main program logic
• Function calls: scan_num, print_num, and exit handling
• Global variables: “g” and “a” are declared in ‘data’ section to store user
inputs and selections.
Temperature Converter 5
PROGRAM STRUCTURE
Structure breakdown:
• Initial setup: Displaying the
temperature conversion menu
• Menu options from 1 to 7 for various
conversions
• Handling user input and calling
respective conversion functions
6
CONVERSION FUNCTIONS
Temperature Converter 7
• Function 1: Celsius to Fahrenheit
Formula used: °F = °C × (9/5) + 32
• Function 2: Fahrenheit to Celsius
Formula used: °C = (°F – 32) × (5/9)
• Function 3: Celsius to Kelvin
Formula used: Kelvin = °C + 273
CONVERSION FUNCTIONS
(CONT…)
8
• Function 4: Fahrenheit to Kelvin
Formula used: K = (° F − 32) × 5 ⁄ 9 +
273
• Function 5: Kelvin to Celsius
Formula used: °C = K – 273
• Function 3: Kelvin to Fahrenheit
Formula used: °F = (K − 273) × 9/5 +
32
ERROR HANDLING AND EXIT
Temperature Converter 9
• Repetition and Error Handling:
- After each conversion or error, the program provides the
option to return to the main menu or exit.
- If an invalid input is entered, an error message is displayed,
and the program returns to the main menu.
• Exit Program Section:
- The `exit_program` section displays a termination message
and exits the program using DOS interrupt 21h function
4Ch.
- The program terminates with the `END` directive.
CONCLUSION
10
This assembly code creates a menu-driven program that helps
convert temperatures between Celsius, Fahrenheit, and Kelvin
on the Intel x8086 platform. It showcases how to handle user
choices, manage data input and output, and navigate through
different temperature conversion options. The code is
organized into smaller, specialized sections for each type of
conversion, making it easy to understand and maintain. It
demonstrates how to guide user interactions and execute
specific tasks based on their selections.
THANK YOU

More Related Content

Similar to Temperature Converter is leay and I.pptx

Data Center Cooling System Design: Reducing Cooling Costs and Power Consumpti...
Data Center Cooling System Design: Reducing Cooling Costs and Power Consumpti...Data Center Cooling System Design: Reducing Cooling Costs and Power Consumpti...
Data Center Cooling System Design: Reducing Cooling Costs and Power Consumpti...SimScale
 
SIMULATION OF TEMPERATURE SENSOR USING LABVIEW
SIMULATION OF TEMPERATURE SENSOR USING LABVIEWSIMULATION OF TEMPERATURE SENSOR USING LABVIEW
SIMULATION OF TEMPERATURE SENSOR USING LABVIEWPooja Shukla
 
Lab2 (pfl) 20_mdele136(ausaf)
Lab2 (pfl) 20_mdele136(ausaf)Lab2 (pfl) 20_mdele136(ausaf)
Lab2 (pfl) 20_mdele136(ausaf)Ausaf Ahmad
 
Self Regulating Temperature Controller for Infant Warmer using IoT
Self Regulating Temperature Controller for Infant Warmer using IoTSelf Regulating Temperature Controller for Infant Warmer using IoT
Self Regulating Temperature Controller for Infant Warmer using IoTKevin Kipkirui Koech
 
C programming of an ARM microcontroller and writing UART serial communication...
C programming of an ARM microcontroller and writing UART serial communication...C programming of an ARM microcontroller and writing UART serial communication...
C programming of an ARM microcontroller and writing UART serial communication...nipunkrn
 
TEMPERATURE CONTROL AND DATA ACQUISITION METHOD FOR FACTORY USING LABVIEW
TEMPERATURE CONTROL AND DATA ACQUISITION METHOD FOR FACTORY USING LABVIEWTEMPERATURE CONTROL AND DATA ACQUISITION METHOD FOR FACTORY USING LABVIEW
TEMPERATURE CONTROL AND DATA ACQUISITION METHOD FOR FACTORY USING LABVIEWIAEME Publication
 
Cmis 102 Effective Communication / snaptutorial.com
Cmis 102  Effective Communication / snaptutorial.comCmis 102  Effective Communication / snaptutorial.com
Cmis 102 Effective Communication / snaptutorial.comHarrisGeorg12
 
Md university cmis 102 week 3 hands
Md university cmis 102 week 3 handsMd university cmis 102 week 3 hands
Md university cmis 102 week 3 handseyavagal
 
Cmis 102 Enthusiastic Study / snaptutorial.com
Cmis 102 Enthusiastic Study / snaptutorial.comCmis 102 Enthusiastic Study / snaptutorial.com
Cmis 102 Enthusiastic Study / snaptutorial.comStephenson22
 
Cmis 102 Success Begins / snaptutorial.com
Cmis 102 Success Begins / snaptutorial.comCmis 102 Success Begins / snaptutorial.com
Cmis 102 Success Begins / snaptutorial.comWilliamsTaylorza48
 
c++ Question
c++  Questionc++  Question
c++ QuestionHamza4467
 
Mod05 application migration
Mod05 application migrationMod05 application migration
Mod05 application migrationPeter Haase
 
Thermal Equipment Modeling in Modelica
Thermal Equipment Modeling in ModelicaThermal Equipment Modeling in Modelica
Thermal Equipment Modeling in ModelicaKaustubh Phalak
 
Thermal equipment modeling in modelica
Thermal equipment modeling in modelicaThermal equipment modeling in modelica
Thermal equipment modeling in modelicakpphalak
 
Data center-server-cooling-power-management-paper
Data center-server-cooling-power-management-paperData center-server-cooling-power-management-paper
Data center-server-cooling-power-management-paperDileep Bhandarkar
 

Similar to Temperature Converter is leay and I.pptx (20)

Data Center Cooling System Design: Reducing Cooling Costs and Power Consumpti...
Data Center Cooling System Design: Reducing Cooling Costs and Power Consumpti...Data Center Cooling System Design: Reducing Cooling Costs and Power Consumpti...
Data Center Cooling System Design: Reducing Cooling Costs and Power Consumpti...
 
SIMULATION OF TEMPERATURE SENSOR USING LABVIEW
SIMULATION OF TEMPERATURE SENSOR USING LABVIEWSIMULATION OF TEMPERATURE SENSOR USING LABVIEW
SIMULATION OF TEMPERATURE SENSOR USING LABVIEW
 
Lab2 (pfl) 20_mdele136(ausaf)
Lab2 (pfl) 20_mdele136(ausaf)Lab2 (pfl) 20_mdele136(ausaf)
Lab2 (pfl) 20_mdele136(ausaf)
 
Self Regulating Temperature Controller for Infant Warmer using IoT
Self Regulating Temperature Controller for Infant Warmer using IoTSelf Regulating Temperature Controller for Infant Warmer using IoT
Self Regulating Temperature Controller for Infant Warmer using IoT
 
C programming of an ARM microcontroller and writing UART serial communication...
C programming of an ARM microcontroller and writing UART serial communication...C programming of an ARM microcontroller and writing UART serial communication...
C programming of an ARM microcontroller and writing UART serial communication...
 
TEMPERATURE CONTROL AND DATA ACQUISITION METHOD FOR FACTORY USING LABVIEW
TEMPERATURE CONTROL AND DATA ACQUISITION METHOD FOR FACTORY USING LABVIEWTEMPERATURE CONTROL AND DATA ACQUISITION METHOD FOR FACTORY USING LABVIEW
TEMPERATURE CONTROL AND DATA ACQUISITION METHOD FOR FACTORY USING LABVIEW
 
Project
ProjectProject
Project
 
Cmis 102 Effective Communication / snaptutorial.com
Cmis 102  Effective Communication / snaptutorial.comCmis 102  Effective Communication / snaptutorial.com
Cmis 102 Effective Communication / snaptutorial.com
 
Md university cmis 102 week 3 hands
Md university cmis 102 week 3 handsMd university cmis 102 week 3 hands
Md university cmis 102 week 3 hands
 
Cmis 102 Enthusiastic Study / snaptutorial.com
Cmis 102 Enthusiastic Study / snaptutorial.comCmis 102 Enthusiastic Study / snaptutorial.com
Cmis 102 Enthusiastic Study / snaptutorial.com
 
Cmis 102 Success Begins / snaptutorial.com
Cmis 102 Success Begins / snaptutorial.comCmis 102 Success Begins / snaptutorial.com
Cmis 102 Success Begins / snaptutorial.com
 
Frenic hvac catalog
Frenic hvac catalogFrenic hvac catalog
Frenic hvac catalog
 
LOW COST SCADA SYSTEM FOR EDUCATION
LOW COST SCADA SYSTEM FOR EDUCATIONLOW COST SCADA SYSTEM FOR EDUCATION
LOW COST SCADA SYSTEM FOR EDUCATION
 
Microprocessor lab manual
Microprocessor lab manualMicroprocessor lab manual
Microprocessor lab manual
 
c++ Question
c++  Questionc++  Question
c++ Question
 
LabVIEW.pptx
LabVIEW.pptxLabVIEW.pptx
LabVIEW.pptx
 
Mod05 application migration
Mod05 application migrationMod05 application migration
Mod05 application migration
 
Thermal Equipment Modeling in Modelica
Thermal Equipment Modeling in ModelicaThermal Equipment Modeling in Modelica
Thermal Equipment Modeling in Modelica
 
Thermal equipment modeling in modelica
Thermal equipment modeling in modelicaThermal equipment modeling in modelica
Thermal equipment modeling in modelica
 
Data center-server-cooling-power-management-paper
Data center-server-cooling-power-management-paperData center-server-cooling-power-management-paper
Data center-server-cooling-power-management-paper
 

Recently uploaded

WhatsApp 9892124323 ✓Call Girls In Khar ( Mumbai ) secure service - Bandra F...
WhatsApp 9892124323 ✓Call Girls In Khar ( Mumbai ) secure service -  Bandra F...WhatsApp 9892124323 ✓Call Girls In Khar ( Mumbai ) secure service -  Bandra F...
WhatsApp 9892124323 ✓Call Girls In Khar ( Mumbai ) secure service - Bandra F...Pooja Nehwal
 
Real Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCR
Real Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCRReal Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCR
Real Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCRdollysharma2066
 
VIP Call Girl Saharanpur Aashi 8250192130 Independent Escort Service Saharanpur
VIP Call Girl Saharanpur Aashi 8250192130 Independent Escort Service SaharanpurVIP Call Girl Saharanpur Aashi 8250192130 Independent Escort Service Saharanpur
VIP Call Girl Saharanpur Aashi 8250192130 Independent Escort Service SaharanpurSuhani Kapoor
 
vip Model Basti Call Girls 9999965857 Call or WhatsApp Now Book
vip Model Basti Call Girls 9999965857 Call or WhatsApp Now Bookvip Model Basti Call Girls 9999965857 Call or WhatsApp Now Book
vip Model Basti Call Girls 9999965857 Call or WhatsApp Now Bookmanojkuma9823
 
Gaya Call Girls #9907093804 Contact Number Escorts Service Gaya
Gaya Call Girls #9907093804 Contact Number Escorts Service GayaGaya Call Girls #9907093804 Contact Number Escorts Service Gaya
Gaya Call Girls #9907093804 Contact Number Escorts Service Gayasrsj9000
 
Vip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best Services
Vip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best ServicesVip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best Services
Vip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best Servicesnajka9823
 
Slim Call Girls Service Badshah Nagar * 9548273370 Naughty Call Girls Service...
Slim Call Girls Service Badshah Nagar * 9548273370 Naughty Call Girls Service...Slim Call Girls Service Badshah Nagar * 9548273370 Naughty Call Girls Service...
Slim Call Girls Service Badshah Nagar * 9548273370 Naughty Call Girls Service...nagunakhan
 
《伯明翰城市大学毕业证成绩单购买》学历证书学位证书区别《复刻原版1:1伯明翰城市大学毕业证书|修改BCU成绩单PDF版》Q微信741003700《BCU学...
《伯明翰城市大学毕业证成绩单购买》学历证书学位证书区别《复刻原版1:1伯明翰城市大学毕业证书|修改BCU成绩单PDF版》Q微信741003700《BCU学...《伯明翰城市大学毕业证成绩单购买》学历证书学位证书区别《复刻原版1:1伯明翰城市大学毕业证书|修改BCU成绩单PDF版》Q微信741003700《BCU学...
《伯明翰城市大学毕业证成绩单购买》学历证书学位证书区别《复刻原版1:1伯明翰城市大学毕业证书|修改BCU成绩单PDF版》Q微信741003700《BCU学...ur8mqw8e
 
如何办理(NUS毕业证书)新加坡国立大学毕业证成绩单留信学历认证原版一比一
如何办理(NUS毕业证书)新加坡国立大学毕业证成绩单留信学历认证原版一比一如何办理(NUS毕业证书)新加坡国立大学毕业证成绩单留信学历认证原版一比一
如何办理(NUS毕业证书)新加坡国立大学毕业证成绩单留信学历认证原版一比一ga6c6bdl
 
Call Girls In Munirka>༒9599632723 Incall_OutCall Available
Call Girls In Munirka>༒9599632723 Incall_OutCall AvailableCall Girls In Munirka>༒9599632723 Incall_OutCall Available
Call Girls In Munirka>༒9599632723 Incall_OutCall AvailableCall Girls in Delhi
 
定制加拿大滑铁卢大学毕业证(Waterloo毕业证书)成绩单(文凭)原版一比一
定制加拿大滑铁卢大学毕业证(Waterloo毕业证书)成绩单(文凭)原版一比一定制加拿大滑铁卢大学毕业证(Waterloo毕业证书)成绩单(文凭)原版一比一
定制加拿大滑铁卢大学毕业证(Waterloo毕业证书)成绩单(文凭)原版一比一zul5vf0pq
 
Call Girls Delhi {Rohini} 9711199012 high profile service
Call Girls Delhi {Rohini} 9711199012 high profile serviceCall Girls Delhi {Rohini} 9711199012 high profile service
Call Girls Delhi {Rohini} 9711199012 high profile servicerehmti665
 
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
(办理学位证)加州州立大学北岭分校毕业证成绩单原版一比一
(办理学位证)加州州立大学北岭分校毕业证成绩单原版一比一(办理学位证)加州州立大学北岭分校毕业证成绩单原版一比一
(办理学位证)加州州立大学北岭分校毕业证成绩单原版一比一Fi sss
 
Hifi Babe North Delhi Call Girl Service Fun Tonight
Hifi Babe North Delhi Call Girl Service Fun TonightHifi Babe North Delhi Call Girl Service Fun Tonight
Hifi Babe North Delhi Call Girl Service Fun TonightKomal Khan
 
Russian Call Girls Kolkata Chhaya 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls Kolkata Chhaya 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls Kolkata Chhaya 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls Kolkata Chhaya 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
定制(USF学位证)旧金山大学毕业证成绩单原版一比一
定制(USF学位证)旧金山大学毕业证成绩单原版一比一定制(USF学位证)旧金山大学毕业证成绩单原版一比一
定制(USF学位证)旧金山大学毕业证成绩单原版一比一ss ss
 
如何办理萨省大学毕业证(UofS毕业证)成绩单留信学历认证原版一比一
如何办理萨省大学毕业证(UofS毕业证)成绩单留信学历认证原版一比一如何办理萨省大学毕业证(UofS毕业证)成绩单留信学历认证原版一比一
如何办理萨省大学毕业证(UofS毕业证)成绩单留信学历认证原版一比一ga6c6bdl
 

Recently uploaded (20)

WhatsApp 9892124323 ✓Call Girls In Khar ( Mumbai ) secure service - Bandra F...
WhatsApp 9892124323 ✓Call Girls In Khar ( Mumbai ) secure service -  Bandra F...WhatsApp 9892124323 ✓Call Girls In Khar ( Mumbai ) secure service -  Bandra F...
WhatsApp 9892124323 ✓Call Girls In Khar ( Mumbai ) secure service - Bandra F...
 
young call girls in Khanpur,🔝 9953056974 🔝 escort Service
young call girls in  Khanpur,🔝 9953056974 🔝 escort Serviceyoung call girls in  Khanpur,🔝 9953056974 🔝 escort Service
young call girls in Khanpur,🔝 9953056974 🔝 escort Service
 
Real Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCR
Real Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCRReal Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCR
Real Sure (Call Girl) in I.G.I. Airport 8377087607 Hot Call Girls In Delhi NCR
 
VIP Call Girl Saharanpur Aashi 8250192130 Independent Escort Service Saharanpur
VIP Call Girl Saharanpur Aashi 8250192130 Independent Escort Service SaharanpurVIP Call Girl Saharanpur Aashi 8250192130 Independent Escort Service Saharanpur
VIP Call Girl Saharanpur Aashi 8250192130 Independent Escort Service Saharanpur
 
vip Model Basti Call Girls 9999965857 Call or WhatsApp Now Book
vip Model Basti Call Girls 9999965857 Call or WhatsApp Now Bookvip Model Basti Call Girls 9999965857 Call or WhatsApp Now Book
vip Model Basti Call Girls 9999965857 Call or WhatsApp Now Book
 
Gaya Call Girls #9907093804 Contact Number Escorts Service Gaya
Gaya Call Girls #9907093804 Contact Number Escorts Service GayaGaya Call Girls #9907093804 Contact Number Escorts Service Gaya
Gaya Call Girls #9907093804 Contact Number Escorts Service Gaya
 
Vip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best Services
Vip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best ServicesVip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best Services
Vip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best Services
 
young call girls in Gtb Nagar,🔝 9953056974 🔝 escort Service
young call girls in Gtb Nagar,🔝 9953056974 🔝 escort Serviceyoung call girls in Gtb Nagar,🔝 9953056974 🔝 escort Service
young call girls in Gtb Nagar,🔝 9953056974 🔝 escort Service
 
Slim Call Girls Service Badshah Nagar * 9548273370 Naughty Call Girls Service...
Slim Call Girls Service Badshah Nagar * 9548273370 Naughty Call Girls Service...Slim Call Girls Service Badshah Nagar * 9548273370 Naughty Call Girls Service...
Slim Call Girls Service Badshah Nagar * 9548273370 Naughty Call Girls Service...
 
《伯明翰城市大学毕业证成绩单购买》学历证书学位证书区别《复刻原版1:1伯明翰城市大学毕业证书|修改BCU成绩单PDF版》Q微信741003700《BCU学...
《伯明翰城市大学毕业证成绩单购买》学历证书学位证书区别《复刻原版1:1伯明翰城市大学毕业证书|修改BCU成绩单PDF版》Q微信741003700《BCU学...《伯明翰城市大学毕业证成绩单购买》学历证书学位证书区别《复刻原版1:1伯明翰城市大学毕业证书|修改BCU成绩单PDF版》Q微信741003700《BCU学...
《伯明翰城市大学毕业证成绩单购买》学历证书学位证书区别《复刻原版1:1伯明翰城市大学毕业证书|修改BCU成绩单PDF版》Q微信741003700《BCU学...
 
如何办理(NUS毕业证书)新加坡国立大学毕业证成绩单留信学历认证原版一比一
如何办理(NUS毕业证书)新加坡国立大学毕业证成绩单留信学历认证原版一比一如何办理(NUS毕业证书)新加坡国立大学毕业证成绩单留信学历认证原版一比一
如何办理(NUS毕业证书)新加坡国立大学毕业证成绩单留信学历认证原版一比一
 
Call Girls In Munirka>༒9599632723 Incall_OutCall Available
Call Girls In Munirka>༒9599632723 Incall_OutCall AvailableCall Girls In Munirka>༒9599632723 Incall_OutCall Available
Call Girls In Munirka>༒9599632723 Incall_OutCall Available
 
定制加拿大滑铁卢大学毕业证(Waterloo毕业证书)成绩单(文凭)原版一比一
定制加拿大滑铁卢大学毕业证(Waterloo毕业证书)成绩单(文凭)原版一比一定制加拿大滑铁卢大学毕业证(Waterloo毕业证书)成绩单(文凭)原版一比一
定制加拿大滑铁卢大学毕业证(Waterloo毕业证书)成绩单(文凭)原版一比一
 
Call Girls Delhi {Rohini} 9711199012 high profile service
Call Girls Delhi {Rohini} 9711199012 high profile serviceCall Girls Delhi {Rohini} 9711199012 high profile service
Call Girls Delhi {Rohini} 9711199012 high profile service
 
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
(办理学位证)加州州立大学北岭分校毕业证成绩单原版一比一
(办理学位证)加州州立大学北岭分校毕业证成绩单原版一比一(办理学位证)加州州立大学北岭分校毕业证成绩单原版一比一
(办理学位证)加州州立大学北岭分校毕业证成绩单原版一比一
 
Hifi Babe North Delhi Call Girl Service Fun Tonight
Hifi Babe North Delhi Call Girl Service Fun TonightHifi Babe North Delhi Call Girl Service Fun Tonight
Hifi Babe North Delhi Call Girl Service Fun Tonight
 
Russian Call Girls Kolkata Chhaya 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls Kolkata Chhaya 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls Kolkata Chhaya 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls Kolkata Chhaya 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
定制(USF学位证)旧金山大学毕业证成绩单原版一比一
定制(USF学位证)旧金山大学毕业证成绩单原版一比一定制(USF学位证)旧金山大学毕业证成绩单原版一比一
定制(USF学位证)旧金山大学毕业证成绩单原版一比一
 
如何办理萨省大学毕业证(UofS毕业证)成绩单留信学历认证原版一比一
如何办理萨省大学毕业证(UofS毕业证)成绩单留信学历认证原版一比一如何办理萨省大学毕业证(UofS毕业证)成绩单留信学历认证原版一比一
如何办理萨省大学毕业证(UofS毕业证)成绩单留信学历认证原版一比一
 

Temperature Converter is leay and I.pptx

  • 2. UNIVERSITY OF ENGINEERING AND TECHNOLOGY LAHORE, NAROWAL CAMPUS Submitted To: MA’AM Fatima Submitted By: Zoha Afzal (2022 – CS – 563) Asim Shahzad (2022 – CS – 547) Abdulahad (2022 – CS – 549) Aiza Eman (2022 – CS – 563) Section: A
  • 3. INTRODUCTION The assembly code is designed for a temperature conversion program on the Intel x8086 architecture. This program serves as a practical example of implementing a menu- driven interface to convert temperatures between Celsius, Fahrenheit, and Kelvin. Developed with the purpose of educational illustration, the code employs fundamental assembly language concepts such as input/output operations, conditional branching, and subroutine usage. Temperature Converter 3
  • 4. PRIMARY GOALS To convert the temperature between Celsius, kelvin and Fahrenheit using emu8086 assembly language. The conversions are from: • Celsius to Fahrenheit • Fahrenheit to Celsius • Celsius to Kelvin
  • 5. CODE OVERVIEW Overview of the main components: • ".data" section: Declaration of input and output strings, menu prompts and error messages. • ".code" section: Main program logic • Function calls: scan_num, print_num, and exit handling • Global variables: “g” and “a” are declared in ‘data’ section to store user inputs and selections. Temperature Converter 5
  • 6. PROGRAM STRUCTURE Structure breakdown: • Initial setup: Displaying the temperature conversion menu • Menu options from 1 to 7 for various conversions • Handling user input and calling respective conversion functions 6
  • 7. CONVERSION FUNCTIONS Temperature Converter 7 • Function 1: Celsius to Fahrenheit Formula used: °F = °C × (9/5) + 32 • Function 2: Fahrenheit to Celsius Formula used: °C = (°F – 32) × (5/9) • Function 3: Celsius to Kelvin Formula used: Kelvin = °C + 273
  • 8. CONVERSION FUNCTIONS (CONT…) 8 • Function 4: Fahrenheit to Kelvin Formula used: K = (° F − 32) × 5 ⁄ 9 + 273 • Function 5: Kelvin to Celsius Formula used: °C = K – 273 • Function 3: Kelvin to Fahrenheit Formula used: °F = (K − 273) × 9/5 + 32
  • 9. ERROR HANDLING AND EXIT Temperature Converter 9 • Repetition and Error Handling: - After each conversion or error, the program provides the option to return to the main menu or exit. - If an invalid input is entered, an error message is displayed, and the program returns to the main menu. • Exit Program Section: - The `exit_program` section displays a termination message and exits the program using DOS interrupt 21h function 4Ch. - The program terminates with the `END` directive.
  • 10. CONCLUSION 10 This assembly code creates a menu-driven program that helps convert temperatures between Celsius, Fahrenheit, and Kelvin on the Intel x8086 platform. It showcases how to handle user choices, manage data input and output, and navigate through different temperature conversion options. The code is organized into smaller, specialized sections for each type of conversion, making it easy to understand and maintain. It demonstrates how to guide user interactions and execute specific tasks based on their selections.