Move r0r1 dec r1 jic loop1 jmp fin loop1 add r1r0r0

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: P1 JMP FIN LOOP1: ADD R1,R0;R0 DEC R1 JIC LOOP1 MOVE R0;R1 MOVE R0;R2 DEC R2 JIC GO JMP FIN GO: DEC R2 JIC LOOP2 JMP FIN LOOP2: ADD R0,R1;R0 DEC R2 JIC LOOP2 FIN: END INSTRUCTION CODE 16 15 14 13 12 11 10 9 8 76 00 000 10 00 00 00 000 01 01 01 00 000 00 11 11 00 001 10 00 10 00 001 00 10 01 00 000 00 11 00 00 000 00 11 11 00 001 10 00 10 00 000 01 01 01 00 000 01 01 01 00 000 00 11 11 00 001 10 01 10 00 001 00 10 01 00 000 00 11 11 00 001 10 10 00 00 001 00 10 01 00 000 00 11 00 00 000 00 11 11 00 001 10 10 00 11 110 00 01 11 5 0 0 1 1 1 1 1 1 0 0 1 1 1 1 0 1 1 1 0 1 4 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 3 0 0 1 0 0 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 2 0 0 0 0 0 0 0 0 0 1 1 0 0 1 0 0 0 1 0 0 1 0 1 1 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 HEX CODE 0: 1: 2: 3: 4: 5: 6: 7: 8: 9: A: B: C: D: E: F: 16: 17: 18: 19: HEX CODE 0400 02A1 01F5 0C50 0930 0194 01F5 0C50 02A1 02A2 01FA 0CD0 0930 01FA 0D00 0930 0194 01FA 0D00 F0F0 Q5 LABEL INSTRUCTION INP MOVE R0;R1 INP MOVE R0;R2 DEC R1 JIC GO JMP RST GO: DEC R1 JIC LOOP JMP FIN LOOP: ADD R2,R0;R0 DEC R1 JIC LOOP JMP FIN RST: CLR RO FIN: END INSTRUCTION CODE 16 15 14 13 12 11 10 9 8 76 00 000 10 00 00 00 000 01 01 01 00 000 10 00 00 00 000 01 01 01 00 000 00 11 11 00 001 10 00 11 00 001 00 01 11 00 000 00 11 11 00 001 10 01 01 00 001 00 01 11 00 000 00 11 00 00 000 00 11 11 00 001 10 01 01 00 001 00 01 11 00 000 01 00 01 11 110 00 01 11 5 0 0 0 0 1 1 0 1 0 1 1 1 0 1 1 1 4 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 3 0 0 0 0 1 0 0 1 0 0 0 1...
View Full Document

Ask a homework question - tutors are online