【 在 yehyeh.bbs@bbs.nsysu.edu.tw (yehyeh) 的大作中提到: 】
: as title!!
若是指讓它推出或吸入的話..
#include <bios.h>
#include <dos.h>
void open(int driver,void *header);
typedef struct {
char length;
char subunicode;
char commandcode;
int status;
}rh;
typedef struct {
rh r;
char mdb;
void far *address;
int size;
int ssn;
}ioctlo;
void main(void) {
int drive=4;
char opend=0;
ioctlo o;
o.r.length=13;
o.r.subunicode=drive;
o.r.commandcode=12;
o.mdb=0;
o.address=(void far*)&opend;
o.size=1;
open(drive,&o);
}
void open(int driver,void *header) {
union REGS inregs;
struct SREGS segregs;
inregs.x.ax=0x1510;
inregs.x.cx=driver;
inregs.x.bx=FP_OFF(header);
segregs.es=FP_SEG(header);
int86x(0x2f,&inregs,&inregs,&segregs);
}
--
※ 來源:‧TKU CS BBS bbs.cs.tku.edu.tw‧[FROM: pc7.adsl94a.tku]