.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  
|