![]() |
|
#1
|
|||
|
|||
CDROM eject and insert...;;================================================ =======
.model tiny .code Go: mov byte Job,00h ; open the door jmp short GetDrive GetDrive: mov al,device ; get second char on command line mov device,ax ; put in device JustDoIt: mov bx,offset ioctlo ; Do the I/O mov [bx+16],ds ; data seg mov cx,device ; push cx mov ax,1510h ; int 2Fh ; mov bx,offset ioctlo ; mov dx,[bx+3] ; status xor ax,ax ; assume no error test dx,8000h ; jz short NoRetErr ; mov al,02h ; other error NoRetErr: inc cx push cx test dx,20h ; cmp cx,5Ah je short NotBuzyo ; mov al,01h ; busy error xor ax,ax xor bx,bx xor dx,dx testIT: pop cx mov device,cx jmp short Go NotBuzyo: mov ah,4Ch ; Exit program, close files int 21h ; and return to DOS device dw 00h ; 3 = D:, 4 = E:, etc. Job db 0 ; cc (00 = Open it, 05 = close it) ioctlo db 13,0,12 ; rhlen,subu,comc dw 00h ; status dup 8,0 ; reserved db 0 ; mdb dw offset Job ; *trandad (off) dw 00h ; *trandad (seg) dw 01h,00h ; tranct,ssn dw 00h,00h ; *volid .end ;================================================= ======== can somebody help me...this code is only for ejecting the cd rom tray..i want to add a code for inserting bak the cd tray but i dont know what code to put.... thanks in advance for your help!!!!=D |
|||
Recent GIDBlog
Configuring iptables for Webmin Servers Index Module by gidnetwork
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Network Sites: GIDNetwork · GIDApp · GIDSearch · Learning Journal by J de Silva, The