[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
Function: Int_w_Flags
---------
FORCE Prototype:
FUNCTION UINT Int_w_Flags PROTOTYPE
PARAMETERS VALUE UINT int_no, ;
VALUE UINT ax, VALUE UINT bx, ;
VALUE UINT cx, VALUE UINT dx, ;
VALUE UINT si, VALUE UINT di, ;
VALUE UINT bp, VALUE UINT ds, ;
VALUE UINT es
Description:
------------
This function is exactly the same as Interrupt, but
instead of returning TRUE or FALSE, this returns the state
of the flags immediately after the interrupt. Since Int_w_Flags()
returns the flags as a UINT, you must use the function BITTEST()
to test the flags. For example, let's say you wanted to some
Direct Console I/O (INT 21h/06). The interrupt will return with
the Zero flag set if there was no character in keyboard buffer.
You would test that like this:
AX = 0x0600
DX = 0x00FF ; Fetch, don't write
do while .T.
flags = Int_w_Flags( 0x21,ax,bx,cx,dx,si,di,bp,ds,es)
*---
* To test the zero flag, use BITTEST() on the 6th bit
*---
if BitTest( flags, 6 ) ; Did we get a character?
continue; ; No, so continue.
else
exit
endif
enddo
See Also:
Interrupt()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson