Parcourir la source

Set CF by default, clear on success (rather than clearing and setting

on failure).
tags/v0.9.3
Michael Brown il y a 17 ans
Parent
révision
8bce52d348
1 fichiers modifiés avec 4 ajouts et 2 suppressions
  1. 4
    2
      src/arch/i386/interface/pcbios/int13.c

+ 4
- 2
src/arch/i386/interface/pcbios/int13.c Voir le fichier

@@ -409,9 +409,10 @@ static void int13 ( struct i386_all_regs *ix86 ) {
409 409
 
410 410
 		/* Negative status indicates an error */
411 411
 		if ( status < 0 ) {
412
-			ix86->flags |= CF;
413 412
 			status = -status;
414 413
 			DBG ( "INT13 failed with status %x\n", status );
414
+		} else {
415
+			ix86->flags &= ~CF;
415 416
 		}
416 417
 		ix86->regs.ah = status;
417 418
 
@@ -433,7 +434,8 @@ static void hook_int13 ( void ) {
433 434
 	 */
434 435
 	__asm__  __volatile__ (
435 436
 	       TEXT16_CODE ( "\nint13_wrapper:\n\t"
436
-			     "orb $0, %%al\n\t" /* clear CF and OF */
437
+			     "orb $0, %%al\n\t" /* clear OF */
438
+			     "stc\n\t"
437 439
 			     "pushl %0\n\t" /* call int13() */
438 440
 			     "pushw %%cs\n\t"
439 441
 			     "call prot_call\n\t"

Chargement…
Annuler
Enregistrer