fat12: slightly simpler logic?

This commit is contained in:
2025-09-29 17:46:31 +02:00
parent 50e3017c5c
commit 05d5e5413f

View File

@@ -23,7 +23,6 @@ typedef struct {
static uint8_t* gFat;
static direntry* gRootdir;
static int readsector(int c, int h, int s, uint8_t* addr) {
register uint8_t* dest asm ("bx") = addr;
register uint8_t nsects asm ("al") = 1;
@@ -41,10 +40,8 @@ static int readsector(int c, int h, int s, uint8_t* addr) {
: "=r" (ret)
: "r" (dest), "r" (nsects), "r" (func), "r" (sect),
"r" (cyl), "r" (head), "r" (drive), "r" (seg));
if (ret == 0x80) {
continue;
} else {
return ret;
if (ret != 0x80) {
break;
}
}