Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - intwflags() call a system interrupt, returning flags http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 intwflags()         Call a system interrupt, returning flags
------------------------------------------------------------------------------
 Declaration
   system.hdr

 Syntax
   func uint intwflags extern
   param value uint uInterrupt, ;
               uint uAX, ;
               uint uBX, ;
               uint uCX, ;
               uint uDX, ;
               uint uSI, ;
               uint uDI, ;
               uint uBP, ;
               uint uDS, ;
               uint uES

 Arguments
   uInterrupt is the interrupt number to call.
   uAX is the ax register value.
   uBX is the bx register value.
   uCX is the cx register value.
   uDX is the dx register value.
   uSI is the si register value.
   uDI is the di register value.
   uBP is the bp register value.
   uDS is the ds register value.
   uES is the es register value.

 Return
   The contents of the flag register after interrupt execution.

 Description
   This function is identical to the interrupt() function, except its
   return value.

 Example
   #define EXAMPLE_SYSTEM
   #include example.hdr

   proc Test_intwflags
   vardef
      uint ax, bx, cx, dx, ds, es, di, si, bp, flags
      char cDir
   enddef
   cDir := "TESTDIR"
   ax := 0x3900                              // make directory
   ds := segmentvalue( cDir )
   dx := offsetvalue( cDir )
   flags := intwflags( 0x21,ax,bx,cx,dx,si,di,bp,ds,es )
   if testbit( flags, 0 )                    // if carry flag set
      ? "Directory could not be created"
   else
      ? "Test directory has been created"
      rmdir( cDir )                          // remove the directory
   endif
   endproc

   proc main
   Test_intwflags()
   endproc

See Also: doscall() interrupt() intx86()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson