AutoCAD 3DMAX C语言 Pro/E UG JAVA编程 PHP编程 Maya动画 Matlab应用 Android
Photoshop Word Excel flash VB编程 VC编程 Coreldraw SolidWorks A Designer Unity3D
 首页 > 汇编语言

汇编源码--cdcheck

51自学网 2015-09-08 http://www.51zixue.net
.model small		; It's a flaw of mine ... I really like this model			; I know I should do a .com with the tiny model.. 			; but I just love the small :>.stack 100h		; Plenty stack ;>.386.data         info db 30 dup (0)right db 'Right CD$'wrong db 'Wrong CD$'nomscdex db 'MSCDEX not installed$'.codemov ax, @data            ; Make DS&ES point to the DATAmov ds,axmov es,axlea edx, nomscdexxor ebx,ebxmov eax, 1500h		; MSCDEX installed?int 2fhtest ebx,ebxjz exit			mov edi,10hnextloop:mov ecx,edimov ax, 150bh		; is drive ECX supported by MSCDEX (is it a cdrom?)int 2fhtest ax,ax		; ax!=0 if drive is CDromjz continiuemov ax, 440dhmov dx, offset infomov bl,5mov ch,8mov cl,66hint 21h			; Fetch volume serial number (same as when you do dir)mov eax, dword ptr [info+2]cmp eax, 0ffb7f724h; 	;<<<<calibrate this to fit your own "right" CDjnz continiuelea edx, rightjmp exitcontiniue:dec edi			; next drivejnz nextlooplea edx, wrong		; not in any drive!exit:mov ah, 9hint 21hmov ax,4c00h           		; terminate!int 21hend

 

 

 
上一篇:汇编源码--chips  下一篇:汇编源码--DOSMAC