• Welcome to Valhalla Legends Archive.
 

int 13h returns 0Eh?

Started by brew, January 07, 2008, 06:31 PM

Previous topic - Next topic

brew

According to some documentation i have, 0x0E means "control data address mark detected (hard disk)". What does this mean? How do I fix it? Here's my code:

readdisk:
mov ah, 2 ;2 = read, 3 = write
mov al, 1 ;# of sectors
mov ch, 1 ;low 8 bits of cylinder #
mov cl, 1 ;sector # 1-63 (bits 0-5), 6-7 hard disk only
mov dh, 1 ;head number
mov dl, 80h  ;drive # (bit 7 set for hard disk)
mov bx, 8000h ;es:bx data buffer
int 13h
ret
<3 Zorm
Quote[01:08:05 AM] <@Zorm> haha, me get pussy? don't kid yourself quik
Scio te esse, sed quid sumne? :P

Joe[x86]

int 13h retuns Eh? I think your computer is Canadian, 0Eh?!
Quote from: brew on April 25, 2007, 07:33 PM
that made me feel like a total idiot. this entire thing was useless.

brew

Quote from: Joex86] link=topic=17256.msg175804#msg175804 date=1200332453]
int 13h retuns Eh? I think your computer is Canadian, 0Eh?!
Do you think you can try to make an intelligent post at least once in a while?
<3 Zorm
Quote[01:08:05 AM] <@Zorm> haha, me get pussy? don't kid yourself quik
Scio te esse, sed quid sumne? :P

Warrior

Quote from: brew on January 14, 2008, 11:48 AM
Quote from: Joex86] link=topic=17256.msg175804#msg175804 date=1200332453]
int 13h retuns Eh? I think your computer is Canadian, 0Eh?!
Do you think you can try to make an intelligent post at least once in a while?

same could be said for you tbh

You and Joe are perfect for each other.
Quote from: effect on March 09, 2006, 11:52 PM
Islam is a steaming pile of fucking dog shit. Everything about it is flawed, anybody who believes in it is a terrorist, if you disagree with me, then im sorry your wrong.

Quote from: Rule on May 07, 2006, 01:30 PM
Why don't you stop being American and start acting like a decent human?

brew

#4
Getting back on topic...

I never did fix that.

mov ax, 0201h
mov cx, 2
mov dx, 0
push ds
pop es
mov bx, 8000h
int 13h

add al, 30h
mov bx, 0F00h
mov ah, 0Eh
int 10h

As you can see, i actually give es the value of ds (it uses es:bx for the buffer).
It's more correct then my other code was, but doesn't matter because it still gets AN error.
This time, just not 0Eh. it's 01h now, which is "invalid parameter". Honestly, wtf here is invalid? I don't get it.
ah = 2, the function
al = 1, the number of sectors to read
ch = 0, the same cylinder
cl = 2, the sector i want to read
dl = 0, drive
dh = head, that's 0 too.

I tried adding some more code past my first times statement, then times 1024-($-$$) db 0. It works just like i want it to...
| 512 chunk | ;mbr
| 512 chunk | ;what i'm loading
in the same file.
A typical 1.44 mb floppy's disk geometry is like so:
80 cylinders
2 heads, obviously. 1 front and 1 back.
and 18 sectors.

So, an address such as (0, 0, 2) would refer to the 2nd 512 chunk, right?
Which is what i'm trying to read.

EDIT**
shit, i'm just stupid. the return code is in ah not al : (
it worked fine in the first place.
<3 Zorm
Quote[01:08:05 AM] <@Zorm> haha, me get pussy? don't kid yourself quik
Scio te esse, sed quid sumne? :P