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 - doscall() execute a dos int 21h call http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 doscall()           Execute a DOS int 21h call
------------------------------------------------------------------------------
 Declaration
   system.hdr

 Syntax
   proc doscall extern

 Arguments
   None.

 Return
   None.

 Description
   The doscall() function executes a DOS int 21h call. The function
   does not change the current value of the processor registers before
   issuing the int 21h call. It is critically important that before calling
   doscall() the registers are suitably set using the setregs() function.

 Example
   #define EXAMPLE_SYSTEM
   #include example.hdr

   proc Test_doscall
   getregs()            // update __regs structure with register values
   __bregs.ah := 0x30   // modify __regs
   setregs()            // set registers from __regs
   doscall()            // issue DOS interrupt call
   getregs()            // update __regs structure with register values
   ? "Major DOS version", istr( __bregs.al ) // show output values
   ? "Minor DOS version", istr( __bregs.ah )
   endproc

   proc main
   Test_doscall()
   endproc

See Also: getregs() interrupt() intwflags() intx86() setregs()

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