Pengantar Organisasi Komputer - PowerPoint PPT Presentation

1 / 6
About This Presentation
Title:

Pengantar Organisasi Komputer

Description:

Computer Organization, ed-5. 3. Materi kuliah CS61C/2000 ... DEST, SRC: register-/memory-operand. salah satu dari DEST atau SRC harus berupa register-operand ... – PowerPoint PPT presentation

Number of Views:37
Avg rating:3.0/5.0
Slides: 7
Provided by: bobbyn4
Category:

less

Transcript and Presenter's Notes

Title: Pengantar Organisasi Komputer


1
IKI10230Pengantar Organisasi KomputerKuliah no.
05.x Tugas No. 1
Sumber1. Paul Carter, PC Assembly Language2.
Hamacher. Computer Organization, ed-53. Materi
kuliah CS61C/2000 CS152/1997, UCB4. Intel
Architecture Software Developers Manual
17 Maret 2004 L. Yohanes Stefanus
(yohanes_at_cs.ui.ac.id)Bobby Nazief
(nazief_at_cs.ui.ac.id) bahan kuliah
http//www.cs.ui.ac.id/kuliah/POK/
2
Tugas Pemrograman 1 Vector Add
  • CVEC AVEC Const BVEC
  • for (i 0 i lt vlength i)
  • CVECi AVECi Const BVECi
  • AVEC, BVEC, CVEC, Const, vlength disimpan di
    memori
  • Ukuran elemen vektor (AVECi, BVECi, CVECi),
    Const, vlength 4-byte (integer)

3
Instruksi ADD MUL
  • ADD DEST,SRC DEST ? SRC DEST
  • DEST, SRC register-/memory-operand
  • salah satu dari DEST atau SRC harus berupa
    register-operand
  • MUL SRC32 EDXEAX ? SRC32 EAX
  • MUL DWORD DATA
  • MUL EBX

4
Instruksi JNZ
  • mov ecx,Counter ecx serves as a counter.
  • L1
  • ...
  • dec ecx
  • jnz L1 if (ecx ! 0) then jump to L1

5
vector_add.asm
  • include "asm_io.inc
  • segment .data
  • initialized data is put in the data segment
    here
  • segment .bss
  • uninitialized data is put in the bss segment
  • segment .text
  • global _asm_main
  • _asm_main
  • enter 0,0 setup routine
  • pusha
  • code is put in the text segment. Do not modify
    the code before
  • or after this comment.
  • popa
  • mov eax, 0 return back to
    C
  • leave
  • ret

6
Kompilasi
  • nasm f coff vector_add.asm
  • gcc o vector_add.exe driver.c vector_add.o
    asm_io.o
Write a Comment
User Comments (0)
About PowerShow.com