SlideShare a Scribd company logo
1 of 10
PROJECT
temperature converter
Project members:1) Abida kasur (014)
2)Shumail tariq (002)
Project starting date :26 -4- 2016
Project completion date: 1-5-2016
TS
.Project description
.explanation
.purpose
.code
. Output
.summary
roject description
 Assembly program to convert Centigrade
(Celsius) to Fahrenheit temperature
measuring scales
.Temperature in Celsius is always between 0 ‘C -
99 ‘C, Hence the program will take two digit
decimal number as INPUT. Let me tell you
Formula of Conversion .
 Celsius = (Fahrenheit – 32)* 5 / 9.
 Fahrenheit = (Celsius * 9 / 5) + 32. -this is
what we are IMPLIMENTING.
planation :
 In this Assembly Language Programming, A
single program is divided into four Segments
which are 1. Data Segment, 2. Code Segment,
3. Stack Segment, and 4. Extra Segment.
The identified variables are T, RES,
MSG1 and MSG2.
Purpose:
conversion of temperature from C to F scale
implement the concept of LOOPS JUMPS
conversion from ASCII to BCD And BCD to ASCII
MULTIPICATION and DIVISION and in this
project we implementThe concept of logical
operations
compare instruction and register to register data
transfer
DATA SEGMENT ;starting of data segment
T DB ?
RES DB 10 DUP ('$')
MSG1 DB "ENTER TEMPERATURE IN CELSIUS (ONLY IN 2 DIGITS) : $"
MSG2 DB 10,13,"CONVERTED IS FAHRENHEIT (TEMPERATURE) : $"
DATA ENDS ; end of data segment
CODE SEGMENT
ASSUME DS:DATA,CS ; assuming data for data and code for code segment
.CODE START: ; label for starting code
MOV AX,DATA
MOV DS,AX
LEA DX,MSG1 ;displaying message 1
MOV AH,9 ; use to print the message of address in DX
INT 21H
MOV AH,1 ; read a character
INT 21H ; linking with dos
SUB AL,30H ; conversion
MOV AH,0 ;clear unwanted value
MOV BL,10 ; transfer 10 to BL
MUL BL ;BL result will multiply with al
MOV BL,AL ; transfer result to BL
MOV AH,1 ; read a character
INT 21H
SUB AL,30H ; conversion to BCD
MOV AH,0 ; clear unwanted value
ADD AL,BL ;addition
MOV T,AL ; AL value to the variable t for temperature
MOV DL,9 ; copying 9 to dl register
MUL DL ;9 multiply with AL give(c*9)
MOV BL,5 ; copying 5 value to BL
DIV BL ; DIVISION OF BL with ax gives (9*C)/5
MOV AH,0 ; clear unwanted value
ADD AL,32 ; add 32 to BL… GIVES (9*C)/5+ 32
LEA SI,RES ; use to load effective address to SI
CALL HEX2DEC ; call for procedure
LEA DX,MSG2 ; display MSG 2
MOV AH,9 ;print string MSG
INT 21H
LEA DX,RES ; print the string or message
MOV AH,9
INT 21H
MOV AH,4CH ; exit to dos or OS
INT 21H
CODE ENDS ;end of code segment
HEX2DEC PROC NEAR ; near procedure is called
MOV CX,0 ; clear unwanted value
MOV BX,10 ; COPYING 10 to BX
LOOP1: MOV DX,0 ; START OF LOOP and removing garbage value from DX
DIV BX ;divide BX with AX
ADD DL,30H ; conversion to ASCII
PUSH DX ; STORE 16 BIT DATA TO DX
INC CX ; INCREMENT VALUE OF CX
CMP AX,9 ; COMPARE AX WITH 9
JG LOOP1 IF GREATER THEN JUMP TO LOOP 1
ADD AL,30H ; CONVERSION TO ASCII
MOV[SI],AL ;SAVING CHARACTER IN CHARACTER
array
LOOP2: POP AX ;get 16 bit data from AX
INC SI ;increment the SI
MOV [SI],AL ; SAVING CHARACTER TO CHAR ARRAY
LOOP LOOP2 ; END OF LOOP
RET ; RETURN INSTRUCTION
HEX2DEC ENDP ;END OF PROCEDURE
END START ; ENDING POINT OF CODE
After execution of code
output:
Summary:
This project is based on basic assembly
operations division multiplication jumps
loops procedures stack etc are used . It
act as temperature converter and
display temperature in another scale

More Related Content

What's hot

