งานนำเสนอกำลังจะดาวน์โหลด โปรดรอ

งานนำเสนอกำลังจะดาวน์โหลด โปรดรอ

CS344-321 Assembly Language Programming Period 7.

งานนำเสนอที่คล้ายกัน


งานนำเสนอเรื่อง: "CS344-321 Assembly Language Programming Period 7."— ใบสำเนางานนำเสนอ:

1 CS344-321 Assembly Language Programming Period 7

2 ตัวอย่าง 3.1 แสดงการเขียนโปรแกรมในรูปแฟ้ม.COM page,80 page,80 title Hello World Program title Hello World Program ; This program displays "Hello, world!" code_seg segment assume cs:code_seg,ds:code_seg assume cs:code_seg,ds:code_seg org 100h org 100hstart: mov ah,9 mov ah,9 lea dx,hello_message lea dx,hello_message int 21h int 21h mov ax,4c00h mov ax,4c00h int 21h int 21h hello_message db 'Hello, world!', 0dh, 0ah, '$' code_seg ends end start end start

3 ตัวอย่าง 3.1 แสดง listing 0000 code_seg segment assume cs:code_seg,ds:code_seg assume cs:code_seg,ds:code_seg 0100 org 100h 0100 start: 0100 B4 09 mov ah,9 0102 8D 16 010D R lea dx,hello_message 0106 CD 21 int 21h 0108 B8 4C00 mov ax,4c00h 010B CD 21 int 21h 010D 48 65 6C 6C 6F 2C hello_message db 'Hello, world!', 0dh, 0ah, '$’ 20 77 6F 72 6C 64 20 77 6F 72 6C 64 21 0D 0A 24 21 0D 0A 24 011D code_seg ends end start end start

4 วิธีเขียนโปรแกรม ใช้ edit ex3-1.asm แล้วเก็บไว้ใน disk c:>edit ex3-1.asm แปลด้วย assembler ได้.obj c:>masm ex3-1,ex3-1,ex3-1; หรือ asm หรือ tasm เชื่อมโยงด้วย linker ได้.exe c:> link ex3-1; หรือ val หรือ tlink เปลี่ยนเป็น.com c:>exe2bin ex3-1.exe ex3-1.com หรือ x2b หรือ tlink /t

5 วิ่งโปรแกรมc:>ex3-1 Hello, World! C:>

6 USING THE DEBUG PROGRAM USING THE DEBUG PROGRAMExample c:>debug ex3-1.com or c:>debug -n ex3-2.exe -n ex3-2.exe -l -l-d-u-r-t-p-g-q


ดาวน์โหลด ppt CS344-321 Assembly Language Programming Period 7.

งานนำเสนอที่คล้ายกัน


Ads by Google