Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Convert the following C - like program into assembly language . It is not a true C - language program since which registers to use

ConvertthefollowingC-likeprogramintoassemblylanguage.ItisnotatrueC-languageprogramsincewhichregisterstousehavebeenindicated.
TheC-likecodeisnotefficientinitsdesignandneedstobeimprovedonwhenconverngintoassembly:
Operaonsthatcanbecondensedintofewerassemblylines,e.g.carefulseleconofopcodestocreatemoreefficientcoding
Poorusageofregisters
Poorinteraconwithmemory
Badorganizaon,e.g.dataandorderofexecuon
Thereisonemajorchangeintheprogramandoneormoreminorchanges.Determinethemajorchangeandjusfyyourreasonforthechange.Trytofindsomeoftheminorchangestobemade,andjusfyyourreasonsfortheseaswell(onlylookfor1or2ofthese).
ntmain(void)
{
uint_8Num1=5;
uint_8Num3=9;
uint_8Num2=6;
uint_16Num4;
uint_16Num5=9;
BL=Num1+Num2;
BH=Num2+Num3;
DL=Num2;
DH=0;
DH=10;
DX=3+DX+BX;
Num4=DX;
Num1=BH;
Num2=BL;
return0;
}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Mining Concepts And Techniques

Authors: Jiawei Han, Micheline Kamber, Jian Pei

3rd Edition

0123814790, 9780123814791

More Books

Students also viewed these Databases questions

Question

What a re va lues? (p. 5 2)

Answered: 1 week ago