Question: Write an assembly program that converts every Fahrenheit temperature element in Fahrs array into a Celsius temperature and stores the result at the corresponding element

Write an assembly program that converts every Fahrenheit temperature element in Fahrs array into a Celsius temperature and stores the result at the corresponding element in Cels array. Use this relation: C = (5 / 9) * (F - 32) for conversion. Because temperatures are signed, you will have to use signed multiplication and division instructions in your work.

; export symbols XDEF Entry, _Startup ; export 'Entry' symbol ABSENTRY Entry ; for absolute assembly: mark this as application entry point ROMStart: EQU $4000 Temps_Count: EQU 10 ; variable data goes in RAM ORG $1000 Cels: DS.W 10 ; an array of 10 words! ; code section ORG ROMStart Entry: _Startup: ; for every F in Fahrs ; convert F into C ; store C into the corresponding location in Cels Here: BRA Here ; an array of 10 constant words! Fahrs: dc.w 0,20,40,60,80,100,120,140,160,180 ;************************************************************** ;* Interrupt Vectors * ;************************************************************** ORG $FFFE DC.W Entry ; Reset Vector 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!