Browse Source

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

on failure).
tags/v0.9.3
Michael Brown 17 years ago
parent
commit
8bce52d348
1 changed files with 4 additions and 2 deletions
  1. 4
    2
      src/arch/i386/interface/pcbios/int13.c

+ 4
- 2
src/arch/i386/interface/pcbios/int13.c View File

409
 
409
 
410
 		/* Negative status indicates an error */
410
 		/* Negative status indicates an error */
411
 		if ( status < 0 ) {
411
 		if ( status < 0 ) {
412
-			ix86->flags |= CF;
413
 			status = -status;
412
 			status = -status;
414
 			DBG ( "INT13 failed with status %x\n", status );
413
 			DBG ( "INT13 failed with status %x\n", status );
414
+		} else {
415
+			ix86->flags &= ~CF;
415
 		}
416
 		}
416
 		ix86->regs.ah = status;
417
 		ix86->regs.ah = status;
417
 
418
 
433
 	 */
434
 	 */
434
 	__asm__  __volatile__ (
435
 	__asm__  __volatile__ (
435
 	       TEXT16_CODE ( "\nint13_wrapper:\n\t"
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
 			     "pushl %0\n\t" /* call int13() */
439
 			     "pushl %0\n\t" /* call int13() */
438
 			     "pushw %%cs\n\t"
440
 			     "pushw %%cs\n\t"
439
 			     "call prot_call\n\t"
441
 			     "call prot_call\n\t"

Loading…
Cancel
Save