<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-7736522216829773431</atom:id><lastBuildDate>Sun, 25 Oct 2026 21:11:25 +0000</lastBuildDate><category>assembly language</category><category>Tutorial</category><category>C++ Language</category><category>C Language</category><category>class</category><category>lecture 01</category><category>lecture 02</category><category>lecture 03</category><category>lecture 04</category><category>lecture 05</category><category>lecture 06</category><category>lecture 07</category><category>lecture 08</category><category>switch statement</category><title>C, C++, and Assembly Language Programs &amp;amp; Tutorials</title><description></description><link>http://islandprogrammers.blogspot.com/</link><managingEditor>noreply@blogger.com (Maaz Ali)</managingEditor><generator>Blogger</generator><openSearch:totalResults>11</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7736522216829773431.post-2831742184795732644</guid><pubDate>Thu, 20 Oct 2016 09:01:00 +0000</pubDate><atom:updated>2026-10-25T14:06:50.244-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C++ Language</category><title>Electronic Polling System in C++ Language</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
Problem&lt;/h2&gt;
Implement  (a part of) electronic Pakistani election Scenario where following political  parties are participating in election: PPP, PML and PTI.&amp;nbsp; Create a class &lt;em&gt;PollingStation &lt;/em&gt;where it stores the vote’s count, against each  party, cast by the Pakistani legal registered voters.&amp;nbsp; Your program must query the voter for its ID  card number before he/she cast the vote and check it against voter list.  (Suppose voter list is already with you). If voter is not found in the voter’s  list, your program throws the exception &lt;em&gt;IllegalVoter&lt;/em&gt;()  and discard that voter. The Application again starts working in normal state  and terminates only when user wants to quit it. At the end of the day (or  whenever user wants) it generates report about the vote count against each  party including header that contains date, day and location.&lt;br /&gt;



&lt;h2 style=&quot;text-align: left;&quot;&gt;
Code&lt;/h2&gt;
// Poling station.cpp : Defines the entry point for the console application.&lt;br /&gt;
//&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //HEADER FILES&lt;br /&gt;
#include &quot;stdafx.h&quot; &amp;nbsp; //ESSENTIAL TO WORK ON VISUAL STUDIO&lt;br /&gt;
#include&amp;lt;fstream&amp;gt; &amp;nbsp; &amp;nbsp; //FOR FILE&lt;br /&gt;
#include&amp;lt;conio.h&amp;gt; &amp;nbsp; &amp;nbsp; //FOR GETCH FUNCTION&lt;br /&gt;
#include&amp;lt;string&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;//fOR STRINGS USAGE&lt;br /&gt;
#include&amp;lt;iostream&amp;gt; &amp;nbsp; &amp;nbsp;//FOR COUT AND CIN&lt;br /&gt;
using namespace std; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //CLASS BEGINS&lt;br /&gt;
class PollingStation&lt;br /&gt;
{&lt;br /&gt;
private: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//VARIABLES DECLARED PRIVATLY, ONLY ACCESSABLE IN THIS CLASS&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;int votes_count_ppp;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;int votes_count_pml;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;int votes_count_pti;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;int total_votes,hr,mn,sc,flag,choice,offset;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;string line,day,location;&lt;br /&gt;
&lt;br /&gt;
public: &amp;nbsp; &amp;nbsp;//EXCEPTION CLASS&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;class IllegalVoter&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{ &amp;nbsp; &amp;nbsp; };&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;//CONSTRUCTOR OF POLLING STATION CLASS&lt;br /&gt;
&amp;nbsp; &amp;nbsp; PollingStation(): votes_count_ppp(0), votes_count_pml(0), votes_count_pti(0),total_votes(0),&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;hr(0),mn(0),sc(0),flag(0),line(&quot;&quot;),choice(0)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //DESTRUCTOR OF POLLING STATION CLASS&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;~PollingStation()&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;cout&amp;lt;&amp;lt;&quot;polling Station Destructor&quot;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //GETING THE DATA FROM USER(DAY,DTAE &amp;amp; LOCATION)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;void start()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; { &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//GET DAY&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;system(&quot;cls&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;Enter Day: &quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cin&amp;gt;&amp;gt;day;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //GET LOCATION&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;system(&quot;cls&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;\nEnter Location: &quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cin&amp;gt;&amp;gt;location;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//GET TIME&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;system(&quot;cls&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;\nEnter time: &quot;&amp;lt;&amp;lt;endl;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;Enter Hour: &quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cin&amp;gt;&amp;gt;hr;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;Enter Minutes: &quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cin&amp;gt;&amp;gt;mn;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //CHECKING WHETHER THE PERSON IS ILLEGIBEL FOR VOTE&lt;br /&gt;
&amp;nbsp; &amp;nbsp; void checkdata(string search)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ifstream Myfile; &amp;nbsp; &amp;nbsp;//OPENING THE FILE FOR READING&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Myfile.open (&quot;VOTERS_LIST.txt&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(Myfile.is_open())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //READING UNTIL END OF FILE&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;while(!Myfile.eof())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;getline(Myfile,line); &amp;nbsp; &amp;nbsp; &amp;nbsp; //CHECKIMG&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if ((offset = line.find(search)) != string::npos)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; flag = 1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Myfile.close();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} &amp;nbsp; //IF FILE IS NOT OPENED&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;Unable to open this file.&quot;&amp;lt;&amp;lt;endl;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(flag == 0) &amp;nbsp; &amp;nbsp; //THROWING EXCEPTION&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;throw IllegalVoter();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //PERSON WILL CAST HIS/HER VOTE&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;void cast_vote()&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;system(&quot;cls&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;CAST YOUR VOTE:&quot;&amp;lt;&amp;lt;endl;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;1. PPP&quot;&amp;lt;&amp;lt;endl;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;2. PML&quot;&amp;lt;&amp;lt;endl;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;3. PTI&quot;&amp;lt;&amp;lt;endl;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;\nEnter Your Choice: &quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cin&amp;gt;&amp;gt;choice;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//IF USER HAS VOTED FOR PPP&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(choice == 1)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; votes_count_ppp++;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; total_votes++;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //IF USER HAS VOTED FOR PML&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else if(choice == 2)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; votes_count_pml++;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; total_votes++;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //IF USER HAS VOTED FOR PTI&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else if (choice == 3)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; votes_count_pti++;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; total_votes++;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//IF USER HAS ENTERED WRONG CHOICE&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;system(&quot;cls&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;Invalid Key.&quot;&amp;lt;&amp;lt;endl;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;Press Any Key To Continue.&quot;&amp;lt;&amp;lt;endl;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;getch();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;//DISPLYING RESULTS&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;void display()&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;system(&quot;cls&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;\n\n********************************************************************************&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;Time = &quot;&amp;lt;&amp;lt;hr&amp;lt;&amp;lt;&quot; : &quot;&amp;lt;&amp;lt;mn&amp;lt;&amp;lt;&quot;\t\t\tDay = &quot;&amp;lt;&amp;lt;day&amp;lt;&amp;lt;&quot;\t\tLocation = &quot;&amp;lt;&amp;lt;location&amp;lt;&amp;lt;endl;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;\n********************************************************************************&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;Total number of votes voted for:&quot;&amp;lt;&amp;lt;endl&amp;lt;&amp;lt;endl;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;\tPPP = &quot;&amp;lt;&amp;lt;votes_count_ppp&amp;lt;&amp;lt;endl;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;\tPML = &quot;&amp;lt;&amp;lt;votes_count_pml&amp;lt;&amp;lt;endl;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;\tPTI = &quot;&amp;lt;&amp;lt;votes_count_pti&amp;lt;&amp;lt;endl&amp;lt;&amp;lt;endl;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;\tTotal = &quot;&amp;lt;&amp;lt;total_votes&amp;lt;&amp;lt;endl;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;PollingStation p; &amp;nbsp; //OBJECT OF POLLING STATION CLASS&lt;br /&gt;
&amp;nbsp; &amp;nbsp; char another; &amp;nbsp; &amp;nbsp; &amp;nbsp; //VARIABLES&lt;br /&gt;
&amp;nbsp; &amp;nbsp; string id; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; p.start(); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//CALLING THE FUNTION TO GET DATA&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; do{ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //LOOP UNTIL USER WANTS&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; system(&quot;cls&quot;); &amp;nbsp; //USER WILL ENTER HIS/HER ID CARD NUMBER&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Enter ID Card Number: &quot;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;cin&amp;gt;&amp;gt;id;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;p.checkdata(id); &amp;nbsp; &amp;nbsp; //CHECKING&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;p.cast_vote(); &amp;nbsp; &amp;nbsp; &amp;nbsp; //CASTING VOTE(IF ILLEGIBLE)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; catch(PollingStation::IllegalVoter) &amp;nbsp;//IF NOT ILLEGIBLE THEN&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;NO ENTRY WITH THIS ID&quot;&amp;lt;&amp;lt;endl;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Press any key to continue...&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; getch();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; system(&quot;cls&quot;); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //ASKING USER WHETHER HE/SHE WANTS TO ENTER DATA&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Enter another phone number(y/n)? &quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; another = getch();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }while(another == &#39;Y&#39; || another == &#39;y&#39;); //LOOP TERMINATION CONDITION&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ofstream file; &amp;nbsp; //OPENING FILE FOR WRITTING&lt;br /&gt;
&amp;nbsp; &amp;nbsp; file.open(&quot;POLLING_RESULTS.DAT&quot;, ios::binary);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; p.display(); &amp;nbsp; &amp;nbsp; //DISPLYING THE DATA &amp;amp; WRITTING TO THE FILE&lt;br /&gt;
&amp;nbsp; &amp;nbsp; file.write(reinterpret_cast&amp;lt;char*&amp;gt;(&amp;amp;p),sizeof(p)); &amp;nbsp;//SO THAT IT COULD BE DSPLAYED ANYTIME&lt;br /&gt;
&amp;nbsp; &amp;nbsp; file.close(); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //USER WANTS &amp;amp; THEN CLOSING THE FILE&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;\nFile Written&quot;&amp;lt;&amp;lt;endl;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Press any key to exit&quot;&amp;lt;&amp;lt;endl;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;getch();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;return 0;&lt;br /&gt;
}&lt;br /&gt;



&lt;h2 style=&quot;text-align: left;&quot;&gt;
Output&lt;/h2&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOU7ZQh_RRZM1-j38IixiTNA5_plzRhh1sLPWRruN-W2_bNGMsL4cDeRg7RIN0ysLdA3edOpPGeVhvc-DOwqnZTTsLc0RpOaupgsNJzDjKoUkmCjXaWnqSiSIYiWt6zUzV9VKjJ5cVpuU/s1600/electronic+polling+system.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;electronic polling system in c++ language&quot; border=&quot;0&quot; height=&quot;428&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOU7ZQh_RRZM1-j38IixiTNA5_plzRhh1sLPWRruN-W2_bNGMsL4cDeRg7RIN0ysLdA3edOpPGeVhvc-DOwqnZTTsLc0RpOaupgsNJzDjKoUkmCjXaWnqSiSIYiWt6zUzV9VKjJ5cVpuU/s640/electronic+polling+system.png&quot; title=&quot;Electronic Polling System in C++ Language&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://islandprogrammers.blogspot.com/2016/10/electronic-polling-system-in-c-language.html</link><author>noreply@blogger.com (Maaz Ali)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOU7ZQh_RRZM1-j38IixiTNA5_plzRhh1sLPWRruN-W2_bNGMsL4cDeRg7RIN0ysLdA3edOpPGeVhvc-DOwqnZTTsLc0RpOaupgsNJzDjKoUkmCjXaWnqSiSIYiWt6zUzV9VKjJ5cVpuU/s72-c/electronic+polling+system.png" height="72" width="72"/><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7736522216829773431.post-6838421530953077883</guid><pubDate>Fri, 14 Oct 2016 06:07:00 +0000</pubDate><atom:updated>2026-10-25T14:07:10.063-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C++ Language</category><category domain="http://www.blogger.com/atom/ns#">class</category><category domain="http://www.blogger.com/atom/ns#">switch statement</category><title>CD player simulator using c++</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2&gt;
Problem&lt;/h2&gt;
Design a  simple CD player simulator. The CD player has the following buttons:  &quot;POWER&quot;, &quot;EJECT&quot;, &quot;PLAY&quot; and &quot;STOP&quot;,  and a tray where a CD is loaded. User can load a CD only if the tray is open.  The tray can be opened only if the power is turned on (regard it as something  like a motor-driven tray installed on a PC). If the power is turned off with  the tray open, the tray will keep open and the power is turned off. &lt;br /&gt;
Implement the following actions of the CD player as methods of class CDPlayer. &lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;pushPower() -- simulates pushing       POWER(on/off) button. &lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;if the power is turned off,        turn on the power, and display &quot;Power turned on.&quot; &lt;/li&gt;
&lt;li&gt;if the power is turned on, &lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;if playing, stop it. &lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;/ul&gt;
turn off the  power, and display &quot;Power turned off.&quot; &lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;pushEject() -- simulates pushing EJECT(tray       open/close) button &lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;if the power is not turned on,        display &quot;Power not turned on.&quot; &lt;/li&gt;
&lt;li&gt;if the power is turned on, &lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;if the tray is not open, open         the tray and display &quot;Tray opened.&quot; &lt;/li&gt;
&lt;li&gt;if the tray is open, close         the tray and display &quot;Tray closed.&quot; &lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;li&gt;pushPlay() -- simulates pushing PLAY       button &lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;if the power is turned on, &lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;if the media is loaded and         tray is closed, begin to play and display &quot;Now playing...&quot; &lt;/li&gt;
&lt;li&gt;otherwise, display &quot;No         CD loaded or tray is open.&quot; &lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;li&gt;pushStop() -- simulates pushing STOP       button &lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;if the power is turned on, &lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;if it&#39;s playing, stop playing         and display &quot;Playing stopped.&quot; &lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;li&gt;loadUnloadMedia() -- simulates loading/unloading       media to/from the tray (tray must be open when loading/unloading) &lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;if the tray is open, &lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;if the media is loaded, unload         the media and display &quot;Media unloaded.&quot; &lt;/li&gt;
&lt;li&gt;if the media is not loaded,         load the media and display &quot;Media loaded.&quot; &lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;if the tray is not open, &lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;display &quot;Tray is not open.&quot;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;/ul&gt;