DCS ( Distributed Control System )
DCS ( Distributed Control System )DCS ( Distributed Control System )
DCS ( Distributed Control System )
Automation123
 

What's hot (20)

Internet of Things (Iot) Based Robotic Arm
Internet of Things (Iot) Based Robotic ArmInternet of Things (Iot) Based Robotic Arm
Internet of Things (Iot) Based Robotic Arm
 
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT IV Designing Embedded System with 8051...
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT IV  Designing Embedded System with 8051...SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT IV  Designing Embedded System with 8051...
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT IV Designing Embedded System with 8051...
 
microcontroller vs microprocessor
microcontroller vs microprocessormicrocontroller vs microprocessor
microcontroller vs microprocessor
 
Smart Intelligent trolley
Smart Intelligent trolley Smart Intelligent trolley
Smart Intelligent trolley
 
On delay timer
On delay timerOn delay timer
On delay timer
 
Microcontroller
MicrocontrollerMicrocontroller
Microcontroller
 
temperature dependent dc fan speed controller withou using micrcontroller
temperature dependent dc fan speed controller withou using micrcontrollertemperature dependent dc fan speed controller withou using micrcontroller
temperature dependent dc fan speed controller withou using micrcontroller
 
AVR Fundamentals
AVR FundamentalsAVR Fundamentals
AVR Fundamentals
 
DCS ( Distributed Control System )
DCS ( Distributed Control System )DCS ( Distributed Control System )
DCS ( Distributed Control System )
 
Introduction to Embedded Systems I : Chapter 1
Introduction to Embedded Systems I : Chapter 1Introduction to Embedded Systems I : Chapter 1
Introduction to Embedded Systems I : Chapter 1
 
Rs232 protocal
Rs232 protocalRs232 protocal
Rs232 protocal
 
1 STM32's DMA.ppt
1 STM32's DMA.ppt1 STM32's DMA.ppt
1 STM32's DMA.ppt
 
Plc
PlcPlc
Plc
 
Introduction to stm32-part1
Introduction to stm32-part1Introduction to stm32-part1
Introduction to stm32-part1
 
Introduction to Avr Microcontrollers
Introduction to Avr MicrocontrollersIntroduction to Avr Microcontrollers
Introduction to Avr Microcontrollers
 
Final Report
Final ReportFinal Report
Final Report
 
80386 Architecture
80386 Architecture80386 Architecture
80386 Architecture
 
Design an Automatic Temperature Control System for Smart Electric Fan Using PIC
Design an Automatic Temperature Control System for Smart Electric Fan Using PICDesign an Automatic Temperature Control System for Smart Electric Fan Using PIC
Design an Automatic Temperature Control System for Smart Electric Fan Using PIC
 
Synopsis for alcohol detection with vehicle controlling (1)
Synopsis for alcohol detection with vehicle controlling (1)Synopsis for alcohol detection with vehicle controlling (1)
Synopsis for alcohol detection with vehicle controlling (1)
 
3 jump, loop and call instructions
3 jump, loop and call instructions3 jump, loop and call instructions
3 jump, loop and call instructions
 

Viewers also liked

AQHAMarketingInternship
AQHAMarketingInternshipAQHAMarketingInternship
AQHAMarketingInternship
Emily Kirk
 
Process Synchronization
Process SynchronizationProcess Synchronization
Process Synchronization
vinay arora
 
Process synchronization(deepa)
Process synchronization(deepa)Process synchronization(deepa)
Process synchronization(deepa)
Nagarajan
 
Ch7 OS
Ch7 OSCh7 OS
Ch7 OS
C.U
 
Lec11 semaphores
Lec11 semaphoresLec11 semaphores
Lec11 semaphores
anandammca
 

Viewers also liked (20)

Cybercrime 111205224958-phpapp02
Cybercrime 111205224958-phpapp02Cybercrime 111205224958-phpapp02
Cybercrime 111205224958-phpapp02
 
T.P. informática
T.P. informáticaT.P. informática
T.P. informática
 
Reflection zavala
Reflection zavalaReflection zavala
Reflection zavala
 
AQHAMarketingInternship
AQHAMarketingInternshipAQHAMarketingInternship
AQHAMarketingInternship
 
Ergonomía en el puesto de trabajo
Ergonomía en el puesto de trabajoErgonomía en el puesto de trabajo
Ergonomía en el puesto de trabajo
 
Evaluacion de la calidad
Evaluacion de la calidadEvaluacion de la calidad
Evaluacion de la calidad
 
Haji dan umrah
Haji dan umrahHaji dan umrah
Haji dan umrah
 
