本文介绍了在弹出汇编语言CD /光驱的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这不可能是简单的,但并不做什么改变。

This couldn't have been simpler, but isn't budging.

我有我使用的是看,如果光驱将弹出一个简单的code

I have a simple code that I'm using to see if the optical drive will eject

在code是用汇编语言,英特尔NASM的语法。

The code is in assembly language, intel nasm syntax.

[BITS 16]
[ORG 0X07C00]
STI

Eject:

mov ah, 46h
mov al, 00h
mov dl, 00h
int 13h

endprogram:
times 510-($-$$) db 0
db 0x55
db 0xAA

我可以简单地增加驱动器号,但应该不是这个工作,如果正确的驱动器为0?可以在驱动器开始的地方约128十进制

I could simply increase the drive number, but shouldn't this work correctly if the drive was 0? may be the drive start somewhere around 128 decimal

谢谢,

推荐答案

有不出现任何标准化BIOS中断以喷射来自驱动的CD。所以,基本上,你有很多的工作,如果你要这个功能做的。你需要写一个ATA驱动器和送出去的原始命令强制光驱弹出。

There does not appear to be any standardized BIOS interrupt to eject a CD from a drive. So, basically, you have a lot of work to do if you want this feature. You'll need to write an ATA driver and send out the raw commands to force the CD drive to eject.

这需要的不仅仅是它的声音,虽然多很多。你必须检测ATA驱动器,他们筛选出的CD驱动器,然后发送命令。

This entails a lot more than it sounds though. You have to detect the ATA drives, filter them out to the CD drive, and then send the command.

您将需要检查OSDev的,和他们的

You'll need to check out OSDev's ATA article and their ATAPI article

这篇关于在弹出汇编语言CD /光驱的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-12 12:25