&lt;h2&gt;
Code&lt;/h2&gt;
&lt;div&gt;
&lt;div&gt;
#include&amp;lt;iostream&amp;gt;&lt;/div&gt;
&lt;div&gt;
#include&amp;lt;conio.h&amp;gt;&lt;/div&gt;
&lt;div&gt;
using namespace std;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
class CDplayer&lt;/div&gt;
&lt;div&gt;
{&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; private:&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int power;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int eject;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int tray;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int media;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int play;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; public:&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; CDplayer():power(0),eject(0),tray(0),media(0),play(0)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; void pushPower()&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;\n\nNOTE: Press one(1) to turn on and zero(0) to turn off.&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;\nWant to turn on the power? &quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cin&amp;gt;&amp;gt;power;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(power == 1)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Power is ON.&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else if (power == 0)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Power is OFF.&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;Invalid key&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;\n\nPress any key to continue.&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;getch();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; void pushEject()&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(power == 1)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(tray == 0)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;tray = 1;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;Tray opened.&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else if(tray == 1)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;tray = 0;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;Tray closed.&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else if(power == 0)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Power not turned on.&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;\n\nPress any key to continue.&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;getch();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; void pushPlay()&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(power == 1)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(media == 1 &amp;amp;&amp;amp; tray == 0)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; play = 1;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Now playing...&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;No CD loaded or tray is open.&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else if(power == 0)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Power not turned on.&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;\n\nPress any key to continue.&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;getch();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; void pushStop()&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(power == 1)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(play == 1)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; play = 0;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Playing stopped.&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;\n\nPress any key to continue.&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;getch();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; void loadUnloadMedia()&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(tray == 1)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(media == 1)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; media = 0;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Media unloaded.&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else if(media == 0)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; media = 1;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Media loaded.&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else if(tray == 0)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;Tray is not open.&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;&quot;\n\nPress any key to continue.&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;getch();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
};&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
int main()&lt;/div&gt;
&lt;div&gt;
{&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; CDplayer c1;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; int s;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; while(1)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; system (&quot;cls&quot;);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;\n\nPlease, Press one of the following buttons: &quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;\n1. POWER(on/off)&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;\n2. EJECT(tray open/close)&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;\n3. PLAY&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;\n4. STOP&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;\n5. Load/Unload media to/from the tray(tray will be opened)&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;\n6. Close CDplayer&quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cout&amp;lt;&amp;lt;&quot;\n\nEnter your choice: &quot;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cin&amp;gt;&amp;gt;s;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; switch(s)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case 1:&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; system (&quot;cls&quot;);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; c1.pushPower();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case 2:&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; system (&quot;cls&quot;);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; c1.pushEject();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case 3:&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; system (&quot;cls&quot;);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; c1.pushPlay();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case 4:&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; system (&quot;cls&quot;);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; c1.pushStop();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case 5:&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; system (&quot;cls&quot;);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; c1.loadUnloadMedia();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case 6:&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; exit(0);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; getch();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; return 0;&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;/div&gt;


&lt;h2&gt;
Output&lt;/h2&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7c-yJE8YEtl5tr1z_dZfzn-_gsvguz7LGAIB6W93OYj6gbCUhMVLvFa-w0tJcO_2VKK0tY1vCAxGlLxLDRv2DFPoOyEfCC77i0svk4mYVRAm_I57j4SwCJ5Hqcp1p-7_lfnl8djTUFQw/s1600/CD+player+simulator.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;CD player simulator using c++&quot; border=&quot;0&quot; height=&quot;428&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7c-yJE8YEtl5tr1z_dZfzn-_gsvguz7LGAIB6W93OYj6gbCUhMVLvFa-w0tJcO_2VKK0tY1vCAxGlLxLDRv2DFPoOyEfCC77i0svk4mYVRAm_I57j4SwCJ5Hqcp1p-7_lfnl8djTUFQw/s640/CD+player+simulator.png&quot; title=&quot;CD player simulator using c++&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;CD player simulator using c++&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://islandprogrammers.blogspot.com/2016/10/cd-player-simulator-using-c.html</link><author>noreply@blogger.com (Maaz Ali)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7c-yJE8YEtl5tr1z_dZfzn-_gsvguz7LGAIB6W93OYj6gbCUhMVLvFa-w0tJcO_2VKK0tY1vCAxGlLxLDRv2DFPoOyEfCC77i0svk4mYVRAm_I57j4SwCJ5Hqcp1p-7_lfnl8djTUFQw/s72-c/CD+player+simulator.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7736522216829773431.post-1983285091482905128</guid><pubDate>Wed, 05 Oct 2016 09:46:00 +0000</pubDate><atom:updated>2026-10-25T14:07:35.057-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">assembly language</category><category domain="http://www.blogger.com/atom/ns#">C Language</category><title>Write a simulator for the assembly language ISA design in C language.</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;

  

 

&lt;h2&gt;
Code&lt;o:p&gt;&lt;/o:p&gt;&lt;/h2&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;#include&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;stdafx.h&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;#include&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;#include&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;lt;conio.h&amp;gt;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;#include&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;lt;stdlib.h&amp;gt;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;//initializing the memory and registers&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; initialization(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; a[]){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; i=0;i&amp;lt;16;i++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a[i]
= (i+1)*10;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;//number of instructions&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; input_instructions(){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; x;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;Enter the number of instructions
you want to perform: &quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; scanf_s
(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;%d&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;,&amp;amp;x);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; x;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;//loading the register from memory&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; load(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; row, &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; inst[][3]){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inst[row][0]
= 1;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;Enter the number of register
ranging from 1 to 16: &quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; scanf_s(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;%d&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;,&amp;amp;inst[row][1]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;Enter the number of memory from
which you want to load ranging from 1 to 16: &quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; scanf_s(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;%d&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;,&amp;amp;inst[row][2]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;//adding the two registers&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; add(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; row,&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; inst[][3]){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inst[row][0]
= 5;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;Enter the destination register
number: &quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; scanf_s(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;%d&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;,&amp;amp;inst[row][1]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;Enter the source register number:
&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; scanf_s(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;%d&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;,&amp;amp;inst[row][2]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;//storing the value to the memory&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; store(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; row,&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; inst[][3]){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inst[row][0]
= 3;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;Enter the register number: &quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; scanf_s(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;%d&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;,&amp;amp;inst[row][1]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;Enter the memory number: &quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; scanf_s(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;%d&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;,&amp;amp;inst[row][2]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;//display the instruction memory&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; display_pattern(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; no_of_ins,&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; inst[][3]){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; system(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\********************************************************************************&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\n******************************
Instruction Memory ******************************&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\n********************************************************************************&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; i=0;i&amp;lt;no_of_ins;i++){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\n\t\t\t\t%d\t%d\t%d\n&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;,inst[i][0],inst[i][1],inst[i][2]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\n\n&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; i=0;i&amp;lt;no_of_ins;i++){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;(inst[i][0] == 1){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\t\t\t\tLoadR\tR%d\tM%d\n\n&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;,inst[i][1],inst[i][2]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;(inst[i][0] == 3){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\t\t\t\tStoreR\tR%d\tM%d\n\n&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;,inst[i][1],inst[i][2]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;(inst[i][0] == 5){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\t\t\t\tAddR\tR%d\tR%d\n\n&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;,inst[i][1],inst[i][2]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\n\n\n\nPress any key to
continue...&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _getch();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;//display registers and memorys&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; display_reg_mem(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; reg[],&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; mem[]){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\n\nRegister: &quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; j=0;j&amp;lt;16;j++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;%d&amp;nbsp;&amp;nbsp;
&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;,reg[j]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\n-----------------------------------------------------------------------------&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\nMemory: &quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; j=0;j&amp;lt;16;j++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;%d&amp;nbsp;
&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;,mem[j]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;//ISA simulator&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; display_cycles(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; no_of_inst,&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; inst[][3],&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; reg[],&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; mem[]){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; i=0;i&amp;lt;no_of_inst;i++){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; system(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;********************************************************************************&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\n******************************
ISA Simulator ***********************************&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\n********************************************************************************&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\n\n\n\n\n*******************************
Instruction # %d ********************************&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;,(i+1));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\n\n\n\n\nFetch Instruction:\t
%d\t%d\t%d\n&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;,inst[i][0],inst[i][1],inst[i][2]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; display_reg_mem(reg,mem);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;(inst[i][0] == 1){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\n\n\n\n\nDecode Instruction:\t
LoadR\tRegister%d\tMemory%d\n&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;,inst[i][1],inst[i][2]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; display_reg_mem(reg,mem);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\n\n\n\n\nExecute Instruction:\t
Register updated Succesfully\n&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; reg[(inst[i][1]-1)]
= mem[(inst[i][2]-1)];&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; display_reg_mem(reg,mem);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;(inst[i][0] == 5){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\n\n\n\n\nDecode Instruction:\t
AddR\tRegister%d\tRegister%d\n&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;,inst[i][1],inst[i][2]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; display_reg_mem(reg,mem);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\n\n\n\n\nExecute Instruction:\t
Register updated Succesfully\n&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; reg[(inst[i][1]-1)]
= reg[(inst[i][1]-1)] + reg[(inst[i][2]-1)];&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; display_reg_mem(reg,mem);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;(inst[i][0] == 3){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\n\n\n\n\nDecode Instruction:\t
StoreR\tRegister%d\tMemory%d\n&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;,inst[i][1],inst[i][2]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; display_reg_mem(reg,mem);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\n\n\n\n\nExecute Instruction:\t
Memory updated Succesfully\n&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mem[(inst[i][2]-1)]
= reg[(inst[i][1]-1)];&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; display_reg_mem(reg,mem);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\n\n\n\nPress any key to
continue...&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _getch();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; main(){&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; system(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;color 3f&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; choice,count=0,row=0,lines;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; registers[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; memorys[16];&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; initialization(memorys);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lines
= input_instructions();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; instructions[100][3];&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; i=0;i&amp;lt;lines;i++){&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; system(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;Select one of the following
instruction type from the following:\n&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\t1. Load&amp;nbsp; \n&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\t2. Add&amp;nbsp;&amp;nbsp; \n&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\t3. Store \n&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\t4. Exit&amp;nbsp; \n\n&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;Enter your choice: &quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; choice
= _getche();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;switch&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; (choice)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;case&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&#39;1&#39;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;//load&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; system(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; load(row,instructions);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row++;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;break&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;case&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&#39;2&#39;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;//add&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; system(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; add(row,instructions);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row++;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;break&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;case&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&#39;3&#39;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;//store&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; system(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; store(row,instructions);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row++;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;break&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;case&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&#39;4&#39;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;//exit&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit(0);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;default&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; system(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;\n\nInvalid input! Press any key to
continue.&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;break&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; system(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; display_pattern(lines,instructions);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; system(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; display_cycles(lines,instructions,registers,memorys);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit(0);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt;&quot;&gt; 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 200%; margin-left: .25in;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 9.5pt; line-height: 200%;&quot;&gt;}&lt;/span&gt;&lt;u&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 200%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/div&gt;
&lt;u&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;&lt;br clear=&quot;all&quot; style=&quot;mso-special-character: line-break; page-break-before: always;&quot; /&gt;
&lt;/span&gt;&lt;/u&gt;

&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;



&lt;h2&gt;
Program Output - Screen Shots&lt;span style=&quot;font-size: 12.0pt; line-height: 107%; mso-bidi-font-size: 13.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 200%;&quot;&gt;
&lt;!--[if gte vml 1]&gt;&lt;v:shapetype
 id=&quot;_x0000_t75&quot; coordsize=&quot;21600,21600&quot; o:spt=&quot;75&quot; o:preferrelative=&quot;t&quot;
 path=&quot;m@4@5l@4@11@9@11@9@5xe&quot; filled=&quot;f&quot; stroked=&quot;f&quot;&gt;
 &lt;v:stroke joinstyle=&quot;miter&quot;/&gt;
 &lt;v:formulas&gt;
  &lt;v:f eqn=&quot;if lineDrawn pixelLineWidth 0&quot;/&gt;
  &lt;v:f eqn=&quot;sum @0 1 0&quot;/&gt;
  &lt;v:f eqn=&quot;sum 0 0 @1&quot;/&gt;
  &lt;v:f eqn=&quot;prod @2 1 2&quot;/&gt;
  &lt;v:f eqn=&quot;prod @3 21600 pixelWidth&quot;/&gt;
  &lt;v:f eqn=&quot;prod @3 21600 pixelHeight&quot;/&gt;
  &lt;v:f eqn=&quot;sum @0 0 1&quot;/&gt;
  &lt;v:f eqn=&quot;prod @6 1 2&quot;/&gt;
  &lt;v:f eqn=&quot;prod @7 21600 pixelWidth&quot;/&gt;
  &lt;v:f eqn=&quot;sum @8 21600 0&quot;/&gt;
  &lt;v:f eqn=&quot;prod @7 21600 pixelHeight&quot;/&gt;
  &lt;v:f eqn=&quot;sum @10 21600 0&quot;/&gt;
 &lt;/v:formulas&gt;
 &lt;v:path o:extrusionok=&quot;f&quot; gradientshapeok=&quot;t&quot; o:connecttype=&quot;rect&quot;/&gt;
 &lt;o:lock v:ext=&quot;edit&quot; aspectratio=&quot;t&quot;/&gt;
&lt;/v:shapetype&gt;&lt;v:shape id=&quot;Picture_x0020_7&quot; o:spid=&quot;_x0000_i1038&quot; type=&quot;#_x0000_t75&quot;
 style=&#39;width:6in;height:219pt;visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:\Users\PARAGO~1\AppData\Local\Temp\msohtmlclip1\01\clip_image001.png&quot;
  o:title=&quot;&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 200%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: 200%; tab-stops: 63.0pt center 3.0in; text-align: center;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjq49UE1i4_D7BvbR3CEhkrwYV3ZpdeY_JS0epFzZqZbGR1qP7hn7__xxLE67UYTY357O5iXGJnBSNyHz5yIjyguC9IcGxNtx2y8DbqN75Hz5DINmTtRTiQPigZsDEnsgFl9AyaDa6FHmM/s1600/s1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;324&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjq49UE1i4_D7BvbR3CEhkrwYV3ZpdeY_JS0epFzZqZbGR1qP7hn7__xxLE67UYTY357O5iXGJnBSNyHz5yIjyguC9IcGxNtx2y8DbqN75Hz5DINmTtRTiQPigZsDEnsgFl9AyaDa6FHmM/s640/s1.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;u&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;Screen 01&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;In
the above screen 01 user must enter the instructions to run the program. For
example we want to run our code for 4 instructions, so we will write 4 and hit
enter.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;The following screen will
be displayed. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;!--[if gte vml 1]&gt;&lt;v:shape
 id=&quot;Picture_x0020_8&quot; o:spid=&quot;_x0000_i1037&quot; type=&quot;#_x0000_t75&quot; style=&#39;width:6in;
 height:219pt;visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:\Users\PARAGO~1\AppData\Local\Temp\msohtmlclip1\01\clip_image003.png&quot;
  o:title=&quot;&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWye6gG2ZjT9YvrGX8jSjNBKD0L2TFsNDr6k_aANzYgHVDM9gHVQpUmkS10MPV6ixngrFkHJQIweuHn2Pxup8ZV_nrXW1UBXEuByuyP0ax1dRUIhoeUmeBPpAtG2i5YMCPd0bxCoT0G_E/s1600/s2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;324&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWye6gG2ZjT9YvrGX8jSjNBKD0L2TFsNDr6k_aANzYgHVDM9gHVQpUmkS10MPV6ixngrFkHJQIweuHn2Pxup8ZV_nrXW1UBXEuByuyP0ax1dRUIhoeUmeBPpAtG2i5YMCPd0bxCoT0G_E/s640/s2.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;Screen
02&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;There
are 4 options 1&lt;sup&gt;st&lt;/sup&gt; option is used to load the register from memory, 2&lt;sup&gt;nd&lt;/sup&gt;
option add the two registers, 3&lt;sup&gt;rd&lt;/sup&gt; option stores the value from
register to the memory, and the 4&lt;sup&gt;th&lt;/sup&gt; option is used to quit the
program. For example, we press 1 and hit enter.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;The following screen will
be displayed.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;!--[if gte vml 1]&gt;&lt;v:shape
 id=&quot;Picture_x0020_9&quot; o:spid=&quot;_x0000_i1036&quot; type=&quot;#_x0000_t75&quot; style=&#39;width:6in;
 height:219pt;visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:\Users\PARAGO~1\AppData\Local\Temp\msohtmlclip1\01\clip_image005.png&quot;
  o:title=&quot;&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi71KeDGd__AZyYZQtno5nfuMm0CUCv-_xOGCJ7RG0CmS-HhHzvWDxCLRkPYaH45S1o17QQ_BN-gwOXX6tBtyyQHCLv3N6hzWNZeC7LbglTiqh8epn6tR4puMFPIdwTZmwAkp6ZoSns33c/s1600/s3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;324&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi71KeDGd__AZyYZQtno5nfuMm0CUCv-_xOGCJ7RG0CmS-HhHzvWDxCLRkPYaH45S1o17QQ_BN-gwOXX6tBtyyQHCLv3N6hzWNZeC7LbglTiqh8epn6tR4puMFPIdwTZmwAkp6ZoSns33c/s640/s3.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;Screen
03&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;User
will be asked to enter the register number and the memory number. We will enter
2 for register and 7 for memory.&lt;/span&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;!--[if gte vml 1]&gt;&lt;v:shape
 id=&quot;Picture_x0020_10&quot; o:spid=&quot;_x0000_i1035&quot; type=&quot;#_x0000_t75&quot; style=&#39;width:6in;
 height:219pt;visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:\Users\PARAGO~1\AppData\Local\Temp\msohtmlclip1\01\clip_image003.png&quot;
  o:title=&quot;&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmvLRhXyqpeccUf6ClBeH7PzL7f1gNFX2JjO4B24Xe0fX9oN5ubSLceB47KZD-LrjiHGz935xgRDe_ZQRc9SvKw8y5XAjln4CVdF5SeRaej_OnTCnhqylNn2uWVO98yA3xV0kemkr9fTs/s1600/s4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;324&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmvLRhXyqpeccUf6ClBeH7PzL7f1gNFX2JjO4B24Xe0fX9oN5ubSLceB47KZD-LrjiHGz935xgRDe_ZQRc9SvKw8y5XAjln4CVdF5SeRaej_OnTCnhqylNn2uWVO98yA3xV0kemkr9fTs/s640/s4.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;Screen
04&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;Same procedure will be
followed again i.e. steps for screen 02.&lt;/span&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;!--[if gte vml 1]&gt;&lt;v:shape
 id=&quot;Picture_x0020_11&quot; o:spid=&quot;_x0000_i1034&quot; type=&quot;#_x0000_t75&quot; style=&#39;width:6in;
 height:219pt;visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:\Users\PARAGO~1\AppData\Local\Temp\msohtmlclip1\01\clip_image008.png&quot;
  o:title=&quot;&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoLbxtTqvIirfODvcHzd4mJTDIUdkCTL0WV6uHp9UWk9ST5P9noQKHZgrd2G9CAUMlPQVqZyXYvy6d3_wmVPNkwAvKZ_yzviMXYxGnVhp-m5FS6UTLKA10foYkNQGzuChPIg913lTWhvQ/s1600/s5.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;324&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoLbxtTqvIirfODvcHzd4mJTDIUdkCTL0WV6uHp9UWk9ST5P9noQKHZgrd2G9CAUMlPQVqZyXYvy6d3_wmVPNkwAvKZ_yzviMXYxGnVhp-m5FS6UTLKA10foYkNQGzuChPIg913lTWhvQ/s640/s5.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;Screen
05&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;This time we will enter 3
for register and 6 for the memory.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;After
you have entered the value in the memory hit enter… the program will show you
the following screen.&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLZEIszW__6YI0NJX84G38QUD7oJ8XExi8OmKyGfEZF7CSvYW5x3mYUubaR-KOQuYLID-f1UDTyK-gTTbnDFi5UCmiHNm99wYSNSrkVBNrVux7ULCUJiPc5THhF_zkjJm4pfw_02DJSrc/s1600/s6.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;324&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLZEIszW__6YI0NJX84G38QUD7oJ8XExi8OmKyGfEZF7CSvYW5x3mYUubaR-KOQuYLID-f1UDTyK-gTTbnDFi5UCmiHNm99wYSNSrkVBNrVux7ULCUJiPc5THhF_zkjJm4pfw_02DJSrc/s640/s6.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;Screen
06&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;This time press 2 and hit
enter.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwzT3akXGamEAcI4iBDfO5RAWR_s3cvmcbItoihNK3dBvW6yhFd_zGkzGPKJrd3pnxny59nq8DYFi1SyvtP4TJDkc2Tglzr28smLDgPoPA9onZKsnD8zoHCXzkBOVgKjfpgePPOB0heHw/s1600/s7.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;324&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwzT3akXGamEAcI4iBDfO5RAWR_s3cvmcbItoihNK3dBvW6yhFd_zGkzGPKJrd3pnxny59nq8DYFi1SyvtP4TJDkc2Tglzr28smLDgPoPA9onZKsnD8zoHCXzkBOVgKjfpgePPOB0heHw/s640/s7.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot;, serif;&quot;&gt;Screen
07&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;It
will ask you to enter two register numbers one by one. The 1&lt;sup&gt;st&lt;/sup&gt;
register is the destination and the 2&lt;sup&gt;nd&lt;/sup&gt; register is the source i.e.
after the value is entered, the value of the destination will be overwritten with
the sum of the two registers in the &lt;a href=&quot;http://islandprogrammers.blogspot.com/2016/09/load-add-and-store-instructions-in.html&quot;&gt;add
instruction&lt;/a&gt;. Here we have entered 2 and 3 register numbers where 2&lt;sup&gt;nd&lt;/sup&gt;
register will be overwritten after the execution with the sum of the register
no 2 and 3.&lt;/span&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;!--[if gte vml 1]&gt;&lt;v:shape
 id=&quot;Picture_x0020_14&quot; o:spid=&quot;_x0000_i1031&quot; type=&quot;#_x0000_t75&quot; style=&#39;width:6in;
 height:219pt;visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:\Users\PARAGO~1\AppData\Local\Temp\msohtmlclip1\01\clip_image014.png&quot;
  o:title=&quot;&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicWXubOi-mQuEPYq_Er29AVll2aV4DOOQH6E_b2rAfcVmLN45xyOQMIEg7BKa17svABUJoFIdsr3b1OnkhUXytwJD1wMRzF9ms_HypPjo_tj2W_yQHnFtJeOW3x-zrSG8hyphenhyphen32A8hEqKS8/s1600/s8.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;324&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicWXubOi-mQuEPYq_Er29AVll2aV4DOOQH6E_b2rAfcVmLN45xyOQMIEg7BKa17svABUJoFIdsr3b1OnkhUXytwJD1wMRzF9ms_HypPjo_tj2W_yQHnFtJeOW3x-zrSG8hyphenhyphen32A8hEqKS8/s640/s8.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot;, serif;&quot;&gt;Screen
08&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;After you enter the
register number, the above screen will be displayed again, press 3 this time
and hit enter.&lt;/span&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;!--[if gte vml 1]&gt;&lt;v:shape
 id=&quot;Picture_x0020_15&quot; o:spid=&quot;_x0000_i1030&quot; type=&quot;#_x0000_t75&quot; style=&#39;width:6in;
 height:219pt;visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:\Users\PARAGO~1\AppData\Local\Temp\msohtmlclip1\01\clip_image016.png&quot;
  o:title=&quot;&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidRPzAsA_WIOrqsc_yPu3hCIK4SUTeUzar2t35UFnM5LsP8WJ1RYglXIVgWnk2fmBahIbyNqoV4C0NFbFwzcfzHO3RlAnpfIx6gKbKK0GEC5VKfGOXelNhgEsGjGj8RUQWK3w9QaJuZvI/s1600/s9.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;324&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidRPzAsA_WIOrqsc_yPu3hCIK4SUTeUzar2t35UFnM5LsP8WJ1RYglXIVgWnk2fmBahIbyNqoV4C0NFbFwzcfzHO3RlAnpfIx6gKbKK0GEC5VKfGOXelNhgEsGjGj8RUQWK3w9QaJuZvI/s640/s9.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot;, serif;&quot;&gt;Screen
09&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;The above screen will be
shown asking the user to enter the register number from which he/she wants to
store data and then the program will ask for the memory number. For instance,
we enter 2 for register and 6 for memory and press enter.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;!--[endif]--&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5MuofA8ZPFtKvnOABUc2PilRZu6c3cY7BCLLZy9YpPuJMoryKRtt9fjuKfJUkGtRUsYvgAnngTrhjrSgaeEx4nYelynnVqWC9bakS7-XiZ_Mm9ghsN3h7RCoCtJmCklVQRZGJ5gPlFv8/s1600/s10.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;368&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5MuofA8ZPFtKvnOABUc2PilRZu6c3cY7BCLLZy9YpPuJMoryKRtt9fjuKfJUkGtRUsYvgAnngTrhjrSgaeEx4nYelynnVqWC9bakS7-XiZ_Mm9ghsN3h7RCoCtJmCklVQRZGJ5gPlFv8/s640/s10.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;Screen
10&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;As, we have entered 4
instructions (2 load, 1 add and 1 store). The above screen will be displayed
asking the user to press any key to continue if he/she have viewed the
instructions. After we hit enter the following screen will be displayed.&lt;/span&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;!--[if gte vml 1]&gt;&lt;v:shape
 id=&quot;Picture_x0020_17&quot; o:spid=&quot;_x0000_i1028&quot; type=&quot;#_x0000_t75&quot; style=&#39;width:6in;
 height:387.75pt;visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:\Users\PARAGO~1\AppData\Local\Temp\msohtmlclip1\01\clip_image020.png&quot;
  o:title=&quot;&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxuVgaPnJd-13QApzbS9unGNFoTVwd5IxMXhqSNR5uQB7Ws8Uq2KRe6YmnSnixHRqzZmCqXecMWztPNIw4w8JLJAy-tXVhQNQHyNwaq9jADnTdDWP1UlaGhECWDGpol3R0g2tRovGrZFg/s1600/s11.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;572&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxuVgaPnJd-13QApzbS9unGNFoTVwd5IxMXhqSNR5uQB7Ws8Uq2KRe6YmnSnixHRqzZmCqXecMWztPNIw4w8JLJAy-tXVhQNQHyNwaq9jADnTdDWP1UlaGhECWDGpol3R0g2tRovGrZFg/s640/s11.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot;, serif;&quot;&gt;Screen
11&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;The
program will show the user ISA simulator with the 1&lt;sup&gt;st&lt;/sup&gt; instruction.
As, the 1&lt;sup&gt;st&lt;/sup&gt; instruction was to load the register from the memory
i.e. 1 2 7. After the execution the register’s value will be updated and as we
can see in our example it has updated the 2&lt;sup&gt;nd&lt;/sup&gt; register with the
value 70 taken from the memory’s 7&lt;sup&gt;th&lt;/sup&gt; location.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;Let’s
have a closer look at the above screen 11, we can see there are three steps
involved are involved for each cycle (instruction).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h2&gt;
1&lt;sup&gt;st&lt;/sup&gt; step - the fetch instruction&lt;o:p&gt;&lt;/o:p&gt;&lt;/h2&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;It
fetches the instruction from the memory and loads it into the processor.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h2&gt;
2&lt;sup&gt;nd&lt;/sup&gt; step - the decode instruction&lt;o:p&gt;&lt;/o:p&gt;&lt;/h2&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;After
the 1&lt;sup&gt;st&lt;/sup&gt; step the 2&lt;sup&gt;nd&lt;/sup&gt; step takes place: It decodes the
instruction after it has been fetched, so that the computer can perform its
specific operation.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h2&gt;
3&lt;sup&gt;rd&lt;/sup&gt; step - execute instruction&lt;o:p&gt;&lt;/o:p&gt;&lt;/h2&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;It
executes the instruction and updates the values according to the instruction,
for instance in this instruction it will update the value of the 2&lt;sup&gt;nd&lt;/sup&gt;
register.&lt;/span&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;!--[if gte vml 1]&gt;&lt;v:shape
 id=&quot;Picture_x0020_18&quot; o:spid=&quot;_x0000_i1027&quot; type=&quot;#_x0000_t75&quot; style=&#39;width:6in;
 height:387.75pt;visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:\Users\PARAGO~1\AppData\Local\Temp\msohtmlclip1\01\clip_image022.png&quot;
  o:title=&quot;&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6w82Eg4QqDuVFf4g6xJEs19ZoNoLKmVa_WhHuAI9WlKNbC-GQmXLm3p5wKOsuqnQUbnUhpt0Vl_RhF9frlpbJMMmP-9Hu0b8eQvOF_sPDcZzpFJen_3b6iWZjrArZpkc9cB-xbmUBB6A/s1600/s12.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;572&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6w82Eg4QqDuVFf4g6xJEs19ZoNoLKmVa_WhHuAI9WlKNbC-GQmXLm3p5wKOsuqnQUbnUhpt0Vl_RhF9frlpbJMMmP-9Hu0b8eQvOF_sPDcZzpFJen_3b6iWZjrArZpkc9cB-xbmUBB6A/s640/s12.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;Screen
12&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;Similarly
2&lt;sup&gt;nd&lt;/sup&gt; instruction will be displayed. It will update the 3&lt;sup&gt;rd&lt;/sup&gt;
register with the value 60.&lt;/span&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;!--[if gte vml 1]&gt;&lt;v:shape
 id=&quot;Picture_x0020_19&quot; o:spid=&quot;_x0000_i1026&quot; type=&quot;#_x0000_t75&quot; style=&#39;width:6in;
 height:387.75pt;visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:\Users\PARAGO~1\AppData\Local\Temp\msohtmlclip1\01\clip_image024.png&quot;
  o:title=&quot;&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEPimRxpgH1JWrysz70QAUeoNEIzBPbNDWJhH-qjoYTvgTdib27YZpCUMgGcGJ7xDbeyuC0w_Q5sQjCv2oZNoYO2Kzf0Btd648du2VC_T9CvqWom-ZGr1m4yFEBA0i2E_O9bGKLccex88/s1600/s13.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;572&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEPimRxpgH1JWrysz70QAUeoNEIzBPbNDWJhH-qjoYTvgTdib27YZpCUMgGcGJ7xDbeyuC0w_Q5sQjCv2oZNoYO2Kzf0Btd648du2VC_T9CvqWom-ZGr1m4yFEBA0i2E_O9bGKLccex88/s640/s13.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;Screen
13&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;The
third instruction was to add the 2&lt;sup&gt;nd&lt;/sup&gt; and 3&lt;sup&gt;rd&lt;/sup&gt; register and
answer have to be stored in the 2&lt;sup&gt;nd&lt;/sup&gt; register as it was the
destination register. Hence, we can see the value of the 2&lt;sup&gt;nd&lt;/sup&gt;
register have been updated to 130 from 70.&lt;/span&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;!--[if gte vml 1]&gt;&lt;v:shape
 id=&quot;Picture_x0020_21&quot; o:spid=&quot;_x0000_i1025&quot; type=&quot;#_x0000_t75&quot; style=&#39;width:6in;
 height:387.75pt;visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:\Users\PARAGO~1\AppData\Local\Temp\msohtmlclip1\01\clip_image026.png&quot;
  o:title=&quot;&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghdkcR4EyuPeRuTYf-TYjqBpcHl5YDAV76GnAY-qGptIhuQcM7wHFTpERdVC3gXlWE4LcYwMYXKnh575QQuquLpQS1EYtXMQ9VreLpovGpuKHCSXEiiAkiQrMGuiQbTcKq3X2oAGhR__k/s1600/s14.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;572&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghdkcR4EyuPeRuTYf-TYjqBpcHl5YDAV76GnAY-qGptIhuQcM7wHFTpERdVC3gXlWE4LcYwMYXKnh575QQuquLpQS1EYtXMQ9VreLpovGpuKHCSXEiiAkiQrMGuiQbTcKq3X2oAGhR__k/s640/s14.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7736522216829773431&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;/a&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot;, serif;&quot;&gt;Screen
14&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;The
last and 4&lt;sup&gt;th&lt;/sup&gt; instruction that we entered was to store the result of add
instruction from the 3&lt;sup&gt;rd&lt;/sup&gt; instruction to the memory. In the above
example we have stored the value of the 2&lt;sup&gt;nd&lt;/sup&gt; register in the 6&lt;sup&gt;th&lt;/sup&gt;
memory location.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;The
user will be asked to press any key to continue and the program will be
terminated as there were no more instructions to show.&lt;/span&gt;&lt;span class=&quot;MsoIntenseReference&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</description><link>http://islandprogrammers.blogspot.com/2016/10/write-simulator-for-assembly-language.html</link><author>noreply@blogger.com (Maaz Ali)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjq49UE1i4_D7BvbR3CEhkrwYV3ZpdeY_JS0epFzZqZbGR1qP7hn7__xxLE67UYTY357O5iXGJnBSNyHz5yIjyguC9IcGxNtx2y8DbqN75Hz5DINmTtRTiQPigZsDEnsgFl9AyaDa6FHmM/s72-c/s1.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7736522216829773431.post-1819816094525182732</guid><pubDate>Fri, 30 Sep 2016 07:42:00 +0000</pubDate><atom:updated>2026-10-25T14:07:53.353-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">assembly language</category><category domain="http://www.blogger.com/atom/ns#">lecture 08</category><category domain="http://www.blogger.com/atom/ns#">Tutorial</category><title>Load Add and Store Instructions in Assembly Language | Instruction set Architecture</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
We already  know (from the previous lectures) &lt;a href=&quot;http://islandprogrammers.blogspot.com/2016/09/assembly-language-instructions-with.html&quot;&gt;how  an instruction is formed&lt;/a&gt; and &lt;a href=&quot;http://islandprogrammers.blogspot.com/2016/09/assembly-language-instructions-with.html&quot;&gt;what  the basic structure of an instruction is&lt;/a&gt;. Let’s go through few examples of  it.&lt;br /&gt;
&lt;h2&gt;
Instruction Set&lt;/h2&gt;
An instruction set is composed of two parts:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Opcode&lt;/li&gt;
&lt;li&gt;Operand (s)&lt;/li&gt;
&lt;/ol&gt;
  

 

&lt;h3&gt;
Opcode&lt;/h3&gt;
Opcode defines the number of operation supported by this  instruction format and used for indexing that operation. For example: 0000 is  the opcode for LOADI operation.&lt;br /&gt;
&lt;h3&gt;
Operand (s)&lt;/h3&gt;
Operands can be a register address, memory address, and immediate  value.&lt;br /&gt;
  In our ISA design, the length of instruction is 16 bits.  Such that: 4 bits for opcode, and 12 bits for operand(s).&lt;br /&gt;
&lt;table align=&quot;center&quot; border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;
  &lt;tbody&gt;
&lt;tr&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;162&quot;&gt;Opcode (4-bits) &lt;/td&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;450&quot;&gt;Operands (12-bits)&lt;/td&gt;
  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table align=&quot;center&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
     &lt;td width=&quot;162&quot;&gt;0&lt;/td&gt;
  &lt;td width=&quot;450&quot;&gt;3&lt;/td&gt;
        &lt;td&gt;15&lt;/td&gt;
    &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h2&gt;
Operations&lt;/h2&gt;
For this tutorial we will be focusing on the three basic  operations, i.e. how to load, add, and store data in assembly language.  Following are the few operations along with their opcodes:&lt;br /&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;width: 424px;&quot;&gt;
    &lt;tbody&gt;
&lt;tr&gt;
      &lt;th width=&quot;212&quot;&gt;OPCODE&lt;/th&gt;
      &lt;th width=&quot;212&quot;&gt;Operation&lt;/th&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td width=&quot;212&quot;&gt;0000 &lt;/td&gt;
      &lt;td width=&quot;212&quot;&gt;LOADI &lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td width=&quot;212&quot;&gt;0001 &lt;/td&gt;
      &lt;td width=&quot;212&quot;&gt;&lt;strong&gt;LOADM&lt;/strong&gt;&lt;strong&gt; &lt;/strong&gt;&lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td width=&quot;212&quot;&gt;0010 &lt;/td&gt;
      &lt;td width=&quot;212&quot;&gt;STOREI &lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td width=&quot;212&quot;&gt;0011 &lt;/td&gt;
      &lt;td width=&quot;212&quot;&gt;&lt;strong&gt;STORER&lt;/strong&gt;&lt;strong&gt; &lt;/strong&gt;&lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td width=&quot;212&quot;&gt;0100 &lt;/td&gt;
      &lt;td width=&quot;212&quot;&gt;ADDI &lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td width=&quot;212&quot;&gt;0101 &lt;/td&gt;
      &lt;td width=&quot;212&quot;&gt;&lt;strong&gt;ADDR&lt;/strong&gt;&lt;strong&gt; &lt;/strong&gt;&lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td width=&quot;212&quot;&gt;0110 &lt;/td&gt;
      &lt;td width=&quot;212&quot;&gt;SUBI &lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td width=&quot;212&quot;&gt;… &lt;/td&gt;
      &lt;td width=&quot;212&quot;&gt;… &lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td width=&quot;212&quot;&gt;… &lt;/td&gt;
      &lt;td width=&quot;212&quot;&gt;… &lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td width=&quot;212&quot;&gt;1111 &lt;/td&gt;
      &lt;td width=&quot;212&quot;&gt;… &lt;/td&gt;
    &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
In above operations &lt;strong&gt;I&lt;/strong&gt; is for immediate, &lt;strong&gt;M&lt;/strong&gt; is for memory,  and &lt;strong&gt;R&lt;/strong&gt; is for register. Let’s look at  the registers and memory first before proceeding to the operations.&lt;br /&gt;
&lt;h3&gt;
Registers&lt;/h3&gt;
There are 16 registers hence 4 bits are required to address  them. Registers are named as R0 to R15.&lt;br /&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;width: 424px;&quot;&gt;
    &lt;tbody&gt;
&lt;tr&gt;
      &lt;th valign=&quot;middle&quot; width=&quot;212&quot;&gt;Register Address&lt;/th&gt;
      &lt;th valign=&quot;middle&quot; width=&quot;212&quot;&gt;Register&lt;/th&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td width=&quot;212&quot;&gt;0000 &lt;/td&gt;
      &lt;td width=&quot;212&quot;&gt;R0 &lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td width=&quot;212&quot;&gt;0001 &lt;/td&gt;
      &lt;td width=&quot;212&quot;&gt;R1 &lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td width=&quot;212&quot;&gt;0010 &lt;/td&gt;
      &lt;td width=&quot;212&quot;&gt;R2 &lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td width=&quot;212&quot;&gt;0011 &lt;/td&gt;
      &lt;td width=&quot;212&quot;&gt;R3 &lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td width=&quot;212&quot;&gt;0100 &lt;/td&gt;
      &lt;td width=&quot;212&quot;&gt;R4 &lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td width=&quot;212&quot;&gt;0101 &lt;/td&gt;
      &lt;td width=&quot;212&quot;&gt;R5 &lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td width=&quot;212&quot;&gt;0110 &lt;/td&gt;
      &lt;td width=&quot;212&quot;&gt;R6 &lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td width=&quot;212&quot;&gt;… &lt;/td&gt;
      &lt;td width=&quot;212&quot;&gt;… &lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td width=&quot;212&quot;&gt;… &lt;/td&gt;
      &lt;td width=&quot;212&quot;&gt;… &lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td width=&quot;212&quot;&gt;1111 &lt;/td&gt;
      &lt;td width=&quot;212&quot;&gt;R15 &lt;/td&gt;
    &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;h3&gt;
Memory&lt;/h3&gt;
There are 28 memory locations where data may  reside. Hence 8 bits are required to address them. Memory locations are named  as M0 to M255.&lt;br /&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;width: 448px;&quot;&gt;
    &lt;tbody&gt;
&lt;tr&gt;
      &lt;th valign=&quot;middle&quot; width=&quot;224&quot;&gt;Memory Address&lt;/th&gt;
      &lt;th valign=&quot;middle&quot; width=&quot;224&quot;&gt;Memory&lt;/th&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td width=&quot;224&quot;&gt;00000000&lt;/td&gt;
      &lt;td valign=&quot;bottom&quot; width=&quot;224&quot;&gt;M0&lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td valign=&quot;bottom&quot; width=&quot;224&quot;&gt;00000001&lt;/td&gt;
      &lt;td valign=&quot;bottom&quot; width=&quot;224&quot;&gt;M1&lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td valign=&quot;bottom&quot; width=&quot;224&quot;&gt;00000010&lt;/td&gt;
      &lt;td valign=&quot;bottom&quot; width=&quot;224&quot;&gt;M2&lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td valign=&quot;bottom&quot; width=&quot;224&quot;&gt;00000011&lt;/td&gt;
      &lt;td valign=&quot;bottom&quot; width=&quot;224&quot;&gt;M3&lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td valign=&quot;bottom&quot; width=&quot;224&quot;&gt;00000100&lt;/td&gt;
      &lt;td valign=&quot;bottom&quot; width=&quot;224&quot;&gt;M4&lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td valign=&quot;bottom&quot; width=&quot;224&quot;&gt;00000101&lt;/td&gt;
      &lt;td valign=&quot;bottom&quot; width=&quot;224&quot;&gt;M5&lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td valign=&quot;bottom&quot; width=&quot;224&quot;&gt;00000110&lt;/td&gt;
      &lt;td valign=&quot;bottom&quot; width=&quot;224&quot;&gt;M6&lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td valign=&quot;bottom&quot; width=&quot;224&quot;&gt;…&lt;/td&gt;
      &lt;td valign=&quot;bottom&quot; width=&quot;224&quot;&gt;…&lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td valign=&quot;bottom&quot; width=&quot;224&quot;&gt;…&lt;/td&gt;
      &lt;td valign=&quot;bottom&quot; width=&quot;224&quot;&gt;…&lt;/td&gt;
    &lt;/tr&gt;
&lt;tr&gt;
      &lt;td valign=&quot;bottom&quot; width=&quot;224&quot;&gt;11111111&lt;/td&gt;
      &lt;td valign=&quot;bottom&quot; width=&quot;224&quot;&gt;M255&lt;/td&gt;
    &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;h2&gt;
LOADM Instruction&lt;/h2&gt;
&lt;h3&gt;
Definition&lt;/h3&gt;
It loads an operand value from a memory location to a  register.&lt;br /&gt;
&lt;h3&gt;
Bit allocation&lt;/h3&gt;
&lt;table align=&quot;center&quot; border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;width: 581px;&quot;&gt;
  &lt;tbody&gt;
&lt;tr&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;131&quot;&gt;&lt;div align=&quot;center&quot;&gt;
LOADM &lt;/div&gt;
&lt;/td&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;174&quot;&gt;&lt;div align=&quot;center&quot;&gt;
REGISTER ADDRESS &lt;/div&gt;
&lt;/td&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;276&quot;&gt;&lt;div align=&quot;center&quot;&gt;
MEMORY ADDRESS &lt;/div&gt;
&lt;/td&gt;
  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table align=&quot;center&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;width: 581px;&quot;&gt;
  &lt;tbody&gt;
&lt;tr&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;131&quot;&gt;0&lt;/td&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;174&quot;&gt;3&lt;/td&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;276&quot;&gt;7&lt;/td&gt;
    &lt;td&gt;15&lt;/td&gt;
  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;ul&gt;
&lt;li&gt;4  bits for Opcode&lt;/li&gt;
&lt;li&gt;4  bits for Register address&lt;/li&gt;
&lt;li&gt;8  bits for Memory address&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
Working&lt;/h3&gt;
Consider an example: &lt;br /&gt;
  Assembly Code:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOADM&amp;nbsp;&amp;nbsp; R4&amp;nbsp;&amp;nbsp;&amp;nbsp;  M6&lt;br /&gt;
  Machine Code:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0001010000000110&lt;br /&gt;
&lt;table align=&quot;center&quot; border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;width: 581px;&quot;&gt;
  &lt;tbody&gt;
&lt;tr&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;131&quot;&gt;&lt;div align=&quot;center&quot;&gt;
LOADM&lt;/div&gt;
&lt;/td&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;174&quot;&gt;&lt;div align=&quot;center&quot;&gt;
R4 &lt;/div&gt;
&lt;/td&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;276&quot;&gt;&lt;div align=&quot;center&quot;&gt;
M6 &lt;/div&gt;
&lt;/td&gt;
  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDpCIwK6ft1EbP7g2-KsELcfxNyn4pYo74vKsfcMnyDH8xxDSIgrqsNcsRL6fige4ObZzBeYmmsciJPVfx2CWRwbFbPaJfEG4ahUyUJu4kJTnF7dxqSghHBLGhmSdKos06krS8NlfjO7c/s1600/clip_image002.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;142&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDpCIwK6ft1EbP7g2-KsELcfxNyn4pYo74vKsfcMnyDH8xxDSIgrqsNcsRL6fige4ObZzBeYmmsciJPVfx2CWRwbFbPaJfEG4ahUyUJu4kJTnF7dxqSghHBLGhmSdKos06krS8NlfjO7c/s640/clip_image002.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
In the above instruction operand value i.e. 87 from a memory  (M6) copied to a register (R4).&lt;br /&gt;
&lt;h2&gt;
STORER Instruction&lt;/h2&gt;
&lt;h3&gt;
Define:&lt;/h3&gt;
It stores an operand value from a register to a Memory  location.&lt;br /&gt;
&lt;h3&gt;
Bit allocation:&lt;/h3&gt;
&lt;table align=&quot;center&quot; border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;width: 581px;&quot;&gt;
  &lt;tbody&gt;
&lt;tr&gt;
    &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;&lt;div align=&quot;center&quot;&gt;
STORER&lt;/div&gt;
&lt;/td&gt;
    &lt;td valign=&quot;top&quot; width=&quot;222&quot;&gt;&lt;div align=&quot;center&quot;&gt;
REGISTER ADDRESS&lt;/div&gt;
&lt;/td&gt;
    &lt;td valign=&quot;top&quot; width=&quot;210&quot;&gt;&lt;div align=&quot;center&quot;&gt;
MEMORY ADDRESS&lt;/div&gt;
&lt;/td&gt;
  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table align=&quot;center&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;width: 581px;&quot;&gt;
  &lt;tbody&gt;
&lt;tr&gt;
    &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;0&lt;/td&gt;
    &lt;td valign=&quot;top&quot; width=&quot;222&quot;&gt;3&lt;/td&gt;
    &lt;td valign=&quot;top&quot; width=&quot;210&quot;&gt;7&lt;/td&gt;
    &lt;td&gt;15&lt;/td&gt;
  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;ul&gt;
&lt;li&gt;4 bits for Opcode&lt;/li&gt;
&lt;li&gt;4 bits for Register address&lt;/li&gt;
&lt;li&gt;8 bits for Memory address&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
Working&lt;/h3&gt;
Consider an example: &lt;br /&gt;
  Assembly Code:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; STORER&amp;nbsp;&amp;nbsp; R4&amp;nbsp;&amp;nbsp;&amp;nbsp;  M6&lt;br /&gt;
  Machine Code:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;0011010000000110&lt;br /&gt;
&lt;table align=&quot;center&quot; border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;width: 587px;&quot;&gt;
  &lt;tbody&gt;
&lt;tr&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;149&quot;&gt;&lt;div align=&quot;center&quot;&gt;
STORER&lt;/div&gt;
&lt;/td&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;156&quot;&gt;&lt;div align=&quot;center&quot;&gt;
R4&lt;/div&gt;
&lt;/td&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;282&quot;&gt;&lt;div align=&quot;center&quot;&gt;
M6&lt;/div&gt;
&lt;/td&gt;
  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table align=&quot;center&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;width: 587px;&quot;&gt;
  &lt;tbody&gt;
&lt;tr&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;149&quot;&gt;0&lt;/td&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;156&quot;&gt;3&lt;/td&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;282&quot;&gt;7&lt;/td&gt;
    &lt;td&gt;15&lt;/td&gt;
  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi55YfMrAXciTV-vOD7qi74ACK4xRKgEaBq-1chwDx-yEtZ8xP7CMZ0hIJFIozXaevb7jSYb4jHCdSsoqojr-Q8iavism8McxTamQtOgnOCrAfQiy5b-BFK9ugrd8gZgpXxReZ1dhdk6do/s1600/clip_image004.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;142&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi55YfMrAXciTV-vOD7qi74ACK4xRKgEaBq-1chwDx-yEtZ8xP7CMZ0hIJFIozXaevb7jSYb4jHCdSsoqojr-Q8iavism8McxTamQtOgnOCrAfQiy5b-BFK9ugrd8gZgpXxReZ1dhdk6do/s640/clip_image004.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
In the above instruction operand value (67) is stored from a  register (R4) to a Memory (M6) location.&lt;br /&gt;
&lt;h2&gt;
ADDR Instruction&lt;/h2&gt;
&lt;h3&gt;
Define:&lt;/h3&gt;
It adds register values and keeps the result in the  destination register. &lt;br /&gt;
&lt;h3&gt;
Bit allocation:&lt;/h3&gt;
&lt;table align=&quot;center&quot; border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;width: 593px;&quot;&gt;
  &lt;tbody&gt;
&lt;tr&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;125&quot;&gt;&lt;div align=&quot;center&quot;&gt;
ADDR &lt;/div&gt;
&lt;/td&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;150&quot;&gt;&lt;div align=&quot;center&quot;&gt;
Reg. Address &lt;/div&gt;
&lt;/td&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;180&quot;&gt;&lt;div align=&quot;center&quot;&gt;
Reg. Address &lt;/div&gt;
&lt;/td&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;138&quot;&gt;&lt;/td&gt;
  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table align=&quot;center&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;width: 593px;&quot;&gt;
  &lt;tbody&gt;
&lt;tr&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;125&quot;&gt;0&lt;/td&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;150&quot;&gt;3&lt;/td&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;180&quot;&gt;7&lt;/td&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;138&quot;&gt;11&lt;/td&gt;
    &lt;td&gt;15&lt;/td&gt;
  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;ul&gt;
&lt;li&gt;4 bits for Opcode&lt;/li&gt;
&lt;li&gt;4 bits for each Register address&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;4 bits for Source&lt;/li&gt;
&lt;li&gt;4 bits for Destination&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;h3&gt;
Working&lt;/h3&gt;
Consider an example: &lt;br /&gt;
  Assembly Code:&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ADDR&amp;nbsp;&amp;nbsp; R2 R1&lt;br /&gt;
  Machine Code:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0101 0010 0001 0000&lt;br /&gt;
&lt;table align=&quot;center&quot; border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;width: 599px;&quot;&gt;
  &lt;tbody&gt;
&lt;tr&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;160&quot;&gt;&lt;div align=&quot;center&quot;&gt;
ADDR&lt;/div&gt;
&lt;/td&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;97&quot;&gt;&lt;div align=&quot;center&quot;&gt;
R2&lt;/div&gt;
&lt;/td&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;287&quot;&gt;&lt;div align=&quot;center&quot;&gt;
R1&lt;/div&gt;
&lt;/td&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;55&quot;&gt;&lt;/td&gt;
  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table align=&quot;center&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;width: 599px;&quot;&gt;
  &lt;tbody&gt;
&lt;tr&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;160&quot;&gt;0&lt;/td&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;97&quot;&gt;3&lt;/td&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;287&quot;&gt;7&lt;/td&gt;
    &lt;td valign=&quot;middle&quot; width=&quot;55&quot;&gt;11&lt;/td&gt;
    &lt;td&gt;15&lt;/td&gt;
  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9S8fTZ6Tp0de8GSQVzHwVjGpiI8SvIz1hPnmf6qm5OQzGvwCQMN09u1EwbSrDq3EHBvnMkI1htUNN3PUDhyj8qGgVL7rIe54hEIweYnj-Tvm50shD6s7yCEheKpFKm3qIOL4L1c2vHnc/s1600/clip_image006.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;250&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9S8fTZ6Tp0de8GSQVzHwVjGpiI8SvIz1hPnmf6qm5OQzGvwCQMN09u1EwbSrDq3EHBvnMkI1htUNN3PUDhyj8qGgVL7rIe54hEIweYnj-Tvm50shD6s7yCEheKpFKm3qIOL4L1c2vHnc/s640/clip_image006.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Register R1 and R2 are added i.e. 23 and 79 and there result  is then stored into R2 register.&lt;br /&gt;
&lt;h2&gt;
Sample Example&lt;/h2&gt;
LOADM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; R1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; M25&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;  load from memory M25 and store the value in register R1&lt;br /&gt;
  LOADM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; R2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; M69&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;  load from memory M69 and store the value in register R2&lt;br /&gt;
  ADDR&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; R2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; R1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;  add values of register R1 and R2&lt;br /&gt;
  STORER&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; R2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; M2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;  store the value of register R2 to memory M2&lt;br /&gt;

&lt;h2&gt;Execution of a Assembly Language Instruction&lt;/h2&gt;
&lt;p&gt;Our CPU will use three stages for executing a single assembly language instruction. These are:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;h3&gt;Fetch:&lt;/h3&gt; &lt;p&gt;CPU fetches the instruction from Instruction memory (Maintained in a 2D Array).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;h3&gt;Decode:&lt;/h3&gt; &lt;p&gt;Operation and operands are determined.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;h3&gt;Execute:&lt;/h3&gt; &lt;p&gt;Operation is performed on the operands.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;To see these steps in practical follow the below &lt;a href=&quot;http://islandprogrammers.blogspot.com/2016/10/write-simulator-for-assembly-language.html&quot;&gt;program written in c language&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Program&lt;/h2&gt;
&lt;p&gt;A simulator for the discussed ISA design is written in C language. Click on the below link:&lt;/p&gt;
&lt;a href=&quot;http://islandprogrammers.blogspot.com/2016/10/write-simulator-for-assembly-language.html&quot;&gt;Write A Simulator For The Assembly Language ISA Design In C Language.&lt;/a&gt;

&lt;br /&gt;&lt;/div&gt;
</description><link>http://islandprogrammers.blogspot.com/2016/09/load-add-and-store-instructions-in.html</link><author>noreply@blogger.com (Maaz Ali)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDpCIwK6ft1EbP7g2-KsELcfxNyn4pYo74vKsfcMnyDH8xxDSIgrqsNcsRL6fige4ObZzBeYmmsciJPVfx2CWRwbFbPaJfEG4ahUyUJu4kJTnF7dxqSghHBLGhmSdKos06krS8NlfjO7c/s72-c/clip_image002.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7736522216829773431.post-1224681762014328625</guid><pubDate>Tue, 27 Sep 2016 07:12:00 +0000</pubDate><atom:updated>2026-10-25T14:09:18.711-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">assembly language</category><category domain="http://www.blogger.com/atom/ns#">lecture 07</category><category domain="http://www.blogger.com/atom/ns#">Tutorial</category><title>Debugging Assembly Language | Introduction to</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;

&lt;p&gt;If you are interested in writing code on command prompt and  like writing code in command prompt than this tutorial is for you. Debugging  assembly language is easy. Following picture shows an example of it:&lt;/p&gt;
&lt;p align=&quot;center&quot;&gt;
 &lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;270&quot; src=&quot;https://www.youtube.com/embed/JmAp4KuewN4&quot; style=&quot;width: 100%; height: 350px;&quot;&gt;&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;What is Debugging?&lt;/h2&gt;
&lt;p&gt;Debug is a dos program which allows programmers to see  execution of the program closely in depth. It is used to:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Change and see memory contents&lt;/li&gt;
  &lt;li&gt;Enter and execute programs&lt;/li&gt;
  &lt;li&gt;Hold the program at a specific instruction to  check the data values or change them.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Debugging commands Assembly language&lt;/h2&gt;
&lt;p&gt;Below are the command examples of debugging an assembly  language code:&lt;/p&gt;
  &lt;p&gt;&lt;strong&gt;Debug:&lt;/strong&gt;  Enter a program&lt;/p&gt;
  &lt;p&gt;&lt;strong&gt;Q:&lt;/strong&gt; Quit the program.&lt;/p&gt;
  &lt;p&gt;&lt;strong&gt;R:&lt;/strong&gt; See register contents/values.&lt;/p&gt;
  &lt;p&gt;&lt;strong&gt;R&amp;lt;register&amp;gt;:&lt;/strong&gt; see particular register content/value  also change it.&lt;/p&gt;
  &lt;p&gt;&lt;strong&gt;Practice Program:&lt;/strong&gt; See AX register contents and change the  value to 2, 34, 543, and GE.&lt;/p&gt;
  &lt;p&gt;&lt;strong&gt;A:&lt;/strong&gt; this command assembles the program. You can enter  assembly instructions into the memory.&lt;/p&gt;
  &lt;p&gt;&lt;strong&gt;A &amp;lt;starting address&amp;gt;:&lt;/strong&gt; starting address can be an  offset of code segment or you can also specify segment register.&lt;/p&gt;
  &lt;p&gt;&lt;strong&gt;Example – your turn:&lt;/strong&gt; a 100 or a cs: 100 are the same, type a  100 and debug it.&lt;/p&gt;
  &lt;p&gt;&lt;strong&gt;U:&lt;/strong&gt; a command that un-assembles the program. You can see  machine code of your program by using this command. You can also specify the  starting and ending addresses of memory section you want to see the code of,  U&amp;lt;starting address&amp;gt; (space) &amp;lt;ending address&amp;gt;.&lt;/p&gt;
  &lt;p&gt;&lt;strong&gt;G:&lt;/strong&gt; G is a go command that allows the program to run until it  reaches the breakpoint. At the end register contents are displayed to the  programmer.&lt;/p&gt;
  &lt;p&gt;&lt;strong&gt;F:&lt;/strong&gt; F command is used to fill into the memory. Format of this  command is: F&amp;lt;starting address&amp;gt; &amp;lt;ending address&amp;gt; &amp;lt;data&amp;gt;.&lt;/p&gt;
  &lt;p&gt;&lt;strong&gt;E:&lt;/strong&gt; E command is used to enter any data or change into the  memory. For example: E 200 &amp;lsquo;HELLO WORLD&amp;rsquo;.&lt;/p&gt;
  &lt;p&gt;&lt;strong&gt;D:&lt;/strong&gt; D command is used to see the register contents. You can  also use this command to fill segment providing offset. For example: F 10 10F  FF, fills 16bytes with FF.&lt;/p&gt;

&lt;p align=&quot;center&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1sIi4Bu1wjIZ80rcgOgWaPuS0blwJG3NLKX_xpfpge2b7WNjeu_KqQ5kyWvLU_BFBINqMYEQxyfUAQz7UiikAvIEmN2xABebAHij8wO70Ho3jnsu64DwbGFd1hgkzIjOVERS0IOztkRY/s1600/debug_3.jpg&quot; imageanchor=&quot;1&quot; &gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1sIi4Bu1wjIZ80rcgOgWaPuS0blwJG3NLKX_xpfpge2b7WNjeu_KqQ5kyWvLU_BFBINqMYEQxyfUAQz7UiikAvIEmN2xABebAHij8wO70Ho3jnsu64DwbGFd1hgkzIjOVERS0IOztkRY/s640/debug_3.jpg&quot; width=&quot;640&quot; height=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/p&gt;


&lt;br /&gt;&lt;/div&gt;
</description><link>http://islandprogrammers.blogspot.com/2016/09/debugging-assembly-language.html</link><author>noreply@blogger.com (Maaz Ali)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/JmAp4KuewN4/default.jpg" height="72" width="72"/><thr:total>9</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7736522216829773431.post-4243206852859670453</guid><pubDate>Tue, 20 Sep 2016 07:58:00 +0000</pubDate><atom:updated>2026-10-25T14:10:07.586-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">assembly language</category><category domain="http://www.blogger.com/atom/ns#">lecture 06</category><category domain="http://www.blogger.com/atom/ns#">Tutorial</category><title>Assembly Language Instructions With Examples | Introduction</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;

&lt;h2&gt;Instructions&lt;/h2&gt;
&lt;p&gt;Instructions are statements that execute when we assemble  the program. The instructions (written in assembly language) are translated  into machine language bytes, as we have already discussed in the &lt;a href=&quot;https://islandprogrammers.blogspot.com/2016/09/comparison-of-high-level-language.html&quot;&gt;lecture 02&lt;/a&gt;.  These machine language instructions/bytes are then executed by the CPU.&lt;/p&gt;
  &lt;p&gt;Example instruction:       &lt;strong&gt;mov       ax,  bx&lt;/strong&gt;&lt;/p&gt;
  &lt;p&gt;An assembly instruction has 4 basic parts:&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;Label                     (optional)&lt;/li&gt;
  &lt;li&gt;Mnemonic          (required)&lt;/li&gt;
  &lt;li&gt;Operand              (depends  on the instruction)&lt;/li&gt;
  &lt;li&gt;Comment            (optional)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Syntax of assembly language instruction is as follows:&lt;/p&gt;
  &lt;p style=&quot;text-align:center;&quot;&gt;&lt;em&gt;[label:] mnemonic [operands] [;comment]&lt;/em&gt;&lt;/p&gt;
  &lt;p&gt;Note: We will be using Intel IA-32 for this tutorial and  onwards.&lt;/p&gt;

&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;344&quot; src=&quot;https://www.youtube.com/embed/y83SN0UKqJQ&quot; style=&quot;width:100%;&quot;&gt;&lt;/iframe&gt;


&lt;h2&gt;Labels&lt;/h2&gt;
&lt;p&gt;There are two types of labels:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Data Labels&lt;/li&gt;
  &lt;li&gt;Code Labels&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Data Label&lt;/h3&gt;
&lt;p&gt;Data labels are just like variables in any other language. For  example, C language instruction: &lt;em&gt;int  myVar 10; &lt;/em&gt;we know that myVar is a variable name i.e. data label of int type  containing value 10. Similarly, in assembly language we use data labels as  variables which hold value (s) for us. For example, count is a variable in the  following instruction:&lt;/p&gt;
  &lt;p style=&quot;text-align:center;&quot;&gt;&lt;strong&gt;&lt;em&gt;count&lt;/em&gt;&lt;/strong&gt;&lt;em&gt; DWORD 100&lt;/em&gt;&lt;/p&gt;
  &lt;p&gt;Data labels are  declared in data segment of the code.&lt;/p&gt;
&lt;h3&gt;Code Label&lt;/h3&gt;
&lt;p&gt;Code labels are just the names which are used by other  instructions to jump from particular position to that position where data label  is located. It must end with a semicolon ( : ). Code labels are declared in  code segment. For example:&lt;/p&gt;
  &lt;p style=&quot;padding-left:35px;&quot;&gt;&lt;code&gt;&lt;strong&gt;&lt;em&gt;target:&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
  &lt;em&gt;mov       ax, bx&lt;/em&gt;&lt;br&gt;
  &lt;em&gt;...&lt;/em&gt;&lt;br&gt;
  &lt;em&gt;jmp target&lt;/em&gt;&lt;br&gt;&lt;/code&gt;&lt;/p&gt;
  &lt;p&gt;target is the data label, which is called by the jmp  instruction.&lt;/p&gt;
  &lt;p&gt;Use: code labels are used as targets for jumping while using  loops.&lt;/p&gt;
&lt;h2&gt;Mnemonics&lt;/h2&gt;
&lt;p&gt;A small word that acts as an identifier for the instruction.  The mnemonics are written in code segment. In following examples mov, sub, add,  jmp, call, and mul are the mnemonics:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;mov       Move/assign  one value to another (label)&lt;/li&gt;
  &lt;li&gt;sub         Subtract  one value from another&lt;/li&gt;
  &lt;li&gt;add        Adds  two values&lt;/li&gt;
  &lt;li&gt;jmp        Jump  to a specific location&lt;/li&gt;
  &lt;li&gt;call          Call  a procedure/module&lt;/li&gt;
  &lt;li&gt;mul        Multiply  two values&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Operands&lt;/h2&gt;
&lt;p&gt;Operand is the remaining part of the instruction. There can  be 0 to 3 operands. Where each operand is either a memory operand, a register,  an input/output port, or a constant expression.&lt;/p&gt;
  &lt;p&gt;Following are the operand types:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;constant expression&lt;/li&gt;
  &lt;li&gt;constant&lt;/li&gt;
  &lt;li&gt;memory (data label)&lt;/li&gt;
  &lt;li&gt;register&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Examples&lt;/h3&gt;
&lt;ul&gt;
  &lt;li&gt;0 operands&lt;/li&gt;

&lt;li style=&quot;background: none;&quot;&gt;stc                                          ;  set Carry flag&lt;/li&gt;

  &lt;li&gt;1 operand&lt;/li&gt;

&lt;li style=&quot;background: none;&quot;&gt;inc myByte                          ; memory&lt;/li&gt;
  &lt;li style=&quot;background: none;&quot;&gt;inc eax                                  ; register&lt;/li&gt;

  &lt;li&gt;2 operands&lt;/li&gt;

&lt;li style=&quot;background: none;&quot;&gt;sub myByte,25                  ; memory, constant&lt;/li&gt;
  &lt;li style=&quot;background: none;&quot;&gt;add ebx,ecx                       ; register, register&lt;/li&gt;
  &lt;li style=&quot;background: none;&quot;&gt;add eax,36 * 25                 ; register, constant-expression&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Comments&lt;/h2&gt;
&lt;p&gt;You should have used comments in your programs before. As you  know there are two types of comments: 1. Single-line and 2. Multi-line comments.  In assembly single-line comments begin with ; (semicolon) whereas, multi-line  comments begin with a comment directive and symbol/character selected by the  programmer itself and also end with the same symbol/character.&lt;/p&gt;
&lt;h3&gt;Why you should use comments in your programs?&lt;/h3&gt;
&lt;ol&gt;
  &lt;li&gt;explains the program&#39;s purpose &lt;/li&gt;
  &lt;li&gt;tricky coding techniques&lt;/li&gt;
  &lt;li&gt;revision information&lt;/li&gt;
  &lt;li&gt;by whom and when it was written &lt;/li&gt;
  &lt;li&gt;application-specific explanations&lt;/li&gt;
&lt;/ol&gt;


&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGYtcmf7039yzhpnf-VmZYHrQCeq3-BZ0AJRSXOM_uuR6GFJtRhbLqrsRFpuc3uqMcGuqt09BRuGDduaydoInLkz095OhO0JjY3QFCjRvFiO81rlKTblu22IDkcSDHGdEGv9_qZbQthOE/s1600/evolution-ruby-java-3334725-o.jpg&quot; imageanchor=&quot;1&quot; &gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGYtcmf7039yzhpnf-VmZYHrQCeq3-BZ0AJRSXOM_uuR6GFJtRhbLqrsRFpuc3uqMcGuqt09BRuGDduaydoInLkz095OhO0JjY3QFCjRvFiO81rlKTblu22IDkcSDHGdEGv9_qZbQthOE/s640/evolution-ruby-java-3334725-o.jpg&quot; width=&quot;640&quot; height=&quot;400&quot; alt=&quot;assembly language instructions&quot; /&gt;&lt;/a&gt;

&lt;br /&gt;&lt;/div&gt;
</description><link>http://islandprogrammers.blogspot.com/2016/09/assembly-language-instructions-with.html</link><author>noreply@blogger.com (Maaz Ali)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/y83SN0UKqJQ/default.jpg" height="72" width="72"/><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7736522216829773431.post-5484410847920745874</guid><pubDate>Mon, 19 Sep 2016 08:08:00 +0000</pubDate><atom:updated>2026-10-25T14:10:25.043-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">assembly language</category><category domain="http://www.blogger.com/atom/ns#">lecture 05</category><category domain="http://www.blogger.com/atom/ns#">Tutorial</category><title>Assembly Language Fundamentals</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;

&lt;p&gt;We need to know few basics of  assembly language before we start writing programs in assembly language. The assembly  programs run in little memory, consisted of primarily simple operations.&lt;/p&gt;
&lt;h2&gt;Basic Elements in Assembly Language&lt;/h2&gt;
&lt;p&gt;Now, let&amp;rsquo;s discuss the basic  elements and syntax of the assembly language, which will help you in writing  your first assembly program.&lt;/p&gt;
&lt;h2&gt;Integer constants&lt;/h2&gt;
&lt;p&gt;The integer constants consist of  leading sign (optional), digits (one or more), and suffix character (optional),  the suffix character is also known as radix. The general syntax of an integer  constant is:&lt;br&gt;
  &lt;em&gt;[+/-] digits [radix]&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;&lt;em&gt;Sign&lt;/em&gt;&lt;/strong&gt;&lt;strong&gt; &lt;/strong&gt;can be negative or positive.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;&lt;em&gt;Digits&lt;/em&gt;&lt;/strong&gt; can be decimal, binary, octal or hexadecimal digits.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;&lt;em&gt;Radix&lt;/em&gt;&lt;/strong&gt;can be d for decimal, b for binary, o/q for octal and h for  hexadecimal.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you do not provide any radix,  the number will be considered decimal and if you do not specify any sign, the  number will be considered positive by the assembler. Following are the few examples:&lt;/p&gt;
&lt;div align=&quot;center&quot;&gt;
  &lt;table border=&quot;1&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;
    &lt;tr&gt;
      &lt;th width=&quot;173&quot; valign=&quot;top&quot;&gt;Integer Constant&lt;/th&gt;
      &lt;th width=&quot;170&quot; valign=&quot;top&quot;&gt;Numeric System&lt;/th&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td width=&quot;173&quot; valign=&quot;top&quot;&gt;26&lt;/td&gt;
      &lt;td width=&quot;170&quot; valign=&quot;top&quot;&gt;Decimal&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td width=&quot;173&quot; valign=&quot;top&quot;&gt;42o&lt;/td&gt;
      &lt;td width=&quot;170&quot; valign=&quot;top&quot;&gt;Octal&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td width=&quot;173&quot; valign=&quot;top&quot;&gt;26d&lt;/td&gt;
      &lt;td width=&quot;170&quot; valign=&quot;top&quot;&gt;Decimal&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td width=&quot;173&quot; valign=&quot;top&quot;&gt;1Ah&lt;/td&gt;
      &lt;td width=&quot;170&quot; valign=&quot;top&quot;&gt;Hexadecimal&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td width=&quot;173&quot; valign=&quot;top&quot;&gt;11010011b&lt;/td&gt;
      &lt;td width=&quot;170&quot; valign=&quot;top&quot;&gt;Binary&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td width=&quot;173&quot; valign=&quot;top&quot;&gt;0A3h&lt;/td&gt;
      &lt;td width=&quot;170&quot; valign=&quot;top&quot;&gt;Hexadecimal&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td width=&quot;173&quot; valign=&quot;top&quot;&gt;42q&lt;/td&gt;
      &lt;td width=&quot;170&quot; valign=&quot;top&quot;&gt;Octal&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;
&lt;/div&gt;
&lt;p align=&quot;center&quot;&gt;&lt;u&gt;Table 3.1 Integer Constants&lt;/u&gt;&lt;/p&gt;
&lt;h2&gt;Integer Expressions&lt;/h2&gt;
&lt;p&gt;Combining arithmetic operators (+,-, etc.) and integer  values (0, 1, 2…) gives an integer expression, which is also known as a  mathematical expression. The integer can be stored in 32 bits (0-FFFFFFFFh).  Following are the operator&amp;rsquo;s w.r.t. their precedence levels:&lt;/p&gt;
&lt;div align=&quot;center&quot;&gt;
  &lt;table border=&quot;1&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;
    &lt;tr&gt;
      &lt;th width=&quot;76&quot; valign=&quot;top&quot;&gt;Operator&lt;/th&gt;
      &lt;th width=&quot;129&quot; valign=&quot;top&quot;&gt;Name&lt;/th&gt;
      &lt;th width=&quot;126&quot; valign=&quot;top&quot;&gt;Precedence Level&lt;/th&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td width=&quot;76&quot; valign=&quot;top&quot;&gt;(  )&lt;/td&gt;
      &lt;td width=&quot;129&quot; valign=&quot;top&quot;&gt;Parentheses&lt;/td&gt;
      &lt;td width=&quot;126&quot; valign=&quot;top&quot;&gt;1&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td width=&quot;76&quot; valign=&quot;top&quot;&gt;+, -&lt;/td&gt;
      &lt;td width=&quot;129&quot; valign=&quot;top&quot;&gt;Unary plus, minus&lt;/td&gt;
      &lt;td width=&quot;126&quot; valign=&quot;top&quot;&gt;2&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td width=&quot;76&quot; valign=&quot;top&quot;&gt;*, /&lt;/td&gt;
      &lt;td width=&quot;129&quot; valign=&quot;top&quot;&gt;Multiply, Divide&lt;/td&gt;
      &lt;td width=&quot;126&quot; valign=&quot;top&quot;&gt;3&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td width=&quot;76&quot; valign=&quot;top&quot;&gt;MOD&lt;/td&gt;
      &lt;td width=&quot;129&quot; valign=&quot;top&quot;&gt;Modulus&lt;/td&gt;
      &lt;td width=&quot;126&quot; valign=&quot;top&quot;&gt;3&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td width=&quot;76&quot; valign=&quot;top&quot;&gt;+, -&lt;/td&gt;
      &lt;td width=&quot;129&quot; valign=&quot;top&quot;&gt;Add, Subtract&lt;/td&gt;
      &lt;td width=&quot;126&quot; valign=&quot;top&quot;&gt;4&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Examples:&lt;/strong&gt;&lt;/p&gt;
&lt;div align=&quot;center&quot;&gt;
  &lt;table border=&quot;1&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;
    &lt;tr&gt;
      &lt;th width=&quot;116&quot; valign=&quot;top&quot;&gt;Expression &lt;/th&gt;
      &lt;th width=&quot;55&quot; valign=&quot;top&quot;&gt;&lt;p&gt;Value&lt;/p&gt;&lt;/th&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td width=&quot;116&quot; valign=&quot;top&quot;&gt;16/5&lt;/td&gt;
      &lt;td width=&quot;55&quot; valign=&quot;top&quot;&gt;3&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td width=&quot;116&quot; valign=&quot;top&quot;&gt;- (3 + 4) * (6 - 1)&lt;/td&gt;
      &lt;td width=&quot;55&quot; valign=&quot;top&quot;&gt;-35&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td width=&quot;116&quot; valign=&quot;top&quot;&gt;- 3 + 4 * 6 - 1&lt;/td&gt;
      &lt;td width=&quot;55&quot; valign=&quot;top&quot;&gt;20&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td width=&quot;116&quot; valign=&quot;top&quot;&gt;25 mod 3&lt;/td&gt;
      &lt;td width=&quot;55&quot; valign=&quot;top&quot;&gt;1&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;
&lt;/div&gt;
&lt;h2&gt;Character constants&lt;/h2&gt;
&lt;p&gt;Declare the character constants  with single or double quotes. Each character occupies 1 byte in the memory.&lt;br&gt;
  &lt;em&gt;Examples:&lt;/em&gt; &amp;lsquo;A&amp;rsquo; or &amp;ldquo;A&amp;rdquo;, etc.&lt;/p&gt;
&lt;h2&gt; String constants&lt;/h2&gt;
&lt;p&gt;Declare the string constants with  single or double quotes. Each character occupies one character, hence the number  of characters a string has, is the size of the string.&lt;br&gt;
  &lt;em&gt;Examples:&lt;/em&gt; &amp;lsquo;Hello World&amp;rsquo; or &amp;ldquo;Hello  World&amp;rdquo;, etc.&lt;br&gt;
  The size of the hello world  string is 11.&lt;/p&gt;
&lt;h2&gt;Reserved words&lt;/h2&gt;
&lt;p&gt;You cannot use few words, known  as keywords, when you are programming in any language. These words have special  meaning. In assembly language these words are:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Mnemonics&lt;/li&gt;
  &lt;li&gt;Directives&lt;/li&gt;
  &lt;li&gt;Type attributes&lt;/li&gt;
  &lt;li&gt;Operators&lt;/li&gt;
  &lt;li&gt;Predefined symbols&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Note: mnemonics and directives are discussed  below.&lt;/p&gt;
&lt;h2&gt;Identifiers&lt;/h2&gt;
&lt;p&gt;You (programmer) can make use of  your own words while writing programs called identifier. The identifiers might  be:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;variable&lt;/li&gt;
  &lt;li&gt;constant&lt;/li&gt;
  &lt;li&gt;procedure&lt;/li&gt;
  &lt;li&gt;code label&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There are rules that must be  followed by an identifier. An identifier:&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;Should be 1 to 247  characters long.&lt;/li&gt;
  &lt;li&gt;Is not case sensitive.&lt;/li&gt;
  &lt;li&gt;First character must be a  letter (A...Z, a...z), underscore (_), @, ?, or $. &lt;/li&gt;
  &lt;li&gt;Subsequent characters may  also be digits.&lt;/li&gt;
  &lt;li&gt;Cannot be the same as an  assembler reserved word.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Directives&lt;/h2&gt;
&lt;p&gt;The commands that are recognized  and acted upon by the assembler, known as directives. Directives are not same  as instructions, for example: the &lt;strong&gt;DWORD  directive&lt;/strong&gt; tells the assembler to reserve space in the memory for a double  word variable. But the &lt;strong&gt;MOV instruction&lt;/strong&gt;,  on the other hand, executes at runtime, copying the contents of variable (myVar)  to the register (EAX) as shown below:&lt;br&gt;
  myVar    DWORD        26         &lt;strong&gt;; DWORD directive&lt;/strong&gt;&lt;br&gt;
  mov  eax, myVar                     &lt;strong&gt;; MOV instruction&lt;/strong&gt;&lt;/p&gt;
  &lt;p&gt;In next tutorial, we will talk  about the instruction set of assembly language.&lt;/p&gt;

&lt;br /&gt;&lt;/div&gt;
</description><link>http://islandprogrammers.blogspot.com/2016/09/assembly-language-fundamentals.html</link><author>noreply@blogger.com (Maaz Ali)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7736522216829773431.post-159939512152861480</guid><pubDate>Sat, 10 Sep 2016 06:40:00 +0000</pubDate><atom:updated>2026-10-25T14:09:42.684-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">assembly language</category><category domain="http://www.blogger.com/atom/ns#">lecture 04</category><category domain="http://www.blogger.com/atom/ns#">Tutorial</category><title>Configure Microsoft Visual Studio for Assembly Language | How to</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
I know you are itching to start writing programs  in assembly language, but before we start our fantastic journey of &lt;a href=&quot;http://islandprogrammers.blogspot.com/search/label/assembly%20language&quot;&gt;learning how to code in assembly language&lt;/a&gt;, there are certain tools that you should have:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Assembly Editor&lt;/li&gt;
&lt;li&gt;Debugging Tool&lt;/li&gt;
&lt;/ul&gt;
I personally would suggest &lt;strong&gt;&lt;em&gt;Microsoft visual studio (latest  version)&lt;/em&gt;&lt;/strong&gt;. &lt;br /&gt;
  Note: For this tutorial we will be using MS-Visual  Studio. To download MS-Visual Studio to your computer, visit the following  link:&lt;br /&gt;
  &lt;a href=&quot;http://www.visualstudio.com/downloads/download-visual-studio-vs&quot;&gt;http://www.visualstudio.com/downloads/download-visual-studio-vs&lt;/a&gt; &lt;br /&gt;
  If you have any troubles installing MS-Visual  Studio, visit the following link:&lt;br /&gt;
  &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/e2h7fzkw.aspx&quot;&gt;http://msdn.microsoft.com/en-us/library/e2h7fzkw.aspx&lt;/a&gt; &lt;br /&gt;
  Now, you have installed the tools required to get  going, you should configure it for the assembly language.&lt;br /&gt;
&lt;h2&gt;
Configuration of MS-Visual Studio for MASM&lt;/h2&gt;
Follow the following steps to configure Microsoft  visual studio for assembly language:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Open the Microsoft visual  studio from your desktop, which you have installed earlier.&lt;/li&gt;
&lt;li&gt;Go to the &lt;strong&gt;&lt;em&gt;TOOLS&lt;/em&gt;&lt;/strong&gt; (located  at the toolbar) and click on the &lt;strong&gt;&lt;em&gt;CUSTOMIZE&lt;/em&gt;&lt;/strong&gt; option.  Following window will appear on your screen.&lt;/li&gt;

&lt;div align=&quot;center&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAwqHO5_LAeW8b6CYHx3l58feb6DCsu_i25dNVHun3k0xPn0OcvqbJlS_tKS0JEPo0kCfWuO5DgRbvKU6p40P5O2QrAktNonABAJoQyMP0OacbNLK2qNSULywunnMhM8EXsxXOgse6hk4/s1600/figure+%25281%252B2%2529.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img alt=&quot;configure microsoft visual studio for assembly language&quot; border=&quot;0&quot; height=&quot;360&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAwqHO5_LAeW8b6CYHx3l58feb6DCsu_i25dNVHun3k0xPn0OcvqbJlS_tKS0JEPo0kCfWuO5DgRbvKU6p40P5O2QrAktNonABAJoQyMP0OacbNLK2qNSULywunnMhM8EXsxXOgse6hk4/s640/figure+%25281%252B2%2529.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;

&lt;li&gt;Click on the &lt;strong&gt;&lt;em&gt;Commands&lt;/em&gt;&lt;/strong&gt; tab and then click on the &lt;strong&gt;&lt;em&gt;Add Command&lt;/em&gt;&lt;/strong&gt;. You should see the  following screen on your monitor/lid.&lt;/li&gt;

&lt;div align=&quot;center&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtnhec_goeeEuIrRy995Q1cnZFtHtJtaOrIhbRneKM_VfcfbfZwA5hbsalQLJR5dKpYlPS4OezVXjksHi5-KC_N9981nUer5jD9PBdUAYbEUoNmwx-2UDWV8y2wMx61BmpLDF3UPyAXpM/s1600/figure+%25284%252B5%2529.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img alt=&quot;configure microsoft visual studio for assembly language&quot; border=&quot;0&quot; height=&quot;360&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtnhec_goeeEuIrRy995Q1cnZFtHtJtaOrIhbRneKM_VfcfbfZwA5hbsalQLJR5dKpYlPS4OezVXjksHi5-KC_N9981nUer5jD9PBdUAYbEUoNmwx-2UDWV8y2wMx61BmpLDF3UPyAXpM/s640/figure+%25284%252B5%2529.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;li&gt;Click on the &lt;strong&gt;&lt;em&gt;debug&lt;/em&gt;&lt;/strong&gt; option and then select &lt;strong&gt;&lt;em&gt;Start/Continue&lt;/em&gt;&lt;/strong&gt;. And  click &lt;strong&gt;&lt;em&gt;OK&lt;/em&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Now again click on the &lt;strong&gt;&lt;em&gt;TOOLS&lt;/em&gt;&lt;/strong&gt; button, and then click on the &lt;strong&gt;&lt;em&gt;Options&lt;/em&gt;&lt;/strong&gt; button. New window will  appear on your screen as shown in the following figure 3.3.&lt;/li&gt;

&lt;br /&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuGRF1Fmnyy4XP_wjAYiX9Op4XwW4xV9Tvp7dtON64dzU2-BMkq3KQ6Kv1UTU8RZA_843f-KdGkhTVz858vTzz21nJGqnPynzlS504LCoTjq1_PuESrN32jGA8Y1_J5Mv9YR69w9NROcc/s1600/figure+3.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img alt=&quot;configure microsoft visual studio for assembly language&quot; border=&quot;0&quot; height=&quot;360&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuGRF1Fmnyy4XP_wjAYiX9Op4XwW4xV9Tvp7dtON64dzU2-BMkq3KQ6Kv1UTU8RZA_843f-KdGkhTVz858vTzz21nJGqnPynzlS504LCoTjq1_PuESrN32jGA8Y1_J5Mv9YR69w9NROcc/s640/figure+3.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;li&gt;Double click on the &lt;strong&gt;&lt;em&gt;Text Editor&lt;/em&gt;&lt;/strong&gt; option, and then from the pull-down menu select &lt;strong&gt;&lt;em&gt;All Languages&lt;/em&gt;&lt;/strong&gt; and then click on &lt;strong&gt;&lt;em&gt;Tabs&lt;/em&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Enter &lt;strong&gt;&lt;em&gt;5&lt;/em&gt;&lt;/strong&gt; in the text field present in front of the &lt;strong&gt;&lt;em&gt;Tab Size&lt;/em&gt;&lt;/strong&gt; and enter &lt;strong&gt;&lt;em&gt;5&lt;/em&gt;&lt;/strong&gt; in the text field in front of the &lt;strong&gt;Indent Size&lt;/strong&gt;, as shown in the above figure 3.3, and press &lt;strong&gt;&lt;em&gt;OK&lt;/em&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;
Congratulations, now we are ready to &lt;a href=&quot;http://islandprogrammers.blogspot.com/search/label/assembly%20language&quot;&gt;write and execute programs in assembly language&lt;/a&gt;.&lt;br /&gt;
&lt;h2&gt;
Let’s Run A Program:&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Go to the following link  to download the zip file. Which will help us later in writing code.&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;For MS-Visual Studio 2010&lt;/li&gt;

&lt;a href=&quot;http://kipirvine.com/asm/examples/IrvineExamplesVS2010a.zip&quot;&gt;http://kipirvine.com/asm/examples/IrvineExamplesVS2010a.zip&lt;/a&gt;&lt;br /&gt;

&lt;li&gt;For MS-Visual Studio 2012&lt;/li&gt;
&lt;a href=&quot;http://kipirvine.com/asm/examples/IrvineExamplesVS2012.zip&quot;&gt;http://kipirvine.com/asm/examples/IrvineExamplesVS2012.zip&lt;/a&gt;&lt;br /&gt;
&lt;li&gt;For any other version of  MS-Visual Studio&lt;/li&gt;
&lt;a href=&quot;http://kipirvine.com/asm/&quot;&gt;http://kipirvine.com/asm/&lt;/a&gt;&lt;br /&gt;
&lt;/ul&gt;

&lt;li&gt;Make a new folder in &lt;strong&gt;&lt;em&gt;C&lt;/em&gt;&lt;/strong&gt; drive and rename it to &lt;strong&gt;Irvine&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Now copy the downloaded  zip file and extract it into the Irvine folder, you should see the following files  (fig 3. 4) on your monitor/lid.&lt;/li&gt;

&lt;div align=&quot;center&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2RKKk_un7RztckeXAlZ2SZoh0o5CJ_Gd0bArQ7aMM7GygO8uNlH8_Pwvr0bukZx6tTW6BjQGBje4TPoesdq_IQmVio4ImOSP7WJ0D74emBWV8ULAOEhkg9FzRkDrU3GGRfg1RTpXnQ6g/s1600/figure+4.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img alt=&quot;run a program in assembly language using microsoft visual studio&quot; border=&quot;0&quot; height=&quot;360&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2RKKk_un7RztckeXAlZ2SZoh0o5CJ_Gd0bArQ7aMM7GygO8uNlH8_Pwvr0bukZx6tTW6BjQGBje4TPoesdq_IQmVio4ImOSP7WJ0D74emBWV8ULAOEhkg9FzRkDrU3GGRfg1RTpXnQ6g/s640/figure+4.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;strong&gt;Note:&lt;/strong&gt; If you don’t have access  to C drive, make the new folder on desktop with the name Irvine.&lt;br /&gt;

&lt;li&gt;Open &lt;strong&gt;&lt;em&gt;MS-Visual Studio&lt;/em&gt;&lt;/strong&gt; and click on the &lt;strong&gt;&lt;em&gt;File&lt;/em&gt;&lt;/strong&gt; button. Go to &lt;strong&gt;&lt;em&gt;Open&lt;/em&gt;&lt;/strong&gt; and from the pull down menu click on the &lt;strong&gt;&lt;em&gt;Project/Solution&lt;/em&gt;&lt;/strong&gt;. A new window will appear on the screen.&lt;/li&gt;
&lt;li&gt;From the new window: &lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;Open &lt;strong&gt;&lt;em&gt;C&lt;/em&gt;&lt;/strong&gt; drive.&lt;/li&gt;
&lt;li&gt;Open &lt;strong&gt;&lt;em&gt;Irvine&lt;/em&gt;&lt;/strong&gt; folder&lt;/li&gt;
&lt;li&gt;Open &lt;strong&gt;&lt;em&gt;Examples&lt;/em&gt;&lt;/strong&gt; folder. &lt;/li&gt;
&lt;li&gt;Open &lt;strong&gt;&lt;em&gt;ch03&lt;/em&gt;&lt;/strong&gt; folder.&lt;/li&gt;
&lt;li&gt;Open &lt;strong&gt;&lt;em&gt;Project&lt;/em&gt;&lt;/strong&gt; folder.&lt;/li&gt;
&lt;li&gt;Open &lt;strong&gt;&lt;em&gt;Project.sln&lt;/em&gt;&lt;/strong&gt; file.&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;You should see the  following screen on your window. If you don’t see the code on your screen, double  click on the &lt;strong&gt;&lt;em&gt;AddSum.asm&lt;/em&gt;&lt;/strong&gt; from the  solution explorer.&lt;/li&gt;

&lt;br /&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiUNoGP3XpDpZ_letqWPWfcUCqkgoq1Rwl1U3SobcN0yiHEupPxKRFYT9qmdu8AgvfTLY78G6_gokgKBWLy06V0P3BiJM8eSvfscuZPUY0rzrB9Pkn7dlp8p4y5gVArnphPpaV3rF09zM/s1600/figure+5.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img alt=&quot;run a program in assembly language using microsoft visual studio&quot; border=&quot;0&quot; height=&quot;360&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiUNoGP3XpDpZ_letqWPWfcUCqkgoq1Rwl1U3SobcN0yiHEupPxKRFYT9qmdu8AgvfTLY78G6_gokgKBWLy06V0P3BiJM8eSvfscuZPUY0rzrB9Pkn7dlp8p4y5gVArnphPpaV3rF09zM/s640/figure+5.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;li&gt;Press &lt;strong&gt;&lt;em&gt;ctrl+F5&lt;/em&gt;&lt;/strong&gt; and you should see the following console window on your  screen. Which shows the output of the program written in addsum.asm file.&lt;/li&gt;

&lt;div align=&quot;center&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgV1RYJGgroMNyZ15p_ZVQUdkQ4YSZoEgDJCvOVB-OV-v8QwBaXusnYoiN8YHfXMKFOG4H82qq-bEq5iabxAVVzY6tmOkSkjrUA1mJRF0j9Gd0VEbqdDl14jNPPb_7VyhbfHrQ50ojUOCE/s1600/figure+6.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img alt=&quot;run a program in assembly language using microsoft visual studio&quot; border=&quot;0&quot; height=&quot;360&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgV1RYJGgroMNyZ15p_ZVQUdkQ4YSZoEgDJCvOVB-OV-v8QwBaXusnYoiN8YHfXMKFOG4H82qq-bEq5iabxAVVzY6tmOkSkjrUA1mJRF0j9Gd0VEbqdDl14jNPPb_7VyhbfHrQ50ojUOCE/s640/figure+6.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;/ol&gt;

&lt;br /&gt;&lt;/div&gt;
</description><link>http://islandprogrammers.blogspot.com/2016/09/configure-microsoft-visual-studio-for.html</link><author>noreply@blogger.com (Maaz Ali)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAwqHO5_LAeW8b6CYHx3l58feb6DCsu_i25dNVHun3k0xPn0OcvqbJlS_tKS0JEPo0kCfWuO5DgRbvKU6p40P5O2QrAktNonABAJoQyMP0OacbNLK2qNSULywunnMhM8EXsxXOgse6hk4/s72-c/figure+%25281%252B2%2529.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7736522216829773431.post-5022708263086795151</guid><pubDate>Fri, 09 Sep 2016 06:57:00 +0000</pubDate><atom:updated>2026-10-25T14:11:25.319-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">assembly language</category><category domain="http://www.blogger.com/atom/ns#">lecture 03</category><category domain="http://www.blogger.com/atom/ns#">Tutorial</category><title>Advantages and Disadvantages of Assembly Language | Virtual Machines and Machine Levels</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2&gt;
Advantages and Disadvantages of Assembly Language&lt;/h2&gt;
Let’s discuss few advantages and disadvantages of a level 3 i.e. assembly language.&lt;br /&gt;

&lt;h3&gt;
Advantages of Assembly Language&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Programs written in machine language are replaceable by mnemonics which are easier to remember.&lt;/li&gt;
&lt;li&gt;Memory Efficient.&lt;/li&gt;
&lt;li&gt;It is not required to keep track of memory locations.&lt;/li&gt;
&lt;li&gt;Faster in speed.&lt;/li&gt;
&lt;li&gt;Easy to make insertions and deletions.&lt;/li&gt;
&lt;li&gt;Hardware Oriented.&lt;/li&gt;
&lt;li&gt;Requires fewer instructions to accomplish the same result.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
Disadvantages of Assembly Language&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Long programs written in such languages cannot be executed on small sized computers.&lt;/li&gt;
&lt;li&gt;It takes lot of time to code or write the program, as it is more complex in nature.&lt;/li&gt;
&lt;li&gt;Difficult to remember the syntax.&lt;/li&gt;
&lt;li&gt;Lack of portability of program between computers of different makes.&lt;/li&gt;
&lt;li&gt;No SDKs (System Development Kit).&lt;/li&gt;
&lt;/ol&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;270&quot; src=&quot;https://www.youtube.com/embed/0esP0h6SWZ4&quot; width=&quot;480&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;h2&gt;
Concept of Virtual Machines&lt;/h2&gt;
Virtual machines involves two concepts:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Virtual Machines&lt;/li&gt;
&lt;li&gt;Machine Levels&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
Virtual Machines&lt;/h3&gt;
We know that each computer has its own native machine language that effects the hardware of the computer directly, generally known as language L0. It is difficult to write programs in machine language, therefore, a new language could have been constructed, which was easy and more human friendly, called language L1. Following are the two ways to achieve this:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Interpretation&lt;/li&gt;
&lt;li&gt;Translation&lt;/li&gt;
&lt;/ul&gt;
Let’s, discuss both ideas one by one:&lt;br /&gt;
&lt;h3&gt;
Interpretation&lt;/h3&gt;
The program written in L1 is converted into machine language (L0). The relation between L1 and L0 is one-to-one i.e. every instruction of L1 is being interpreted by the L0 and then executed.&lt;br /&gt;
&lt;strong&gt; &lt;/strong&gt;
&lt;br /&gt;
&lt;h3&gt;
Translation&lt;/h3&gt;
The program of language L1 is completely translated into language L0 and then executed.&lt;br /&gt;
  &lt;u&gt; &lt;/u&gt;&lt;br /&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinRfbgEwq2kdCQawRtvKTWTKEclS2gM6WOIHK5lxFVFCz1x3CMIS61IbqOMQWdvB3PCsG-uFp2gDsqrIF-4CMHKRLMWunrrYPdUHcnN58ezz9cIlI61yVCCjlBx4_KtNYUUTzZvpeELWU/s1600/Translation.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img alt=&quot;Translation of high level language to assembly language&quot; border=&quot;0&quot; height=&quot;256&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinRfbgEwq2kdCQawRtvKTWTKEclS2gM6WOIHK5lxFVFCz1x3CMIS61IbqOMQWdvB3PCsG-uFp2gDsqrIF-4CMHKRLMWunrrYPdUHcnN58ezz9cIlI61yVCCjlBx4_KtNYUUTzZvpeELWU/s400/Translation.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;u&gt; &lt;/u&gt;
&lt;br /&gt;
&lt;h2&gt;
Machine Levels&lt;/h2&gt;
There are four machine levels as shown in the following figure 2.2:&lt;br /&gt;
&lt;br /&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiW9NBcXNpSdenrtsB39WH4rDdMpfUFOxoCqSSAywCejavOfa85pQys85i1E0_T8c6nAWam-pvyaEXW07EsEYNY-lku3qpCfvtLUriuSRDkJdAWb8elZWJIB_u4CUbXWyKwjpuCUDkJ7hQ/s1600/Machine+Levels.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img alt=&quot;machine levels of assembly language&quot; border=&quot;0&quot; height=&quot;344&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiW9NBcXNpSdenrtsB39WH4rDdMpfUFOxoCqSSAywCejavOfa85pQys85i1E0_T8c6nAWam-pvyaEXW07EsEYNY-lku3qpCfvtLUriuSRDkJdAWb8elZWJIB_u4CUbXWyKwjpuCUDkJ7hQ/s400/Machine+Levels.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;h3&gt;
High Level Language - Level 4&lt;/h3&gt;
The programs written in high level (application oriented) languages like: C, C++, Java, etc. are compiled into assembly language.&lt;br /&gt;
&lt;h3&gt;
Assembly Language - Level 3&lt;/h3&gt;
The relation between assembly language and machine language is one-to-one i.e. every instruction mnemonic of assembly language is being interpreted by the machine language.&lt;br /&gt;
&lt;h3&gt;
Machine Language - Level 2&lt;/h3&gt;
The level 2 is also known as ISA (Instruction set Architecture) and it is executed by the level 1 i.e. Digital Logic.&lt;br /&gt;
&lt;h3&gt;
Digital Logic - Level 1&lt;/h3&gt;
The CPU (central processing unit) is being constructed from the digital logic gates, which is part of the computer hardware.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://islandprogrammers.blogspot.com/2016/09/virtual-machines-and-machine-levels.html</link><author>noreply@blogger.com (Maaz Ali)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/0esP0h6SWZ4/default.jpg" height="72" width="72"/><thr:total>6</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7736522216829773431.post-8279030849935199038</guid><pubDate>Thu, 08 Sep 2016 07:13:00 +0000</pubDate><atom:updated>2026-10-25T14:10:27.674-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">assembly language</category><category domain="http://www.blogger.com/atom/ns#">lecture 02</category><category domain="http://www.blogger.com/atom/ns#">Tutorial</category><title>Comparison of High Level Language, Assembly Language and Machine Language</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;

&lt;h2&gt;Relation  between Assembly Language and Machine Language&lt;/h2&gt;
&lt;div align=&quot;center&quot;&gt;
  &lt;table border=&quot;1&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;
    &lt;tr&gt;
      &lt;td width=&quot;312&quot; valign=&quot;top&quot;&gt;&lt;h3 align=&quot;center&quot;&gt;&lt;strong&gt;Assembly Language&lt;/strong&gt;&lt;/h3&gt;&lt;/td&gt;
      &lt;td width=&quot;312&quot; valign=&quot;top&quot;&gt;&lt;h3 align=&quot;center&quot;&gt;&lt;strong&gt;Machine Language&lt;/strong&gt;&lt;/h3&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td width=&quot;312&quot; valign=&quot;top&quot;&gt;&lt;p&gt;Assembly language is a numeric language. It is    only understood by the systems CPU.&lt;/p&gt;&lt;/td&gt;
      &lt;td width=&quot;312&quot; valign=&quot;top&quot;&gt;&lt;p&gt;All    processors understand same machine language e.g. x86 processors.&lt;/p&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td width=&quot;312&quot; valign=&quot;top&quot;&gt;&lt;p&gt;It has mnemonics like add, mov, etc.&lt;/p&gt;&lt;/td&gt;
      &lt;td width=&quot;312&quot; valign=&quot;top&quot;&gt;&lt;p&gt;Every    machine language instruction corresponds to the single assembly language    instruction.&lt;/p&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;
&lt;/div&gt;
&lt;p align=&quot;center&quot;&gt;&lt;u&gt;Table  1.2 &lt;/u&gt;&lt;u&gt;relation between AL and  ML&lt;/u&gt;&lt;u&gt; &lt;/u&gt;&lt;/p&gt;
&lt;h2&gt;Differences between  High Level languages and Assembly Language | High Level Language vs Assembly  Language &lt;/h2&gt;
&lt;p&gt;Assembly language is different from  higher level languages like java, C++, etc. in many ways, let&amp;rsquo;s discuss them  one by one:&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;High  level languages like java, C++, etc. have one to many relationship with machine  code and assembly language. One statement of java or C++ expands into many  assembly language commands.&lt;/li&gt;

&lt;p&gt;For Example: we have following two  instructions in C++ and when they are converted in assembly language, number of  instructions is 5. So, there is a one to many relationship for the high level  languages with the assembly language.&lt;/p&gt;
&lt;div align=&quot;center&quot;&gt;
  &lt;table border=&quot;1&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;
    &lt;tr&gt;
      &lt;td width=&quot;312&quot;&gt;&lt;h3 align=&quot;center&quot;&gt;&lt;strong&gt;C++ code&lt;/strong&gt;&lt;/h3&gt;&lt;/td&gt;
      &lt;td width=&quot;312&quot;&gt;&lt;h3 align=&quot;center&quot;&gt;&lt;strong&gt;Assembly code&lt;/strong&gt;&lt;/h3&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td width=&quot;312&quot;&gt;&lt;p&gt;Int varY;&lt;br&gt;
        Int varX = (varY + 14) * 13;&lt;/p&gt;&lt;/td&gt;
      &lt;td width=&quot;312&quot;&gt;&lt;p&gt;mov    edx, vary&lt;br&gt;
        add    edx,14&lt;br&gt;
        mov    ecx,13&lt;br&gt;
        imul    ecx&lt;br&gt;
        mov    varX,edx&lt;/p&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;
&lt;/div&gt;
&lt;p align=&quot;center&quot;&gt;&lt;u&gt;Table 1.2 C++ and assembly language difference&lt;/u&gt;&lt;/p&gt;

  &lt;li&gt;Programs  written using high level languages like c#, etc. have the ability to run on  just any computer but the assembly language is written for that exact processor  family.&lt;/li&gt;
  &lt;li&gt;High  level language is converted into assembly language and then into machine code  as shown below in the diagram.&lt;/li&gt;
&lt;p align=&quot;center&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjo6Gs33L1inVJ1RdhPYSWsMfnu0Q-boCCR7N3n3Drx-15c9h1k9IbvdUFfc_LYPL-YNUBS0LJzT3C3tkjVu48iJtXY9DSjtdRN65dY3gJHHpf5Ffp6zu630na2jP-sBOfw9Z-oc6UF8M/s1600/Machine+Levels.png&quot; imageanchor=&quot;1&quot; &gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjo6Gs33L1inVJ1RdhPYSWsMfnu0Q-boCCR7N3n3Drx-15c9h1k9IbvdUFfc_LYPL-YNUBS0LJzT3C3tkjVu48iJtXY9DSjtdRN65dY3gJHHpf5Ffp6zu630na2jP-sBOfw9Z-oc6UF8M/s400/Machine+Levels.png&quot; width=&quot;400&quot; height=&quot;344&quot; alt=&quot;assembly language vs high level language&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

  &lt;li&gt;Assembly  language can control the machine code better as compared to high level  languages.&lt;/li&gt;
  &lt;li&gt;Manipulation  of bits is easier in assembly language as compared to high level languages.&lt;/li&gt;
  &lt;li&gt;Assembly  language can access any memory but the high level languages can&amp;rsquo;t.&lt;/li&gt;
  &lt;li&gt;As  high level languages are structures, so they are easy to maintain as compared  to assembly language.&lt;/li&gt;
  &lt;li&gt;In  high level languages the executable code is huge and hence it sometimes not  efficient. But the assembly language is more efficient as it has smaller  executable code.&lt;/li&gt;
  &lt;li&gt;The  assembly language programmer must know about the hardware such as registers,  etc. but the high level language programmer doesn&amp;rsquo;t need to know such kind of  stuff.&lt;/li&gt;
  &lt;li&gt;In  assembly language we deal with the pointers at the physical level but in the  high level languages the pointers details are hidden.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Applications of  Assembly Language | Advantages of Assembly Language &lt;/h2&gt;
&lt;p&gt;There are  number of applications of assembly language:&lt;br&gt;
  Different  programming languages are used to make different applications or sometimes a  part of the application. There are few applications like: hardware interface,  device drivers, etc. are written using assembly. But the scientific,  commercial, etc. applications are written more efficiently in high level  languages. Following are the various applications that are made using assembly  language. Hence, it is used:&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;For writing business apps. Which are used at  single/multiple organization platforms.&lt;/li&gt;
  &lt;li&gt;For drivers which are used in hardware devices like:  VGA drivers etc. as they have to effect directly to the computer&amp;rsquo;s hardware.&lt;/li&gt;
  &lt;li&gt;In developing games played on computer systems. As,  they have to utilize specific amount of memory to deal with a specific event.&lt;/li&gt;
  &lt;li&gt;Also for embedded systems.&lt;/li&gt;
  &lt;li&gt;In bios of the system for boot code.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Assembly  Language favored over High Level Languages &lt;/h2&gt;
&lt;p&gt;Assembly  Language is favored over a lot of applications as compared to high level  languages. Following are the few examples of it:&lt;/p&gt;
&lt;h3&gt;Hardware  device drivers&lt;/h3&gt;
&lt;p&gt;While writing  programs for the drivers of the systems (hardware devices) assembly language is  preferred as the assembly can directly access the hardware. As the programs for  the drivers are short hence they are fast and effective.&lt;/p&gt;
&lt;h3&gt;Embedded  Systems&lt;/h3&gt;
&lt;p&gt;Embedded  system programs should be written in assembly language so that the program  could run fast.&lt;/p&gt;
&lt;h3&gt;Computer  Games&lt;/h3&gt;
&lt;p&gt;Games require  some specific amount of memory locations and the direct access to the  computer&amp;rsquo;s hardware which is provided by the assembly language but not by the  high level languages. &lt;/p&gt;

&lt;br /&gt;&lt;/div&gt;
</description><link>http://islandprogrammers.blogspot.com/2016/09/comparison-of-high-level-language.html</link><author>noreply@blogger.com (Maaz Ali)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjo6Gs33L1inVJ1RdhPYSWsMfnu0Q-boCCR7N3n3Drx-15c9h1k9IbvdUFfc_LYPL-YNUBS0LJzT3C3tkjVu48iJtXY9DSjtdRN65dY3gJHHpf5Ffp6zu630na2jP-sBOfw9Z-oc6UF8M/s72-c/Machine+Levels.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7736522216829773431.post-4221764420429044362</guid><pubDate>Wed, 07 Sep 2016 07:11:00 +0000</pubDate><atom:updated>2026-10-25T14:09:45.868-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">assembly language</category><category domain="http://www.blogger.com/atom/ns#">lecture 01</category><category domain="http://www.blogger.com/atom/ns#">Tutorial</category><title>Introduction to Assembly Language</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2&gt;
Overview&lt;/h2&gt;
&lt;p&gt;The low level computer programming  language is the assembly language and it has direct access to the system’s  hardware such as registers, flags, memory locations etc. That is why, you should  have some knowledge about the computer hardware/architecture.&lt;/p&gt;
&lt;p&gt;In this tutorial, we will be focusing  on the assembly programming of x86 microprocessors compatible with the ‘Intel’ instruction  architecture (IA-32) that runs on MS-Windows. We will also provide sample codes  and execution results for an assembler in tutorial topics i.e. Microsoft Macro  Assembler (MASM).&lt;/p&gt;
&lt;h2&gt;
Background You Should Have&lt;/h2&gt;
&lt;p&gt;You should have knowledge about:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Any high level  language (C, C++, or Java)&lt;/li&gt;
&lt;li&gt;Digital logic  design&lt;/li&gt;
&lt;li&gt;And number  representations (Binary numbers, decimal numbers, hexadecimal and their conversions).&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
Stuff You Need Have&lt;/h2&gt;
&lt;p&gt;You should have an &lt;strong&gt;&lt;em&gt;editor&lt;/em&gt;&lt;/strong&gt; to &lt;a href=&quot;http://islandprogrammers.blogspot.com/search/label/assembly%20language&quot;&gt;write Assembly Langue code&lt;/a&gt;. I personally will recommend ‘&lt;em&gt;Microsoft  Visual Studio’&lt;/em&gt; (latest version). The step by step instructions are given here: &lt;a href=&quot;http://islandprogrammers.blogspot.com/2016/09/configure-microsoft-visual-studio-for.html&quot;&gt;How to  download and configure MS Visual Studio for Assembly Language&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;
 Execution Steps of Assembly Language&lt;/h2&gt;
&lt;p&gt;The steps that are followed by the  system/assembler to create an executable file of the code is as follow:&lt;/p&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqnGAw_a7PcYSTqAIKrlqo16COwVyy_R1LwGTLb-CbiLwj7TuvU_WslCjzjI9qRUHCMF-_0ENucN_c2GVueSziPS4efdqoWtdMbEbF_vftBj3KwBeU_-vah4lxa2ZXmTNfB-Y_LxResvk/s1600/assembler.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;217&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqnGAw_a7PcYSTqAIKrlqo16COwVyy_R1LwGTLb-CbiLwj7TuvU_WslCjzjI9qRUHCMF-_0ENucN_c2GVueSziPS4efdqoWtdMbEbF_vftBj3KwBeU_-vah4lxa2ZXmTNfB-Y_LxResvk/s640/assembler.png&quot; width=&quot;640&quot; alt=&quot;assembly language execution&quot; /&gt;&lt;/a&gt; &lt;/div&gt;
&lt;h3&gt;
&lt;em&gt;Step 1&lt;/em&gt;&lt;/h3&gt;
&lt;p style=&quot;padding-left: 10px;&quot;&gt;Text-editor is used by the programmer  who produces the source file as an ASCII text file.&lt;/p&gt;
&lt;h3&gt;
&lt;em&gt;Step 2&lt;/em&gt;&lt;/h3&gt;
&lt;p style=&quot;padding-left: 10px;&quot;&gt;Source file is then used by the  assembler that produces machine language translation of a program known as  object file. Other than this it produces the listing file, if any error occurs  it goes back to the step1.&lt;/p&gt;
&lt;h3&gt;
&lt;em&gt;Step 3&lt;/em&gt;&lt;/h3&gt;
&lt;p style=&quot;padding-left: 10px;&quot;&gt;The linker checks the program in the  object file, that whether there is a library call or not. If present, linker  provides procedure from the library and combines it to object file. This  results in making the execution file.&lt;/p&gt;
&lt;h3&gt;
&lt;em&gt;Step 4&lt;/em&gt;&lt;/h3&gt;
&lt;p style=&quot;padding-left: 10px;&quot;&gt;Finally the programs begin to execute  when the loader reads the executable file into the memory and pointing the CPU  to programs starting address.&lt;/p&gt;
&lt;h2&gt;
Programs You Will Create&lt;/h2&gt;
&lt;p&gt;You will be able to write programs in  two general classes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Real Address Mode  (16-bit)&lt;/li&gt;
&lt;li&gt;Protected Mode  (32-bit)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
Real Address Mode (16-bit)&lt;/h3&gt;
&lt;p style=&quot;padding-left: 10px;&quot;&gt;Real mode programs run in Console  window of the OS (Operating System).&lt;/p&gt;
&lt;h3&gt;
Protected Mode (32-bit)&lt;/h3&gt;
&lt;p style=&quot;padding-left: 10px;&quot;&gt;Protected mode programs run in windows  and hence they are easy to write and understand.&lt;/p&gt;
&lt;h2&gt;
You Will Learn&lt;/h2&gt;
&lt;p&gt;In this tutorial, you will learn:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;About computer  architecture&lt;/li&gt;
&lt;li&gt;About Boolean  logic and its implementation&lt;/li&gt;
&lt;li&gt;&amp;nbsp;Management of memory in real and protected  mode programs&lt;/li&gt;
&lt;li&gt;Translation of  high level languages like C, C++, Java, etc. to assembly languages and then to  machine language.&lt;/li&gt;
&lt;li&gt;Representation of  different types of data like: integer, signed integer, real numbers, etc.&lt;/li&gt;
&lt;li&gt;Machine level  debugging of programs&lt;/li&gt;
&lt;li&gt;Interaction of  the application programs with the operating system, such as interrupt handlers,  etc.&lt;/li&gt;
&lt;li&gt;Creating &lt;a href=&quot;http://islandprogrammers.blogspot.com/&quot;&gt;assembly  language programs&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
</description><link>http://islandprogrammers.blogspot.com/2016/09/introduction-to-assembly-language.html</link><author>noreply@blogger.com (Maaz Ali)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqnGAw_a7PcYSTqAIKrlqo16COwVyy_R1LwGTLb-CbiLwj7TuvU_WslCjzjI9qRUHCMF-_0ENucN_c2GVueSziPS4efdqoWtdMbEbF_vftBj3KwBeU_-vah4lxa2ZXmTNfB-Y_LxResvk/s72-c/assembler.png" height="72" width="72"/><thr:total>0</thr:total></item></channel></rss>