What conditions make int 13h function 0x43 fail

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
d2alphame
Member
Member
Posts: 35
Joined: Fri May 04, 2012 8:04 am

What conditions make int 13h function 0x43 fail

Post by d2alphame »

I'm wondering what conditions can make int 13h function 0x43 (Extended Write sectors function) to fail. Int 13h here doesn't seem to execute at all. Here's the failing code (I'm using nasm)

Code: Select all

        mov ax, cs
	mov ds, ax
	mov es, ax


	mov si, DISK_ACCESS_STRUCTURE			; Location of the Disk Access Structure
	mov ah, 0x43				         	; Extended function for writing sectors
	mov dl, 0x80					        ; Write to the First Hard drive

	int 13h						        ; Low Level Disk Services


here's the DISK_ACCESS_STRUCTURE

Code: Select all


align 8							; Align the following data on an 8 byte boundary
DISK_ACCESS_STRUCTURE:

		DAP_SIZE: db 0x10
		DAP_UNUSED: db 0x00
		DAP_SECTOR_COUNT: dw 2
		DAP_OFFSET: dw KEKEREOS_BINARY
		DAP_SEGMENT: dw 0x9C0
		DAP_START_SECTOR: dq 0x00000000
Am I missing something?
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: What conditions make int 13h function 0x43 fail

Post by Combuster »

Am I missing something?
How about looking up the error code?
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Post Reply