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.
allen2010
Posts: 1 Joined: Mon May 01, 2023 5:56 pm
Post
by allen2010 » Sat Sep 09, 2023 8:39 pm
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
Posts: 5560 Joined: Mon Mar 25, 2013 7:01 pm
Post
by Octocontrabass » Tue Sep 12, 2023 12:05 am
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.