INT 0x13 AH=0x48 returned CF=1

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
allen2010
Posts: 1
Joined: Mon May 01, 2023 5:56 pm

INT 0x13 AH=0x48 returned CF=1

Post by allen2010 »

I want to read disk parameters. This is my code:

Code: Select all

int13ah48:
		MOV		DWORD [0xc000],0
		MOV		DWORD [0xc004],0
		MOV		DWORD [0xc008],0
		MOV		DWORD [0xc016],0
		MOV		AH,0x48
		MOV		DL,0x80
		MOV		CX,0
		MOV		DS,CX
		MOV		SI,0xc000
		
		INT		0x13
		JC		fin
		MOV		[0xc000],AH
int13ok:
		RET

fin:
		JMP		fin
I ran it on VMware and Bochs, CF set and AH set to 0x1. Why?
Octocontrabass
Member
Member
Posts: 5560
Joined: Mon Mar 25, 2013 7:01 pm

Re: INT 0x13 AH=0x48 returned CF=1

Post by Octocontrabass »

allen2010 wrote:

Code: Select all

		MOV		DWORD [0xc000],0
You need to tell the BIOS how big your buffer is. The minimum buffer size is 26 (0x1A) bytes. You're telling the BIOS your buffer is 0 bytes.
Post Reply