OSDev.org

The Place to Start for Operating System Developers
It is currently Mon Apr 29, 2024 10:00 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: INT 0x13 AH=0x48 returned CF=1
PostPosted: Sat Sep 09, 2023 8:39 pm 
Offline

Joined: Mon May 01, 2023 5:56 pm
Posts: 1
I want to read disk parameters. This is my code:

Code:
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?


Top
 Profile  
 
 Post subject: Re: INT 0x13 AH=0x48 returned CF=1
PostPosted: Tue Sep 12, 2023 12:05 am 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5146
allen2010 wrote:
Code:
      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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: AlmaX3 and 21 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group