03-Instruction Sets - RISC vs CISC

03-Instruction Sets - RISC vs CISC - IKI10230 Pengantar...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
1 IKI10230 Pengantar Organisasi Komputer Kuliah no. 4: CISC vs. RISC Instruction Sets 12 Maret 2003 Bobby Nazief ([email protected]) Qonita Shahab ([email protected]) bahan kuliah: http://www.cs.ui.ac.id/kuliah/iki10230/ Sumber : 1. Hamacher. Computer Organization , ed-5. 2. Materi kuliah CS61C/2000 & CS152/1997, UCB.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Review: Jenis-jenis Operasi Data Transfers memory-to-memory move register-to-register move memory-to-register move integer (binary + decimal) or FP Add, Subtract, Multiply, Divide not, and, or, set, clear shift left/right, rotate left/right Program Sequencing & Control unconditional, conditional Branch call, return trap, return Synchronization String search, translate Graphics (MMX) parallel subword ops (4 16bit add) Input/Output Transfers register-to-i/o device move
Background image of page 2
3 Review: Modus Pengalamatan (1/2) Jenis Syntax Effective Address 1. Immediate: #Value ; Operand = Value Add #10 ,R1 ; R1 [R1] + 10 2. Register: Ri ; EA = Ri Add R2 ,R1 ; R1 [R1] + [ R2 ] 3. Absolute (Direct): LOC ; EA = LOC Add 100 ,R1 ; R1 [R1] + [ 100 ] 4. Indirect-Register: (Ri) ; EA = [Ri] Add (R2) ,R1 ; R1 [R1] + [ [R2] ] Indirect-Memory: (LOC) ; EA = [LOC] Add (100) ,R1 ; R1 [R1] + [ [100] ]
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 Review: Modus Pengalamatan (2/2) 5. Index: X(R2) ; EA = [R2] + X Add 10(R2) ,R1 ; R1 [R1] + [ [R2]+10 ] Base+Index: (R1,R2) ; EA = [R1] + [R2] Add (R1,R2) ,R3 ; R3 [R3] + [ [R1]+[R2] ] Base+Index+Offset: X(R1,R2) ; EA = [R1] + [R2] + X Add 10(R1,R2) ,R3 ; R3 [R3] + [ [R1]+[R2]+10 ] 6. Relative: X(PC) ; EA = [PC] + X Beq 10 ; if (Z==1) then PC [PC]+10 7. Autoincrement: (Ri)+ ; EA = [Ri], Increment Ri Add (R2)+ ,R1 ; R1 [R1] + [ [R2] ], ; R2 [R2] + d 8. Autodecrement: -(Ri) ; Decrement Ri, EA = [Ri] Add -(R2) ,R1 ; R2 [R2] – d , ; R1 [R1] + [ [R2] ]
Background image of page 4
5 Solusi PR #1 ° 2.8 A x X + C x D pada single-accumulator processor Load A Multiply B ; Accumulator = A x B Store X ; X can be A, B, or others except C or D Load C Multiply D ; Accumulator = C x D Add X ; Accumulator = A x B + C x D
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
6 Solusi PR #1 ° 2.9 Jumlah nilai dari N siswa, J tes; J >> jumlah register Move #SUM,R0 ; R0 points to SUM Move J,R1 ; R1 = j Move R1,R2 Add #1,R2 Multiply #4,R2 ; R2 = (j + 1)*4 Lj: Move #LIST,R3 ; R3 points to first student Move J,R4 Sub R1,R4 ; R4: index to particular test of first student Multiply #4,R4 Add R4,R3 ; R3 points to particular test of first student Move N,R4 ; R4 = n Clear R5 ; Reset the accumulator Ln: Add (R3),R5 ; Accumulate the sum particular test Add R2,R3 ; R3 points to particular test of next student Decrement R4 Branch>0 Ln ; Iterate for all students Move R5,(R0) ; Store the sum of particular test Add #4,R0 ; R0 point to sum of the next test Decrement R1 Branch>0 Lj ; Iterate for all tests
Background image of page 6
7 Solusi PR #1 ° 2.10 (a) Dot product ” pada arsitektur Load/Store Move #AVEC,R1 ; R1 points to vector A. Move
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/09/2012 for the course ECE 565 taught by Professor Lee during the Spring '11 term at IUP.

Page1 / 41

03-Instruction Sets - RISC vs CISC - IKI10230 Pengantar...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online