Homeowners protest-guide
Homeowners protest-guideHomeowners protest-guide
Homeowners protest-guide
 
Semio
SemioSemio
Semio
 
Glosario introduccion al hardware
Glosario introduccion al hardwareGlosario introduccion al hardware
Glosario introduccion al hardware
 
Monografia redes
Monografia redesMonografia redes
Monografia redes
 
Ericsson
EricssonEricsson
Ericsson
 
Process Synchronization
Process SynchronizationProcess Synchronization
Process Synchronization
 
Process synchronization(deepa)
Process synchronization(deepa)Process synchronization(deepa)
Process synchronization(deepa)
 
Ch7 OS
Ch7 OSCh7 OS
Ch7 OS
 
Lec11 semaphores
Lec11 semaphoresLec11 semaphores
Lec11 semaphores
 
Operating system critical section
Operating system   critical sectionOperating system   critical section
Operating system critical section
 
Semaphores
SemaphoresSemaphores
Semaphores
 
OS Process Synchronization, semaphore and Monitors
OS Process Synchronization, semaphore and MonitorsOS Process Synchronization, semaphore and Monitors
OS Process Synchronization, semaphore and Monitors
 
Networks Have Layers - Understanding The OSI Model
Networks Have Layers - Understanding The OSI ModelNetworks Have Layers - Understanding The OSI Model
Networks Have Layers - Understanding The OSI Model
 

Similar to Project

Temperature Converter is leay and I.pptx
Temperature Converter is leay and I.pptxTemperature Converter is leay and I.pptx
Temperature Converter is leay and I.pptx
asimshahzad8611
 
Chp6 assembly language programming for pic copy
Chp6 assembly language programming for pic   copyChp6 assembly language programming for pic   copy
Chp6 assembly language programming for pic copy
mkazree
 
Part III: Assembly Language
Part III: Assembly LanguagePart III: Assembly Language
Part III: Assembly Language
Ahmed M. Abed
 
Https _doc-0o-c4-apps-viewer.googleusercontent
Https  _doc-0o-c4-apps-viewer.googleusercontent Https  _doc-0o-c4-apps-viewer.googleusercontent
Https _doc-0o-c4-apps-viewer.googleusercontent
vijaydeepakg
 

Similar to Project (20)

Microprocessor 8086-lab-mannual
Microprocessor 8086-lab-mannualMicroprocessor 8086-lab-mannual
Microprocessor 8086-lab-mannual
 
Exp 03
Exp 03Exp 03
Exp 03
 
Temperature Converter is leay and I.pptx
Temperature Converter is leay and I.pptxTemperature Converter is leay and I.pptx
Temperature Converter is leay and I.pptx
 
Assembly Language Lecture 4
Assembly Language Lecture 4Assembly Language Lecture 4
Assembly Language Lecture 4
 
Assembly language programs
Assembly language programsAssembly language programs
Assembly language programs
 
Assembly language programs 2
Assembly language programs 2Assembly language programs 2
Assembly language programs 2
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
 
Chp6 assembly language programming for pic copy
Chp6 assembly language programming for pic   copyChp6 assembly language programming for pic   copy
Chp6 assembly language programming for pic copy
 
Assembly Language Lecture 3
Assembly Language Lecture 3Assembly Language Lecture 3
Assembly Language Lecture 3
 
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...
 
Anup2
Anup2Anup2
Anup2
 
1344 Alp Of 8086
1344 Alp Of 80861344 Alp Of 8086
1344 Alp Of 8086
 
Code Conversion in 8085 Microprocessor
Code Conversion in 8085 MicroprocessorCode Conversion in 8085 Microprocessor
Code Conversion in 8085 Microprocessor
 
Mcs 17 solved assignment 2015- 16
Mcs 17 solved assignment 2015- 16Mcs 17 solved assignment 2015- 16
Mcs 17 solved assignment 2015- 16
 
15CSL48 MP&MC manual
15CSL48 MP&MC manual15CSL48 MP&MC manual
15CSL48 MP&MC manual
 
Practical notes
Practical notesPractical notes
Practical notes
 
Part III: Assembly Language
Part III: Assembly LanguagePart III: Assembly Language
Part III: Assembly Language
 
Microprocssor
MicroprocssorMicroprocssor
Microprocssor
 
Https _doc-0o-c4-apps-viewer.googleusercontent
Https  _doc-0o-c4-apps-viewer.googleusercontent Https  _doc-0o-c4-apps-viewer.googleusercontent
Https _doc-0o-c4-apps-viewer.googleusercontent
 
