.model small .data x1 db "type e or E to Exit",0ah,0dh,'$' .code pmain proc far ; can not change far to near push ds ; 1 of 5 line required for end .exe mov ax,0 ; 2 clear ax by xor ax,ax push ax ; 3 send ax to stack mov ax,@data mov ds,ax ; clear screen mov ax,0600h ; al หมายถึงจำนวนบรรทัดที่ว่าง mov bh,71h ; attribute ของบรรทัดว่าง น่าจะเป็นสี เพราะไม่กำหนด ตัวอักษรสีดำ mov cx,0000 ; มุมบนซ้าย mov dx,103fh ; มุมล่างขวา int 10h ; move cursor mov ah,02 ; กำหนดตำแหน่ง cursor mov bh,00 ; เลขหน้าเป็น 0 ถึงจะเริ่มบนสุด mov dh,02 ; เริ่มต้นบรรทัดที่ 2 ไม่กำหนด dl ก็ใช้ได้ int 10h finish: ret pmain endp end pmain |