Question: The multiplication program of Table 6-14 is not initialized. After the program is executed once, location CTR will be left with zero. Show that if

The multiplication program of Table 6-14 is not initialized. After the program is executed once, location CTR will be left with zero. Show that if the program is executed again starting from location 100, the loop will be traversed 65536 times. Add the needed instructions to initialize the program.

Table 6-14TABLE 6-14 Program to Multiply Two Positive Numbers ORG 100 CLE LDA Y CIR STA Y SZE LOP, ONE, ZRO, CTR, X, Y,

TABLE 6-14 Program to Multiply Two Positive Numbers ORG 100 CLE LDA Y CIR STA Y SZE LOP, ONE, ZRO, CTR, X, Y, P, BUN ONE BUN ZRO LDA X ADD P STA P CLE LDA X CIL STA X ISZ CTR BUN LOP HLT DEC -8 HEX 000F HEX 000B HEX 0 END /Clear E /Load multiplier Transfer multiplier bit to E /Store shifted multiplier /Check if bit is zero /Bit is one; go to ONE /Bit is zero; go to ZRO /Load multiplicand /Add to partial product /Store partial product /Clear E /Load multiplicand /Shift left /Store shifted multiplicand Increment counter /Counter not zero; repeat loop /Counter is zero; halt This location serves as a counter /Multiplicand stored here /Multiplier stored here /Product formed here

Step by Step Solution

3.31 Rating (148 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To initialize the multiplication program so that it can be executed multiple times without the need ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

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

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Computer System Architecture Questions!