Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- dBsee 4.6 - The Library - <b>dfint86()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
dfInt86()
Calls a interrupt from Clipper
------------------------------------------------------------------------------
Syntax:

     dfInt86(<nInt>,<aRegs>) --> lRet

Parameters:

     <nInt>     Interrupt to call
     <aRegs>    Array of the registers to manage
     The array must be composed through the function dfMakeRegs()
     aRegs:= dfMakeRegs()
     Through this define it is possible values of the varied elements
     of this array:
     aRegs AX== AX register
     aRegs BX== BX register
     aRegs CX== CX register
     aRegs DX== DX register
     aRegs SI== SI register
     aRegs DI== DI register
     aRegs BP== BP register
     aRegs DS== DS register
     aRegs ES== ES register
     aRegs FLAGS== Flags register

Returns:

     <lRet> .T. if the parameters past are valid and if the executed state
     of the interrupt desired .F. if a wrong parameter or if a error occurs
     during the preparation of the registers on  the interrupt

Description:

     Permits to call a interrupt from Clipper, without the need of a
     program written in C or in ASM

Example:

     _ Example 1
     
     # include "dfInt86.ch"
     
     // Prepare a structure of registers
     LOCAL aRegs:= dfmakeregs()
     
     // Sect the registers
     aRegs AX:= dfHex2Dec( "F398")
     
     // Controls the installed the Norton Guides
     // in memory. To  verify this action
     // you can  control the AX REGISTER that
     // contains the value" 6A73," in character "js,"
     // is the author of the Norton Guides John Socha,
     // validity of the control
     dfInt86(dfHex2Dec(" 16") , aRegs)
     
     IF aRegs AX== dfHex2Dec(" 6A73") // "js"
        dbMsgErr( "De-installs the NG to have more"+;
                  "available memory")
     ENDIF
     
     _ Example 2
     
     // This example permits a call to interrupt 10h
     // service 1009h. This service serves to have a
     // string with 17 values contains
     // the value of the standard palette
     
     # include "dfInt86.ch"
     * _______________________________
     FUNCTION dfGetPalette()
     * _______________________________
     
     // Preparation of a array of registers
     LOCAL aRegs:= dfMakeRegs()
     
     // Function to call
     aRegs AX:= dfHex2Dec(" 1009")
     
     // Prepare the ddestination buffer
     // notifying the function dfInt86
     // to point with ES: DX to the buffer in ES
     aRegs ES:= SPACE(17)
     aRegs DX:= REG_ES
     
     // Call of the function
     dfInt86(dfHex2Dec(" 10") , aRegs)
     
     // Value of return
     RETURN aRegs ES

See also:

     dfMakeRegs()

See Also: dfMakeRegs()

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