Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide To Clipper - <b>ccall call a c function</b> http://www.ousob.com [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Ccall              Call a C function


Syntax:        Ccall cfunc <param1, param2, ...>

Description:   Calls a C function.  This macro handles all parameters
               and stack manipulation to interface with the C language.
               A parameter can be any 16-bit register, a defined
               variable, or a constant (immediate) value.


----------------------------------- Example --------------------------------

   The following example is the source code for the EXTEND.LIB function
   L2BIN():

        CLpublic <L2BIN>
        CLfunc void L2BIN <long num>

        CLcode
                mov     ax, LSW(num)
                mov     dx, MSW(num)

                mov     WORD PTR nbuff[0], ax
                mov     WORD PTR nbuff[2], dx

                Ccall   _retclen <OFFSET(nbuff), SEG(nbuff), 4>

        CLret


Online resources provided by: http://www.ousob.com --- NG 2 HTML conversion by Dave Pearson