Valhalla Legends Forums Archive | Assembly Language (any cpu) | int 13h returns 0Eh?

AuthorMessageTime
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:
[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
[/code]
January 8, 2008, 12:31 AM
JoeTheOdd
int 13h retuns Eh? I think your computer is Canadian, 0Eh?!
January 14, 2008, 5:40 PM
BreW
[quote author=Joe[x86] link=topic=17256.msg175804#msg175804 date=1200332453]
int 13h retuns Eh? I think your computer is Canadian, 0Eh?!
[/quote]
Do you think you can try to make an intelligent post at least once in a while?
January 14, 2008, 5:48 PM
Quarantine
[quote author=brew link=topic=17256.msg175806#msg175806 date=1200332881]
[quote author=Joe[x86] link=topic=17256.msg175804#msg175804 date=1200332453]
int 13h retuns Eh? I think your computer is Canadian, 0Eh?!
[/quote]
Do you think you can try to make an intelligent post at least once in a while?
[/quote]

same could be said for you tbh

You and Joe are perfect for each other.
January 14, 2008, 9:00 PM
BreW
Getting back on topic...

I never did fix that.
[code]
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
[/code]
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.
January 25, 2008, 12:27 AM

Search