Page 1 of 1

What conditions make int 13h function 0x43 fail

Posted: Mon Jan 13, 2014 1:48 pm
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?

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

Posted: Mon Jan 13, 2014 3:03 pm
by Combuster
Am I missing something?
How about looking up the error code?