CALL INTERRUPT 25H Doesn't Return Error Flags in the AX Reg (39859)
The information in this article applies to:
- Microsoft QuickBASIC 4.0
- Microsoft QuickBASIC 4.0b
- Microsoft QuickBASIC 4.5
- Microsoft BASIC Compiler for MS-DOS and OS/2 6.0
- Microsoft BASIC Compiler for MS-DOS and OS/2 6.0b
- Microsoft Basic Professional Development System (PDS) for MS-DOS and MS OS/2 7.0
This article was previously published under Q39859 SUMMARY
Microsoft QuickBasic supports the CALL INTERRUPT and CALL INTERRUPTX
statements for calling MS-DOS and ROM BIOS functions/interrupts. The
Interrupt Hex 25 is used to perform an absolute read from disk to a
memory location. If there are any errors during this operation, the
interrupt will return them in the AH register.
If the CALL INTERRUPT or CALL INTERRUPTX are used to execute Interrupt
25 Hex, the correct error code is not returned. This problem occurs
because Interrupt 25H does not POP the CPU flags from the stack after
its operation; these are flags the INT 25 Hex function originally
PUSHed onto the stack. Therefore, when INTERRUPTX returns to
QuickBasic, it returns the "old" flags. These do not reflect the
Interrupt 25 Hex function-flag return. Most MS-DOS and ROM BIOS
interrupts do POP the CPU flags from the stack upon completion and
this problem does not exist. INTERRUPTX does not compensate for the
extra set of flags on the stack.
Modification Type: | Minor | Last Reviewed: | 1/8/2003 |
---|
Keywords: | KB39859 |
---|
|