fat12: slightly simpler logic?
This commit is contained in:
7
fat12.c
7
fat12.c
@@ -23,7 +23,6 @@ typedef struct {
|
|||||||
static uint8_t* gFat;
|
static uint8_t* gFat;
|
||||||
static direntry* gRootdir;
|
static direntry* gRootdir;
|
||||||
|
|
||||||
|
|
||||||
static int readsector(int c, int h, int s, uint8_t* addr) {
|
static int readsector(int c, int h, int s, uint8_t* addr) {
|
||||||
register uint8_t* dest asm ("bx") = addr;
|
register uint8_t* dest asm ("bx") = addr;
|
||||||
register uint8_t nsects asm ("al") = 1;
|
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" (ret)
|
||||||
: "r" (dest), "r" (nsects), "r" (func), "r" (sect),
|
: "r" (dest), "r" (nsects), "r" (func), "r" (sect),
|
||||||
"r" (cyl), "r" (head), "r" (drive), "r" (seg));
|
"r" (cyl), "r" (head), "r" (drive), "r" (seg));
|
||||||
if (ret == 0x80) {
|
if (ret != 0x80) {
|
||||||
continue;
|
break;
|
||||||
} else {
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user