Mpmc lab
Mpmc labMpmc lab
Mpmc lab
 

Recently uploaded

Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
Kamal Acharya
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
Epec Engineered Technologies
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Kandungan 087776558899
 

Recently uploaded (20)

COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
Wadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptxWadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptx
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
 
kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal load
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 

Project

  • 1. PROJECT temperature converter Project members:1) Abida kasur (014) 2)Shumail tariq (002) Project starting date :26 -4- 2016 Project completion date: 1-5-2016
  • 3. roject description  Assembly program to convert Centigrade (Celsius) to Fahrenheit temperature measuring scales .Temperature in Celsius is always between 0 ‘C - 99 ‘C, Hence the program will take two digit decimal number as INPUT. Let me tell you Formula of Conversion .  Celsius = (Fahrenheit – 32)* 5 / 9.  Fahrenheit = (Celsius * 9 / 5) + 32. -this is what we are IMPLIMENTING.
  • 4. planation :  In this Assembly Language Programming, A single program is divided into four Segments which are 1. Data Segment, 2. Code Segment, 3. Stack Segment, and 4. Extra Segment. The identified variables are T, RES, MSG1 and MSG2.
  • 5. Purpose: conversion of temperature from C to F scale implement the concept of LOOPS JUMPS conversion from ASCII to BCD And BCD to ASCII MULTIPICATION and DIVISION and in this project we implementThe concept of logical operations compare instruction and register to register data transfer
  • 6. DATA SEGMENT ;starting of data segment T DB ? RES DB 10 DUP ('$') MSG1 DB "ENTER TEMPERATURE IN CELSIUS (ONLY IN 2 DIGITS) : $" MSG2 DB 10,13,"CONVERTED IS FAHRENHEIT (TEMPERATURE) : $" DATA ENDS ; end of data segment CODE SEGMENT ASSUME DS:DATA,CS ; assuming data for data and code for code segment .CODE START: ; label for starting code MOV AX,DATA MOV DS,AX LEA DX,MSG1 ;displaying message 1 MOV AH,9 ; use to print the message of address in DX INT 21H MOV AH,1 ; read a character INT 21H ; linking with dos SUB AL,30H ; conversion MOV AH,0 ;clear unwanted value MOV BL,10 ; transfer 10 to BL MUL BL ;BL result will multiply with al MOV BL,AL ; transfer result to BL MOV AH,1 ; read a character INT 21H SUB AL,30H ; conversion to BCD MOV AH,0 ; clear unwanted value ADD AL,BL ;addition MOV T,AL ; AL value to the variable t for temperature
  • 7. MOV DL,9 ; copying 9 to dl register MUL DL ;9 multiply with AL give(c*9) MOV BL,5 ; copying 5 value to BL DIV BL ; DIVISION OF BL with ax gives (9*C)/5 MOV AH,0 ; clear unwanted value ADD AL,32 ; add 32 to BL… GIVES (9*C)/5+ 32 LEA SI,RES ; use to load effective address to SI CALL HEX2DEC ; call for procedure LEA DX,MSG2 ; display MSG 2 MOV AH,9 ;print string MSG INT 21H LEA DX,RES ; print the string or message MOV AH,9 INT 21H MOV AH,4CH ; exit to dos or OS INT 21H CODE ENDS ;end of code segment HEX2DEC PROC NEAR ; near procedure is called MOV CX,0 ; clear unwanted value MOV BX,10 ; COPYING 10 to BX LOOP1: MOV DX,0 ; START OF LOOP and removing garbage value from DX DIV BX ;divide BX with AX ADD DL,30H ; conversion to ASCII PUSH DX ; STORE 16 BIT DATA TO DX INC CX ; INCREMENT VALUE OF CX CMP AX,9 ; COMPARE AX WITH 9 JG LOOP1 IF GREATER THEN JUMP TO LOOP 1
  • 8. ADD AL,30H ; CONVERSION TO ASCII MOV[SI],AL ;SAVING CHARACTER IN CHARACTER array LOOP2: POP AX ;get 16 bit data from AX INC SI ;increment the SI MOV [SI],AL ; SAVING CHARACTER TO CHAR ARRAY LOOP LOOP2 ; END OF LOOP RET ; RETURN INSTRUCTION HEX2DEC ENDP ;END OF PROCEDURE END START ; ENDING POINT OF CODE
  • 9. After execution of code output:
  • 10. Summary: This project is based on basic assembly operations division multiplication jumps loops procedures stack etc are used . It act as temperature converter and display temperature in another scale