

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Notes; Class: Computer Organization; Subject: Computer Engineering; University: Wright State University-Main Campus; Term: Fall 2004;
Typology: Study notes
1 / 3
This page cannot be seen from the preview
Don't miss anything!


Option 1: D0 = 10; D0 = D0 - 2; while (D0 >= 0) { D1 = D1 + 1; D0 = D0 - 2; }
Option 2: D0 = 10; while (D0 - 2 >= 0) { D1 = D1 + 1; D0 = D0 - 2; }
Fall, 2004
Option 1 (total of 10 words in the loop): MOVE.W #0, D CLR.L D LOOP CMP #7, D BGE ENDLOOP ADD #2, D ADD #1, D BRA LOOP ENDLOOP NOP
Option 2 (total of 6 words in the loop): MOVE.W #7, D CLR.L D LOOP BLE ENDLOOP ADDQ #2, D SUBQ #1, D BRA LOOP ENDLOOP NOP
Option 3 (total of 4 words in the loop): MOVE.W #7, D CLR.L D LOOP ADDQ #2, D SUBQ #1, D BGT LOOP ENDLOOP NOP