'$INCLUDE: 'qb.bi'
DIM SHARED ax, bx, cx, dx, es
buff$ = SPACE$(512) 'set the disk buffer
bx = SADD(buff$) 'get the buffer offset address
es = VARSEG(buff$) 'get the segment address of the buffer
OPEN "savehd.dat" FOR BINARY AS #1
ax = &H201
cx = 1
dx = &H80
int13 ' call interrupt 13
PUT #1, , buff$
CLOSE #1
PRINT "The hard disk master boot sector has been successfully saved to the file SAVEHD.DAT!"
END
SUB int13
InRegs.ax = ax
InRegs.bx = bx
InRegs.cx = cx
InRegs.dx = dx
InRegs.es = es
INTERRUPTX &H13, InRegs, OutRegs
ax = OutRegs.ax
bx = OutRegs.bx
cx = OutRegs.cx
dx = OutRegs.dx
es = OutRegs.es
END SUB
This program was written in qb4.5 and tested OK!
Hope everyone will give it lots of support!
DIM SHARED ax, bx, cx, dx, es
buff$ = SPACE$(512) 'set the disk buffer
bx = SADD(buff$) 'get the buffer offset address
es = VARSEG(buff$) 'get the segment address of the buffer
OPEN "savehd.dat" FOR BINARY AS #1
ax = &H201
cx = 1
dx = &H80
int13 ' call interrupt 13
PUT #1, , buff$
CLOSE #1
PRINT "The hard disk master boot sector has been successfully saved to the file SAVEHD.DAT!"
END
SUB int13
InRegs.ax = ax
InRegs.bx = bx
InRegs.cx = cx
InRegs.dx = dx
InRegs.es = es
INTERRUPTX &H13, InRegs, OutRegs
ax = OutRegs.ax
bx = OutRegs.bx
cx = OutRegs.cx
dx = OutRegs.dx
es = OutRegs.es
END SUB
This program was written in qb4.5 and tested OK!
Hope everyone will give it lots of support!




???