8
http://www.thaiall.com/assembly Page: 1 โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ inkey.com โโโโโโโโโโโโโโโโโ โโโโโโโ โโโโโโ http://www.nation.ac.th โโ.โโโโโโโโ โโโโโโโโโโโ . ปปปปปปปป 19

โครงสร้างคอมพิวเตอร์ และภาษาแอสเซมบลี้

  • Upload
    neal

  • View
    41

  • Download
    0

Embed Size (px)

DESCRIPTION

โครงสร้างคอมพิวเตอร์ และภาษาแอสเซมบลี้. inkey.com. ผศ.บุรินทร์ รุจจนพันธุ์ . ปรับปรุง 1 9 ตุลาคม 2555. มหาวิทยาลัยเนชั่น จังหวัดลำปาง http://www. nation.ac.th. inkey.com คืออะไร. - PowerPoint PPT Presentation

Citation preview

Page 1: โครงสร้างคอมพิวเตอร์ และภาษาแอสเซมบลี้

http://www.thaiall.com/assembly Page: 1

โครงสร�างคอมพิ�วเตอร� และภาษาแอสเซมบล��

inkey.com

มหาว�ทยาล�ยเนชั่� น จั�งหว�ดล#าปางhttp://www.nation.ac.th

ผศ.บ'ร�นทร� ร'จัจันพิ�นธุ์'� .

ปรั�บปรั�ง 1 9ตุ�ลาคม 2555

Page 2: โครงสร้างคอมพิวเตอร์ และภาษาแอสเซมบลี้

http://www.thaiall.com/assembly Page: 2

inkey.com ค)ออะไร โปรแกรมร�บค,าจัากแป-นพิ�มพิ�แบบไม,แสดงผล แต, Batch File สามารถตรวจัสอบค,า Error Level ได�จัากการกดแป-นพิ�มพิ� โปรแกรมน��สร�างขึ้0�นอย,างง,าย ๆ ด�วยโปแกรม Debug ซ0 งม�ค#าส� งเร�ยนกใชั่� Interrupt ท� 21

จัากบร�การ AH=08 และ AH=4C จั0งน#ามาประย'กต�ใชั่�เป3นเมน4ใน Batch File ได�อย,างม�ประส�ทธุ์�ภาพิ ในโปรแกรมเมน4ย'ค DOS

ขึ้�อม4ลจัาก http://www.thaiall.com/assembly/inkey.htm

Page 3: โครงสร้างคอมพิวเตอร์ และภาษาแอสเซมบลี้

http://www.thaiall.com/assembly Page: 3

สร�าง inkey.com (1/3)DOS>debug-n inkey.com-e 0100 b4 08 cd 21 b4 4c cd 21-rcx:0008-w-q

Page 4: โครงสร้างคอมพิวเตอร์ และภาษาแอสเซมบลี้

http://www.thaiall.com/assembly Page: 4

สร�าง inkey.com (2/3)DOS>copy con inkey.scrn inkey.come 0100 b4 08 cd 21 b4 4c cd 21rcx0008wq^ZDOS>debug < inkey.scr

Page 5: โครงสร้างคอมพิวเตอร์ และภาษาแอสเซมบลี้

http://www.thaiall.com/assembly Page: 5

สร�าง inkey.com (3/3)DOS>debug-n inkey.com-amov ah,08int 21hmov ah,4cint 21h-rcx:0008-w-q

Page 6: โครงสร้างคอมพิวเตอร์ และภาษาแอสเซมบลี้

http://www.thaiall.com/assembly Page: 6

แสดงภาษา ASSEMBLY ขึ้อง inkey.comMOV AH,08

INT 21MOV AH,4CINT 21

ขึ้�อม4ลจัาก http://www.thaiall.com/assembly/register.htm

Page 7: โครงสร้างคอมพิวเตอร์ และภาษาแอสเซมบลี้

http://www.thaiall.com/assembly Page: 7

สร�าง menu1.bat cls inkey.comif errorlevel 97 if not errorlevel 98 goto okgoto end:okdir /wgoto end:endecho bye bye

Page 8: โครงสร้างคอมพิวเตอร์ และภาษาแอสเซมบลี้

http://www.thaiall.com/assembly Page: 8

สร�าง menu2.bat @echo off:menucls echo a: direcho 0: byeinkey.comif errorlevel 65 if not errorlevel 66 goto dodirwif errorlevel 97 if not errorlevel 98 goto dodirwif errorlevel 48 if not errorlevel 49 goto endgoto menu:dodirwdir /wgoto end:endecho bye bye