|
-
Apr 11th, 2003, 03:44 AM
#1
Thread Starter
Frenzied Member
INT 13h and Debug->
I tried to get information about a diskdrive using
the "Get Current Drive Parameters Interrupt", this is the
code I executed using Debug:
Code:
MOV AH,08
MOV DL,00
INT 13
RET
Now this code should have returned information in
the register and in memory at address ES:BX.
There is no information in the registers however.
This program below should read one sector from
a disk and dump it into the video memory at B800:0.
I ran this program using Debug as well.
It uses the "Read Disk Sectors" interrupt.
Code:
MOV AH,02
MOV AL,01 Number of sectors to read.
MOV CH,00 Track.
MOV CL,01 Sector.
MOV DH,00 Head.
MOV DL,00 Drive to access.
MOV BX,B800
MOV ES,BX
MOV BX,0000
INT 13
RET
Except for the diskdrive becoming active for
a second (you can see the drive status light turn on)
Nothing seems to happen.
Did I do something wrong in the programs above and
if so what?
Debug by the way was started from Dos Mode in Windows 95
so it couldn't be Windows interfering.
The programs are based on information from Help Pc 2.10
by David Jurgens.
-
Jun 20th, 2003, 07:12 PM
#2
Fanatic Member
What information are you looking for?
-
Jun 21st, 2003, 07:27 AM
#3
Thread Starter
Frenzied Member
I am not sure what you mean, all I was trying to
do when was working in Debug was to access a disk
by using BIOS interrupts. Some how the interrupts don't work.
I posted the message hoping some one would know
why the interrupts aren't working.
-
Jun 22nd, 2003, 01:08 AM
#4
Fanatic Member
Now this code should have returned information in
the register and in memory at address ES:BX.
There is no information in the registers however.
There is always a number in the registers. It jus the matter of knowing if it is gibberish or not.
So, basically, what information are you using out of which registers for your INT13h function 08h?
"Can't" and "shouldn't" are two totally separate things.
All questions should be answered. All answers should be true. That is why I post.
-
Jun 22nd, 2003, 02:16 AM
#5
Thread Starter
Frenzied Member
Okay, I should have put it differently:
not "there is no information" but:
"The registers ES:BX contain the same data as before
I ran the program."
When I do a memory dump of the location specified
by ES:BX the data in memory is the same after
I run the program as before I ran the program.
When I enter the following debug command:
L 100 2 0 1
The first sector of my first harddisk will loaded at
DS:100.
After the L command the data in memory is different
from what it was before so it seems to be working.
Basically I am trying to do the same thing
as with L with my program.
-
Jun 22nd, 2003, 02:30 PM
#6
Fanatic Member
Well INT 13h function 08h gives the following:
BL Diskette type
CH High cylinder/ track number
CL Cyclinder number and high sector number
DH High head number
DL Number of drives attached to the controller
ES I For diskettes, the segment ffset address of an 11-byte diskette drive parameter table
Clears the Carry Flag if valid, sets if invalid.
Is that what you are using for your registers?
"Can't" and "shouldn't" are two totally separate things.
All questions should be answered. All answers should be true. That is why I post.
-
Jun 24th, 2003, 09:08 AM
#7
Thread Starter
Frenzied Member
Okay, I think I have been confusing things a little, .
Let's start over and forget what I said in previous posts:
I wrote this program in Debug and ran it:
Code:
MOV AH,02 Select interrupt function "Read Disk Sectors".
MOV AL,01 Number of sectors to read.
MOV CH,00 Track.
MOV CL,01 Sector.
MOV DH,00 Head.
MOV DL,00 Drive to access.
MOV BX,B800
MOV ES,BX
MOV BX,0000
INT 13 Load a sector into memory at ES:BX.
RET
This should have loaded a sector into memory, right?
Well as far as I can tell nothing was loaded.
Any idea as to why not?
Oh, like I mentioned before:
The program is based on information from Help Pc 2.10 by David Jurgens.
If you want to look at the information yourself
and don't have Help Pc, you can look for Helppc21.zip
on the internet.
-
Jul 15th, 2003, 03:36 PM
#8
Fanatic Member
Code:
MOV BX,B800
MOV ES,BX
MOV BX,0000
What are you trying to do with that?
Furthermore, function is:
"Can't" and "shouldn't" are two totally separate things.
All questions should be answered. All answers should be true. That is why I post.
-
Jul 16th, 2003, 04:32 AM
#9
Thread Starter
Frenzied Member
code:--------------------------------------------------------------------------------
MOV BX,B800
MOV ES,BX
MOV BX,0000
--------------------------------------------------------------------------------
What are you trying to do with that?
The "Load a sector into memory at ES:BX."
bit should tell you that. But anyway:
Code:
MOV BX,B800 Set segment address for buffer.
MOV ES,BX Move segment address into segment register.
MOV BX,0000 Set offset within segment for buffer.
Furthermore, function is:
code:--------------------------------------------------------------------------------
INT 13h
Debug assumes all numbers are hexadecimal
you can't specify otherwise as far as I know.
That is why I forgot to mention that all numbers
are hexadecimal.
-
Jul 16th, 2003, 03:57 PM
#10
Fanatic Member
Oops. Sorry. NASM on the brain.
Was the carry flag set after execution?
"Can't" and "shouldn't" are two totally separate things.
All questions should be answered. All answers should be true. That is why I post.
-
Jul 17th, 2003, 10:35 AM
#11
Thread Starter
Frenzied Member
Peter Swinkels
I tried writing my program to read sectors from the disk
in Nasm before I read this post. The program seemed to work
this time. I might have some questions later on though.
-
Jul 17th, 2003, 06:44 PM
#12
Fanatic Member
Here. I found this while exploring. I don't know if this interest you in any bit.
http://www.vbforums.com/showthread.p...hreadid=137625
"Can't" and "shouldn't" are two totally separate things.
All questions should be answered. All answers should be true. That is why I post.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|