  FASM.DLL

fasm_GetVersion()
    (dword)       16 ,     16 .

fasm_Assemble(lpSource,lpMemory,cbMemorySize,nPassesLimit,hDisplayPipe)
    ,       (     ).
 lpSource      (zero-ended?ansi string)  (pansichar).
 lpMemory      , cbMemorySize    .       FASM_STATE(TFASM_STATE  Delphi).       ,      FASM_OUT_OF_MEMORY.
 nPassesLimit      1  65536.     ,         (  100).   ,   FASM_CANNOT_GENERATE_CODE.
 hDisplayPipe   handle pipe',       .     0,    .
    ,   FASM_OK   output_data  output_length   FASM_STATE (      ).
   ,        (. "General errors and conditions"  Fasm4Delphi.pas).    - FASM_ERROR,         ,   error_code and error_line FASM_STATE'  ,        (. "Error codes for FASM_ERROR condition"  Fasm4Delphi.pas),  - (pointer)          (. "TLINE_HEADER"  Fasm4Delphi.pas).

fasm_AssembleFile(lpSourceFile,lpMemory,cbMemorySize,nPassesLimit,hDisplayPipe)
     fasm_Assemble,        lpSourceFile  lpSource.     (pointer)   (zero-ended?ansi string)        (pansichar).

********************************************
   FASM.DLL

          fasm_Assemble.  condition      .
      FASM_OK,  output_length  output_data  (pointer)   (    )      .
      FASM_ERROR - error_code    (. "Error codes for FASM_ERROR condition"  Fasm4Delphi.pas),  error_line - (pointer)   LINE_HEADER,        .

TFASM_STATE=record
  condition:Int32;  
  case byte of
  0:(error_code:Int32;    
     error_line:PLINE_HEADER;);
  1:(output_length:cardinal;
     output_data:pointer;);   
end;

      -    ,       ,  ,   .      line_number'   0,          1.
     ,  file_path  (pointer)       (  ,       fasm_Assemble), line_number -     (  1),   file_offset    ,    .
       macro_calling_line  (pointer)   TLINE_HEADER  ,   ,   macro_line  (pointer)   TLINE_HEADER  ,     ,   .

TLINE_HEADER=record 
  file_path:PAnsiChar;
  line_number:cardinal;
  case byte of
    0:(file_offset:cardinal);
    1:(macro_calling_line:^TLINE_HEADER;
      macro_line:^TLINE_HEADER;);
end;