Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | Download | RSS feed

  1.  
  2. ; Macroinstructions for calling procedures (without defining)
  3.  
  4. macro stdcall proc,[arg]                ; directly call STDCALL procedure
  5.  { common
  6.     if ~ arg eq
  7.    reverse
  8.     pushd arg
  9.    common
  10.     end if
  11.     call proc }
  12.  
  13. macro invoke proc,[arg]                 ; indirectly call STDCALL procedure
  14.  { common
  15.     if ~ arg eq
  16.    reverse
  17.      pushd arg
  18.    common
  19.     end if
  20.     call [proc] }
  21.  
  22. macro ccall proc,[arg]                  ; directly call CDECL procedure
  23.  { common
  24.     size@ccall = 0
  25.     if ~ arg eq
  26.    reverse
  27.     pushd arg
  28.     size@ccall = size@ccall+4
  29.    common
  30.     end if
  31.     call proc
  32.     if size@ccall
  33.     add esp,size@ccall
  34.     end if }
  35.  
  36. macro cinvoke proc,[arg]                ; indirectly call CDECL procedure
  37.  { common
  38.     size@ccall = 0
  39.     if ~ arg eq
  40.    reverse
  41.     pushd arg
  42.     size@ccall = size@ccall+4
  43.    common
  44.     end if
  45.     call [proc]
  46.     if size@ccall
  47.     add esp,size@ccall
  48.     end if }