Page 1 of 1

INT 0x13 AH=0x48 returned CF=1

Posted: Sat Sep 09, 2023 8:39 pm
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?

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

Posted: Tue Sep 12, 2023 12:05 am
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.