EN+RU+Test JP
This commit is contained in:
45
DOC_EN.TXT
Normal file
45
DOC_EN.TXT
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
Description of functions inside FASM.DLL
|
||||||
|
|
||||||
|
fasm_GetVersion()
|
||||||
|
Returns double word containg major version in lower 16 bits, and minor version in the higher 16 bits.
|
||||||
|
|
||||||
|
fasm_Assemble(lpSource,lpMemory,cbMemorySize,nPassesLimit,hDisplayPipe)
|
||||||
|
Assembles the given source, using the provided memory block as a free storage space(which is also to contain generated output).
|
||||||
|
The lpSource should contain a pointer to zero-ended source text(pansichar).
|
||||||
|
The lpMemory should be a pointer to the memory block and cbMemorySize should contain its size. In the beginning of this memory block the FASM_STATE(TFASM_STATE in Delphi) structure will reside. The assembler doesn't allocate any memory beside this block, if it is not enough for its purposes, the function return FASM_OUT_OF_MEMORY.
|
||||||
|
The nPassesLimit should be a value in range from 1 to 65536, defining the maximum number of passes the assembler can perform in order to generate the code(the recommended value is 100). If the limit is reached, the function return FASM_CANNOT_GENERATE_CODE.
|
||||||
|
The hDisplayPipe should contain handle of the pipe, to which the output of DISPLAY directives will be written. If this parameter is 0, all the display will get discarded.
|
||||||
|
If the assembly is successful, function returns FASM_OK value and fills the output_data and output_length fields of the FASM_STATE structure(which resides at the beginning of provided memory block).
|
||||||
|
If the assembly failed, function returns one of the other general conditions/errors codes(see "General errors and conditions" in Fasm4Delphi.pas). If if error code is FASM_ERROR, it means that an error caused by a specific place in source occured, then the error_code and error_line fields of FASM_STATE are filled, first one with detailed error code(see "Error codes for FASM_ERROR condition" in Fasm4Delphi.pas), and the second one with pointer to a structure containing data about line that caused the error(see "TLINE_HEADER" in Fasm4Delphi.pas).
|
||||||
|
|
||||||
|
fasm_AssembleFile(lpSourceFile,lpMemory,cbMemorySize,nPassesLimit,hDisplayPipe)
|
||||||
|
This function performs identically to fasm_Assemble, except that it takes the lpSourceFile parameter in place of lpSource, and it shall contain the pointer to zero-ended path to file containing the source to assemble(pansichar).
|
||||||
|
|
||||||
|
********************************************
|
||||||
|
Description of structures used in FASM.DLL
|
||||||
|
|
||||||
|
The following structure resides at the beginning of memory block provided to the fasm_Assemble function. The condition field contains the same value as the one returned by function.
|
||||||
|
When function returns FASM_OK condition, the output_length and output_data fields are filled - with pointer to generated output(somewhere within the provided memory block) and the count of bytes stored there.
|
||||||
|
When function returns FASM_ERROR, the error_code is filled with the code of specific error(see "Error codes for FASM_ERROR condition" in Fasm4Delphi.pas) that happened and error_line is a pointer to the LINE_HEADER structure, providing information about the line that caused the error.
|
||||||
|
|
||||||
|
TFASM_STATE=record
|
||||||
|
condition:Int32;
|
||||||
|
case byte of
|
||||||
|
0:(error_code:Int32;
|
||||||
|
error_line:PLINE_HEADER;);
|
||||||
|
1:(output_length:cardinal;
|
||||||
|
output_data:pointer;);
|
||||||
|
end;
|
||||||
|
|
||||||
|
The following structure has two variants - it either defines the line that was loaded directly from source, or the line that was generated by macroinstruction. First case has the highest bit of line_number set to 0, while the second case has this bit set.
|
||||||
|
In the first case, the file_path field contains pointer to the path of source file(empty string if it's the source that was provided directly to fasm_Assemble function), the line_number is the number of line within that file(starting from 1) and the file_offset field contains the offset within the file where the line starts.
|
||||||
|
In the second case the macro_calling_line field contains the pointer to LINE_HEADER structure for the line which called the macroinstruction, and the macro_line field contains the pointer to LINE_HEADER structure for the line within the definition of macroinstruction, which generated this one.
|
||||||
|
|
||||||
|
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;
|
||||||
BIN
DOC_JP.TXT
Normal file
BIN
DOC_JP.TXT
Normal file
Binary file not shown.
45
DOC_RU.TXT
Normal file
45
DOC_RU.TXT
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> FASM.DLL
|
||||||
|
|
||||||
|
fasm_GetVersion()
|
||||||
|
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>(dword) <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 16 <20><><EFBFBD><EFBFBD><EFBFBD>, <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 16 <20><><EFBFBD><EFBFBD><EFBFBD>.
|
||||||
|
|
||||||
|
fasm_Assemble(lpSource,lpMemory,cbMemorySize,nPassesLimit,hDisplayPipe)
|
||||||
|
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD>).
|
||||||
|
lpSource <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>(zero-ended?ansi string) <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>(pansichar).
|
||||||
|
lpMemory <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C> cbMemorySize <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> FASM_STATE(TFASM_STATE <20> Delphi). <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> FASM_OUT_OF_MEMORY.
|
||||||
|
nPassesLimit <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> 1 <20><> 65536. <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 100). <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> FASM_CANNOT_GENERATE_CODE.
|
||||||
|
hDisplayPipe <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> handle pipe'<27>, <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> 0, <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||||
|
<20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> FASM_OK <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> output_data <20> output_length <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> FASM_STATE (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>).
|
||||||
|
<20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><>. "General errors and conditions" <20> Fasm4Delphi.pas). <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - FASM_ERROR, <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> error_code and error_line FASM_STATE'<27> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><>. "Error codes for FASM_ERROR condition" <20> Fasm4Delphi.pas),<2C> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(pointer) <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><>. "TLINE_HEADER" <20> Fasm4Delphi.pas).
|
||||||
|
|
||||||
|
fasm_AssembleFile(lpSourceFile,lpMemory,cbMemorySize,nPassesLimit,hDisplayPipe)
|
||||||
|
<20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> fasm_Assemble, <20><> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> lpSourceFile <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> lpSource. <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(pointer) <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>(zero-ended?ansi string) <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(pansichar).
|
||||||
|
|
||||||
|
********************************************
|
||||||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> FASM.DLL
|
||||||
|
|
||||||
|
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> fasm_Assemble. <20><><EFBFBD><EFBFBD> condition <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||||
|
<20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> FASM_OK, <20><><EFBFBD><EFBFBD> output_length <20> output_data <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(pointer) <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||||
|
<20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> FASM_ERROR - error_code <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><>. "Error codes for FASM_ERROR condition" <20> Fasm4Delphi.pas), <20> error_line - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(pointer) <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> LINE_HEADER, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||||
|
|
||||||
|
TFASM_STATE=record
|
||||||
|
condition:Int32;
|
||||||
|
case byte of
|
||||||
|
0:(error_code:Int32;
|
||||||
|
error_line:PLINE_HEADER;);
|
||||||
|
1:(output_length:cardinal;
|
||||||
|
output_data:pointer;);
|
||||||
|
end;
|
||||||
|
|
||||||
|
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> line_number'<27> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> 0, <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> 1.
|
||||||
|
<20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD> file_path <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(pointer) <20><> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> fasm_Assemble), line_number - <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> 1), <20> <20><><EFBFBD><EFBFBD> file_offset <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD>, <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>.
|
||||||
|
<20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> macro_calling_line <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(pointer) <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> TLINE_HEADER <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20> <20><><EFBFBD><EFBFBD> macro_line <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(pointer) <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> TLINE_HEADER <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>, <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||||
|
|
||||||
|
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;
|
||||||
@@ -8,20 +8,19 @@
|
|||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="fpcunitproject1.lpr"/>
|
<Filename Value="fpcunitproject1.lpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<EditorIndex Value="1"/>
|
<EditorIndex Value="-1"/>
|
||||||
<CursorPos X="66" Y="6"/>
|
<CursorPos X="66" Y="6"/>
|
||||||
<UsageCount Value="20"/>
|
<UsageCount Value="20"/>
|
||||||
<Loaded Value="True"/>
|
|
||||||
</Unit0>
|
</Unit0>
|
||||||
<Unit1>
|
<Unit1>
|
||||||
<Filename Value="testcase1.pas"/>
|
<Filename Value="testcase1.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="TestCase1"/>
|
<UnitName Value="TestCase1"/>
|
||||||
<IsVisibleTab Value="True"/>
|
<IsVisibleTab Value="True"/>
|
||||||
|
<EditorIndex Value="-1"/>
|
||||||
<TopLine Value="21"/>
|
<TopLine Value="21"/>
|
||||||
<CursorPos X="62" Y="41"/>
|
<CursorPos X="62" Y="41"/>
|
||||||
<UsageCount Value="20"/>
|
<UsageCount Value="20"/>
|
||||||
<Loaded Value="True"/>
|
|
||||||
</Unit1>
|
</Unit1>
|
||||||
<Unit2>
|
<Unit2>
|
||||||
<Filename Value="..\Source\Fasm4Delphi.pas"/>
|
<Filename Value="..\Source\Fasm4Delphi.pas"/>
|
||||||
@@ -33,14 +32,9 @@
|
|||||||
<UsageCount Value="20"/>
|
<UsageCount Value="20"/>
|
||||||
</Unit2>
|
</Unit2>
|
||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="2" HistoryIndex="1">
|
<General>
|
||||||
<Position1>
|
<ActiveWindowIndexAtStart Value="-1"/>
|
||||||
<Filename Value="fpcunitproject1.lpr"/>
|
</General>
|
||||||
</Position1>
|
<JumpHistory HistoryIndex="-1"/>
|
||||||
<Position2>
|
|
||||||
<Filename Value="testcase1.pas"/>
|
|
||||||
<Caret Line="8" Column="66"/>
|
|
||||||
</Position2>
|
|
||||||
</JumpHistory>
|
|
||||||
</ProjectSession>
|
</ProjectSession>
|
||||||
</CONFIG>
|
</CONFIG>
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
Headers FASMDll for Delphi/Free Pascal.
|
|
||||||
Заголовки FASMDll для Delphi/Free Pascal.
|
|
||||||
Donate:
|
|
||||||
https://money.yandex.ru/to/410014959153552
|
|
||||||
@@ -1,58 +1,7 @@
|
|||||||
unit Fasm4Delphi platform;
|
unit Fasm4Delphi platform;
|
||||||
|
|
||||||
{Delphi Translation&Tests:Artyom Gavrilov,Vlad Untkin.
|
{Delphi Translation&Tests:Artyom Gavrilov,Vlad Untkin.
|
||||||
|
Donate:https://money.yandex.ru/to/410014959153552}
|
||||||
From FASMDLL.TXT:
|
|
||||||
|
|
||||||
Short description of functions inside FASM.DLL
|
|
||||||
|
|
||||||
|
|
||||||
fasm_GetVersion()
|
|
||||||
|
|
||||||
Returns double word containg major version in lower 16 bits,
|
|
||||||
and minor version in the higher 16 bits.
|
|
||||||
|
|
||||||
fasm_Assemble(lpSource,lpMemory,cbMemorySize,nPassesLimit,hDisplayPipe)
|
|
||||||
|
|
||||||
Assembles the given source, using the provided memory block as a free
|
|
||||||
storage space (which is also to contain generated output).
|
|
||||||
|
|
||||||
The lpSource should contain a pointer to zero-ended source text.
|
|
||||||
|
|
||||||
The lpMemory should be a pointer to the memory block and cbMemorySize
|
|
||||||
should contain its size. In the beginning of this memory block the
|
|
||||||
FASM_STATE structure will reside (as defined in FASM.ASH). The assembler
|
|
||||||
doesn't allocate any memory beside this block, if it is not enough for
|
|
||||||
its purposes, the function returns with FASM_OUT_OF_MEMORY state.
|
|
||||||
|
|
||||||
The nPassesLimit should be a value in range from 1 to 65536, defining
|
|
||||||
the maximum number of passes the assembler can perform in order to
|
|
||||||
generate the code (the recommended value is 100). If the limit is reached,
|
|
||||||
the function returns with state FASM_CANNOT_GENERATE_CODE.
|
|
||||||
|
|
||||||
The hDisplayPipe should contain handle of the pipe, to which the output
|
|
||||||
of DISPLAY directives will be written. If this parameter is NULL, all
|
|
||||||
the display will get discarded.
|
|
||||||
|
|
||||||
If the assembly is successful, function returns FASM_OK value and fills
|
|
||||||
the output_data and output_length fields of the FASM_STATE structure
|
|
||||||
(which resides at the beginning of provided memory block) with pointer
|
|
||||||
to the generated output and count of bytes stored there.
|
|
||||||
|
|
||||||
If the assembly failed, function returns one of the other general
|
|
||||||
conditions as defined in FASM.ASH. If the condition returned is FASM_ERROR,
|
|
||||||
it means that an error caused by a specific place in source occured,
|
|
||||||
then the error_code and error_line fields of FASM_STATE are filled,
|
|
||||||
first one with detailed error code as defined in FASM.ASH, and the second
|
|
||||||
one with pointer to a structure containing data about line that caused
|
|
||||||
the error.
|
|
||||||
|
|
||||||
fasm_AssembleFile(lpSourceFile,lpMemory,cbMemorySize,nPassesLimit,hDisplayPipe)
|
|
||||||
|
|
||||||
This function performs identically to fasm_Assemble, except that it takes
|
|
||||||
the lpSourceFile parameter in place of lpSource, and it shall contain the
|
|
||||||
pointer to zero-ended path to file containing the source to assemble.
|
|
||||||
}
|
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
@@ -72,7 +21,7 @@ type
|
|||||||
case byte of
|
case byte of
|
||||||
0:(file_offset:cardinal);
|
0:(file_offset:cardinal);
|
||||||
1:(macro_calling_line:^TLINE_HEADER;
|
1:(macro_calling_line:^TLINE_HEADER;
|
||||||
macro_line:^TLINE_HEADER;);
|
macro_line:^TLINE_HEADER;);
|
||||||
end;
|
end;
|
||||||
PLINE_HEADER=^TLINE_HEADER;
|
PLINE_HEADER=^TLINE_HEADER;
|
||||||
{$EXTERNALSYM TLINE_HEADER}
|
{$EXTERNALSYM TLINE_HEADER}
|
||||||
@@ -84,7 +33,7 @@ type
|
|||||||
error_line:PLINE_HEADER;);
|
error_line:PLINE_HEADER;);
|
||||||
1:(output_length:cardinal;
|
1:(output_length:cardinal;
|
||||||
output_data:pointer; );
|
output_data:pointer; );
|
||||||
end;
|
end;
|
||||||
PFASM_STATE=^TFASM_STATE;
|
PFASM_STATE=^TFASM_STATE;
|
||||||
{$EXTERNALSYM TFASM_STATE}
|
{$EXTERNALSYM TFASM_STATE}
|
||||||
|
|
||||||
@@ -93,59 +42,59 @@ const
|
|||||||
|
|
||||||
// General errors and conditions
|
// General errors and conditions
|
||||||
|
|
||||||
FASM_OK =0; //FASM_STATE points to output
|
FASM_OK =0; //FASM_STATE points to output
|
||||||
FASM_WORKING =1;
|
FASM_WORKING =1;
|
||||||
FASM_ERROR =2; //FASM_STATE contains error code
|
FASM_ERROR =2; //FASM_STATE contains error code
|
||||||
FASM_INVALID_PARAMETER =-1;
|
FASM_INVALID_PARAMETER =-1;
|
||||||
FASM_OUT_OF_MEMORY =-2;
|
FASM_OUT_OF_MEMORY =-2;
|
||||||
FASM_STACK_OVERFLOW =-3;
|
FASM_STACK_OVERFLOW =-3;
|
||||||
FASM_SOURCE_NOT_FOUND =-4;
|
FASM_SOURCE_NOT_FOUND =-4;
|
||||||
FASM_UNEXPECTED_END_OF_SOURCE =-5;
|
FASM_UNEXPECTED_END_OF_SOURCE =-5;
|
||||||
FASM_CANNOT_GENERATE_CODE =-6;
|
FASM_CANNOT_GENERATE_CODE =-6;
|
||||||
FASM_FORMAT_LIMITATIONS_EXCEDDED =-7;
|
FASM_FORMAT_LIMITATIONS_EXCEDDED =-7;
|
||||||
FASM_WRITE_FAILED =-8;
|
FASM_WRITE_FAILED =-8;
|
||||||
FASM_INVALID_DEFINITION =-9;
|
FASM_INVALID_DEFINITION =-9;
|
||||||
|
|
||||||
//Error codes for FASM_ERROR condition
|
//Error codes for FASM_ERROR condition
|
||||||
|
|
||||||
FASMERR_FILE_NOT_FOUND =-101;
|
FASMERR_FILE_NOT_FOUND =-101;
|
||||||
FASMERR_ERROR_READING_FILE =-102;
|
FASMERR_ERROR_READING_FILE =-102;
|
||||||
FASMERR_INVALID_FILE_FORMAT =-103;
|
FASMERR_INVALID_FILE_FORMAT =-103;
|
||||||
FASMERR_INVALID_MACRO_ARGUMENTS =-104;
|
FASMERR_INVALID_MACRO_ARGUMENTS =-104;
|
||||||
FASMERR_INCOMPLETE_MACRO =-105;
|
FASMERR_INCOMPLETE_MACRO =-105;
|
||||||
FASMERR_UNEXPECTED_CHARACTERS =-106;
|
FASMERR_UNEXPECTED_CHARACTERS =-106;
|
||||||
FASMERR_INVALID_ARGUMENT =-107;
|
FASMERR_INVALID_ARGUMENT =-107;
|
||||||
FASMERR_ILLEGAL_INSTRUCTION =-108;
|
FASMERR_ILLEGAL_INSTRUCTION =-108;
|
||||||
FASMERR_INVALID_OPERAND =-109;
|
FASMERR_INVALID_OPERAND =-109;
|
||||||
FASMERR_INVALID_OPERAND_SIZE =-110;
|
FASMERR_INVALID_OPERAND_SIZE =-110;
|
||||||
FASMERR_OPERAND_SIZE_NOT_SPECIFIED =-111;
|
FASMERR_OPERAND_SIZE_NOT_SPECIFIED =-111;
|
||||||
FASMERR_OPERAND_SIZES_DO_NOT_MATCH =-112;
|
FASMERR_OPERAND_SIZES_DO_NOT_MATCH =-112;
|
||||||
FASMERR_INVALID_ADDRESS_SIZE =-113;
|
FASMERR_INVALID_ADDRESS_SIZE =-113;
|
||||||
FASMERR_ADDRESS_SIZES_DO_NOT_AGREE =-114;
|
FASMERR_ADDRESS_SIZES_DO_NOT_AGREE =-114;
|
||||||
FASMERR_DISALLOWED_COMBINATION_OF_REGISTERS =-115;
|
FASMERR_DISALLOWED_COMBINATION_OF_REGISTERS =-115;
|
||||||
FASMERR_LONG_IMMEDIATE_NOT_ENCODABLE =-116;
|
FASMERR_LONG_IMMEDIATE_NOT_ENCODABLE =-116;
|
||||||
FASMERR_RELATIVE_JUMP_OUT_OF_RANGE =-117;
|
FASMERR_RELATIVE_JUMP_OUT_OF_RANGE =-117;
|
||||||
FASMERR_INVALID_EXPRESSION =-118;
|
FASMERR_INVALID_EXPRESSION =-118;
|
||||||
FASMERR_INVALID_ADDRESS =-119;
|
FASMERR_INVALID_ADDRESS =-119;
|
||||||
FASMERR_INVALID_VALUE =-120;
|
FASMERR_INVALID_VALUE =-120;
|
||||||
FASMERR_VALUE_OUT_OF_RANGE =-121;
|
FASMERR_VALUE_OUT_OF_RANGE =-121;
|
||||||
FASMERR_UNDEFINED_SYMBOL =-122;
|
FASMERR_UNDEFINED_SYMBOL =-122;
|
||||||
FASMERR_INVALID_USE_OF_SYMBOL =-123;
|
FASMERR_INVALID_USE_OF_SYMBOL =-123;
|
||||||
FASMERR_NAME_TOO_LONG =-124;
|
FASMERR_NAME_TOO_LONG =-124;
|
||||||
FASMERR_INVALID_NAME =-125;
|
FASMERR_INVALID_NAME =-125;
|
||||||
FASMERR_RESERVED_WORD_USED_AS_SYMBOL =-126;
|
FASMERR_RESERVED_WORD_USED_AS_SYMBOL =-126;
|
||||||
FASMERR_SYMBOL_ALREADY_DEFINED =-127;
|
FASMERR_SYMBOL_ALREADY_DEFINED =-127;
|
||||||
FASMERR_MISSING_END_QUOTE =-128;
|
FASMERR_MISSING_END_QUOTE =-128;
|
||||||
FASMERR_MISSING_END_DIRECTIVE =-129;
|
FASMERR_MISSING_END_DIRECTIVE =-129;
|
||||||
FASMERR_UNEXPECTED_INSTRUCTION =-130;
|
FASMERR_UNEXPECTED_INSTRUCTION =-130;
|
||||||
FASMERR_EXTRA_CHARACTERS_ON_LINE =-131;
|
FASMERR_EXTRA_CHARACTERS_ON_LINE =-131;
|
||||||
FASMERR_SECTION_NOT_ALIGNED_ENOUGH =-132;
|
FASMERR_SECTION_NOT_ALIGNED_ENOUGH =-132;
|
||||||
FASMERR_SETTING_ALREADY_SPECIFIED =-133;
|
FASMERR_SETTING_ALREADY_SPECIFIED =-133;
|
||||||
FASMERR_DATA_ALREADY_DEFINED =-134;
|
FASMERR_DATA_ALREADY_DEFINED =-134;
|
||||||
FASMERR_TOO_MANY_REPEATS =-135;
|
FASMERR_TOO_MANY_REPEATS =-135;
|
||||||
FASMERR_SYMBOL_OUT_OF_SCOPE =-136;
|
FASMERR_SYMBOL_OUT_OF_SCOPE =-136;
|
||||||
FASMERR_USER_ERROR =-140;
|
FASMERR_USER_ERROR =-140;
|
||||||
FASMERR_ASSERTION_FAILED =-141;
|
FASMERR_ASSERTION_FAILED =-141;
|
||||||
|
|
||||||
{$IFDEF FasmStaticLink}
|
{$IFDEF FasmStaticLink}
|
||||||
function fasm_GetVersion:TFasmVersion;stdcall;external FASMDLLName;
|
function fasm_GetVersion:TFasmVersion;stdcall;external FASMDLLName;
|
||||||
@@ -175,7 +124,7 @@ procedure LoadFASM(Name:string=FASMDLLName);
|
|||||||
begin
|
begin
|
||||||
if &Library<>0 then
|
if &Library<>0 then
|
||||||
FreeFasm;
|
FreeFasm;
|
||||||
{$IFDEF FPC}
|
{$IFDEF FPC}
|
||||||
&Library:=LoadLibrary(PChar(Name));
|
&Library:=LoadLibrary(PChar(Name));
|
||||||
Pointer(fasm_GetVersion):=GetProcAddress(&Library,'fasm_GetVersion');
|
Pointer(fasm_GetVersion):=GetProcAddress(&Library,'fasm_GetVersion');
|
||||||
Pointer(fasm_Assemble):=GetProcAddress(&Library,'fasm_Assemble');
|
Pointer(fasm_Assemble):=GetProcAddress(&Library,'fasm_Assemble');
|
||||||
@@ -196,7 +145,7 @@ fasm_GetVersion:=nil;
|
|||||||
fasm_Assemble:=nil;
|
fasm_Assemble:=nil;
|
||||||
fasm_AssembleFile:=nil;
|
fasm_AssembleFile:=nil;
|
||||||
&Library:=0;
|
&Library:=0;
|
||||||
end;
|
end;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ProjectGuid>{4DB29771-5426-49E7-B0D8-B77F95D4EDCE}</ProjectGuid>
|
<ProjectGuid>{4DB29771-5426-49E7-B0D8-B77F95D4EDCE}</ProjectGuid>
|
||||||
<ProjectVersion>18.2</ProjectVersion>
|
<ProjectVersion>18.3</ProjectVersion>
|
||||||
<FrameworkType>None</FrameworkType>
|
<FrameworkType>None</FrameworkType>
|
||||||
<MainSource>Tester.dpr</MainSource>
|
<MainSource>Tester.dpr</MainSource>
|
||||||
<Base>True</Base>
|
<Base>True</Base>
|
||||||
|
|||||||
Reference in New Issue
Block a user