C--: Difference between revisions

Jump to navigation Jump to search
441 bytes added ,  15 years ago
[unchecked revision][unchecked revision]
Line 91:
$ POP SI
}
 
byte readDisk(byte drive, head, sector, track, howmany; word segm, offs)
int err;
{
err = 0;
lab1:
$ MOV AH, 0
$ MOV DL, drive
$ INT 0x13
$ MOV AX, segm
$ MOV ES, AX
$ MOV BX, offs
$ MOV DL, drive
$ MOV DH, head
$ MOV CL, sector
$ MOV CH, track
$ MOV AL, howmany
$ MOV AH, 2
$ INT 0x13
AL = 0;
if (CARRYFLAG)
{
err++;
if (err < maxDiskErrors) $jmp lab1;
return(AH);
}
return(0);
}
 
 
These snippets may seem a bit spaghetti code, but not because of some language defficiency but because I didn't look very far for them snippets.
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu