1 / 16

Pertemuan 5 Struktur program bahasa rakitan

Pertemuan 5 Struktur program bahasa rakitan. Matakuliah : T0483 / Bahasa Rakitan Tahun : 2005 Versi : 1.0. Learning Outcomes. Pada akhir pertemuan ini, diharapkan mahasiswa akan mampu : menjelaskan perbedaan penulisan program dalam bentuk COM dan EXE

ena
Télécharger la présentation

Pertemuan 5 Struktur program bahasa rakitan

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Pertemuan 5Struktur program bahasa rakitan Matakuliah : T0483 / Bahasa Rakitan Tahun : 2005 Versi : 1.0

  2. Learning Outcomes Pada akhir pertemuan ini, diharapkan mahasiswa akan mampu : • menjelaskan perbedaan penulisan program dalam bentuk COM dan EXE • mendemonstrasikan program bahasa rakitan dalam bentuk COM dan EXE

  3. Outline Materi • Struktur program .Com • Struktur program .Exe • Kelebihan dan kekurangan program .Com dgn .Exe

  4. <<ISI>> Struktur Program  .com dgn "Standard SegmentDirective" • Contoh Struktur / Layout - 1 code segment assume cs:code, ds:code, ss:code org 100h main proc near start: mov ah,9 mov dx,offset mesg int 21h ; display mesage ret ; quit mesg db 'Hello, Binusian',10,13,'$' main endp code ends end start

  5. <<ISI>> Struktur Program  .com dgn "Standard SegmentDirective" • Contoh Struktur / Layout - 2 code segment          assume cs:code, ds:code, ss:code          org 100h start:;display message          mov ah,9          mov dx,offset mesg          int 21h;quit          int 20h ;khusus untuk .com;data areamesg   db 'Hello, Binusian',10,13,'$'code ends          end start

  6. <<ISI>> • Struktur Program  .com dgn "Standard SegmentDirective“ • Contoh Struktur / Layout – 3 code segment          assume cs:code, ds:code, ss:code          org 100h start:;display message          mov ah,9          mov dx,offset mesg          int 21h;quitmov ah,4ch          int 21h ;data areamesg   db 'Hello, Binusian',10,13,'$'code ends          end start

  7. <<ISI>> • Cara mengkompile / menjalankan Program, (dengan Turbo Assembler)Ketik program diatas dan kemudian simpan dengan nama "myprogcom.asm". C> Tasm   myprogcom.asm C>Tlink  /T myprogcom.obj

  8. <<ISI>> Struktur Program  .exe dengan menggunakan "Standard Segment Directive" Contoh Struktur / Layout - 1 data    segment mesg   db 'Hello, Binusian',10,13,'$' data    ends code    segment         assume cs:code, ds:data, ss:_stack main   proc far start:        push ds        xor ax,ax       push ax       mov ax,data ;; ;set up DS       mov ds,ax      mov ah,9 ;; ;display message       mov dx,offset mesg       int 21h       ret ;; ;quit main  endp code ends       end start

  9. <<ISI>> Contoh Struktur / Layout - 2 _stack segment stack db 250 dup(0) _stack ends data segment mesg db 'Hello, Binusian',10,13,'$' data ends code segment assume cs:code, ds:data, ss:_stack start: mov ax,data ;; ;set up DS mov ds,ax mov ah,9 ;; ;display message mov dx,offset mesg int 21h mov ah,4ch ;; ;quit int 21h code ends end start

  10. <<ISI>> • Cara mengkompile / menjalankan Program, (dengan Turbo Assembler)Ketik program diatas dan kemudian simpan dengan nama "myprogcom.asm". C> Tasm   myprogcom.asm C>Tlink  myprogcom.obj

  11. <<ISI>> Struktur Program .comdengan menggunakan "Simplified Segment Directive" Contoh Struktur / Layout - 1 DOSSEG .Model Tiny .Code org 100h start: ;display message mov ah,9 mov dx,offset mesg int 21h ;quit int 20h ;data area mesg db 'Hello, Binusian',10,13,'$' end start

  12. <<ISI>> • Contoh Struktur / Layout - 2 DOSSEG .Model Tiny .Code org 100h start: mov ah,9;display message mov dx,offset mesg int 21h mov ah,4ch;quit int 20h ;data area mesg db 'Hello, Binusian',10,13,'$' end start

  13. <<ISI>> Cara mengkompile / menjalankan Program, (dengan Turbo Assembler) Ketik program diatas dan kemudian simpan dengan nama "myprogcom.asm". C> Tasm myprogcom.asm C>Tlink /t myprogcom.obj

  14. <<ISI>> Struktur Program .EXEdengan menggunakan "Simplified Segment Directive" Contoh Struktur / Layout DOSSEG .Model Small .Stack 100h .Data mesg db 'Hello, Binusian',10,13,'$' .Code start: mov ax,@data;set up DS mov ds,ax mov ah,9;display message mov dx,offset mesg int 21h mov ah,4ch ; ;quit int 21h end start

  15. <<ISI>> Cara mengkompile / menjalankan Program, (dengan Turbo Assembler) Ketik program diatas dan kemudian simpan dengan nama "myprogcom.asm". C> Tasm myprogcom.asm C>Tlink myprogcom.obj

  16. << CLOSING>>

More Related