Calling and Naming Conventions

The information in this section provides information about the naming and calling conventions used in Fastgraph. These details are needed when calling Fastgraph routines from assembly language programs. It is not intended to be a complete tutorial on the subject, but it should provide experienced assembly language programmers with enough details to incorporate Fastgraph calls in their applications.

Fastgraph for Windows uses the same naming and stack-based calling conventions used by the Windows API functions. The details of these conventions important to assembly language programming are summarized below. If you're calling Fastgraph functions from an assembly language program, the program must follow these conventions.

  • All array and pointer parameters are passed by near reference (a 32-bit offset into DGROUP). Other parameters are passed by value.

  • Parameters are pushed onto the stack from right to left.

  • The calling program is responsible for removing the parameters from the stack.

  • Function values are returned in the EAX register.

  • Function names use lower case letters and are prefixed with an underscore (for example, _fg_vbinit). The Delphi units are the exception - they don't use the leading underscore.

All Fastgraph functions preserve the EBX, EDI, ESI, EBP, DS, and ES registers. The contents of any other registers are unknown upon return from a Fastgraph function (except for registers that contain the function's return value).

Contents
Fastgraph Home Page

 

copyright 2001 Ted Gruber Software, Inc.