From da477ef83fb24b4ef01df674b656da211cb9ba4b Mon Sep 17 00:00:00 2001 From: artem3213212 Date: Mon, 19 Mar 2018 22:11:38 +0300 Subject: [PATCH 1/2] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20'RU=5FDOC.MD'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- RU_DOC.MD | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/RU_DOC.MD b/RU_DOC.MD index 061d6a3..ac84e5e 100644 --- a/RU_DOC.MD +++ b/RU_DOC.MD @@ -1,9 +1,9 @@ -#Описание функций FasmOnDelphi: +# Описание функций FasmOnDelphi: -###function FasmVersion:TFasmVersion; +### function FasmVersion:TFasmVersion; Возвращает версию ассемблера в структуре TFasmVersion. -###function FasmAssemble(const Source:AnsiString;cbMemorySize:cardinal=1024*1024;nPassesLimit:DWORD=100):TFasmResult; +### function FasmAssemble(const Source:AnsiString;cbMemorySize:cardinal=1024*1024;nPassesLimit:DWORD=100):TFasmResult; Компилирует код. Source содержит исходный код для компиляции. @@ -14,27 +14,27 @@ nPassesLimit - максимальное количество проходов к Возвращает структуру TFasmResult с информацией об ошибке или скомпилированным кодом. -###function FasmAssembleToFile(const Source,OutFile:AnsiString;cbMemorySize:cardinal=1024*1024*8;nPassesLimit:DWORD=100):TFasmResult; +### function FasmAssembleToFile(const Source,OutFile:AnsiString;cbMemorySize:cardinal=1024*1024*8;nPassesLimit:DWORD=100):TFasmResult; Эдентично FasmAssemble, но выход будет записан в файл(имя передаётся в OutFile). -###function FasmAssembleFile(const Source:AnsiString;cbMemorySize:cardinal=1024*1024*8;nPassesLimit:DWORD=100):TFasmResult; +### function FasmAssembleFile(const Source:AnsiString;cbMemorySize:cardinal=1024*1024*8;nPassesLimit:DWORD=100):TFasmResult; Эдентично FasmAssemble, но код будет взят из файла(имя передаётся в Source). -###function FasmAssembleFileToFile(const Source,OutFile:AnsiString;cbMemorySize:cardinal=1024*1024*8;nPassesLimit:DWORD=100):TFasmResult; +### function FasmAssembleFileToFile(const Source,OutFile:AnsiString;cbMemorySize:cardinal=1024*1024*8;nPassesLimit:DWORD=100):TFasmResult; Эдентично FasmAssembleFile, но выход будет записан в файл(имя передаётся в OutFile). -###procedure OpenFASM(Location:string=FASMPath;AsDll:boolean=false); +### procedure OpenFASM(Location:string=FASMPath;AsDll:boolean=false); Инициализирует Flat Assembler. Location - путь до fasm.exe/fasm.dll (только Win32). AsDll - установить в True если используется DLL версия компилятора иначе False (вне Win32 игнорируется). -###procedure SetFasmTemp(Path:string); +### procedure SetFasmTemp(Path:string); Выбирает каталог для temp файлов. ********************************************************** -#Описание типов FasmOnDelphi: +# Описание типов FasmOnDelphi: TFasmError=FASMERR_ASSERTION_FAILED ..FASM_ERROR; From 2db98e547f4efb5a87267947ded5ffcb05e8423f Mon Sep 17 00:00:00 2001 From: Vladislav Utkin Date: Sun, 25 Mar 2018 23:09:05 +0300 Subject: [PATCH 2/2] Add English documentation and fix Russian --- EN_DOC.MD | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ RU_DOC.MD | 14 +++++----- 2 files changed, 85 insertions(+), 7 deletions(-) create mode 100644 EN_DOC.MD diff --git a/EN_DOC.MD b/EN_DOC.MD new file mode 100644 index 0000000..bef850a --- /dev/null +++ b/EN_DOC.MD @@ -0,0 +1,78 @@ +# FasmOnDelphi functions description + +### function FasmVersion:TFasmVersion; +Return assembler version in TFasmVersion structure. + +### function FasmAssemble(const Source:AnsiString;cbMemorySize:cardinal=1024*1024;nPassesLimit:DWORD=100):TFasmResult; +Compiles the code. + +Source - contains source code to compile. + +cbMemorySize - amount of memory that compiler can use (may be rounded to kilobytes). + +nPassesLimit - the maximum number of passes that the compiler can use. + +Returns structure TFasmResult with information of error or compiled code. + +### function FasmAssembleToFile(const Source,OutFile:AnsiString;cbMemorySize:cardinal=1024*1024*8;nPassesLimit:DWORD=100):TFasmResult; +Like FasmAssemble, but output will be in file provided in OutFile. + +### function FasmAssembleFile(const Source:AnsiString;cbMemorySize:cardinal=1024*1024*8;nPassesLimit:DWORD=100):TFasmResult; +Like FasmAssemble, but input will be used from file provided in Source. + +### function FasmAssembleFileToFile(const Source,OutFile:AnsiString;cbMemorySize:cardinal=1024*1024*8;nPassesLimit:DWORD=100):TFasmResult; +Like FasmAssembleFile, but output will be in file provided in OutFile. + +### procedure OpenFASM(Location:string=FASMPath;AsDll:boolean=false); +Initializes the Flat Assembler. + +Location - path to fasm.exe/fasm.dll (only Win32). + +AsDll - set to True if using DLL version of compiler, else False (non Win32 targets ignored). + +### procedure SetFasmTemp(Path:string); +Selects a directory for temp files. + +********************************************************** +# Description of FasmOnDelphi types: + + TFasmError=FASMERR_ASSERTION_FAILED ..FASM_ERROR; + +Type for Fasm error codes. + + TFasmVersion=packed record + V1,V2:word; + end; + +Type for provide the assembler version. + +V1 - the first number of the version (to the point). + +V2 - the second version number (after the point). + + TFasmResult=record + OutData:Pointer; + sb:integer; + Error:TFasmError; + OutStr:string; + Lines:array of TFasmLine; + end; + +OutData - pointer to the result of assembling (nil on error or FasmAssembleToFile/FasmAssembleFileToFile). + +sb - the size of the result of assembly (0 on error or FasmAssembleToFile/FasmAssembleFileToFile). + +Error - error code (FASM_OK if everything went well). + +OutStr - the string that compiler produces. + +Lines - detailed information about errors (for more details see TFasmLine). + + TFasmLine=record + Line:UInt32; + &File:string; + end; + +Line - number of line with error. + +File - name of file with error ('' or a file from the temp folder implies that this is the code passed to FasmAssembleFile or FasmAssembleFileToFile). diff --git a/RU_DOC.MD b/RU_DOC.MD index ac84e5e..ada3994 100644 --- a/RU_DOC.MD +++ b/RU_DOC.MD @@ -6,7 +6,7 @@ ### function FasmAssemble(const Source:AnsiString;cbMemorySize:cardinal=1024*1024;nPassesLimit:DWORD=100):TFasmResult; Компилирует код. -Source содержит исходный код для компиляции. +Source - содержит исходный код для компиляции. cbMemorySize - количество памяти которую может использовать компилятор(может быть округлено до целого количества килобайт). @@ -15,16 +15,16 @@ nPassesLimit - максимальное количество проходов к Возвращает структуру TFasmResult с информацией об ошибке или скомпилированным кодом. ### function FasmAssembleToFile(const Source,OutFile:AnsiString;cbMemorySize:cardinal=1024*1024*8;nPassesLimit:DWORD=100):TFasmResult; -Эдентично FasmAssemble, но выход будет записан в файл(имя передаётся в OutFile). +Идентично FasmAssemble, но выход будет записан в файл(имя передаётся в OutFile). ### function FasmAssembleFile(const Source:AnsiString;cbMemorySize:cardinal=1024*1024*8;nPassesLimit:DWORD=100):TFasmResult; -Эдентично FasmAssemble, но код будет взят из файла(имя передаётся в Source). +Идентично FasmAssemble, но код будет взят из файла(имя передаётся в Source). ### function FasmAssembleFileToFile(const Source,OutFile:AnsiString;cbMemorySize:cardinal=1024*1024*8;nPassesLimit:DWORD=100):TFasmResult; -Эдентично FasmAssembleFile, но выход будет записан в файл(имя передаётся в OutFile). +Идентично FasmAssembleFile, но выход будет записан в файл(имя передаётся в OutFile). ### procedure OpenFASM(Location:string=FASMPath;AsDll:boolean=false); -Инициализирует Flat Assembler. +Инициализирует Flat Assembler. Location - путь до fasm.exe/fasm.dll (только Win32). @@ -66,7 +66,7 @@ Error - код ошибки(FASM_OK если всё прошло успешно) OutStr - строка которую выдаёт компилятор. -Lines - подробная информашия об ошибках (подробнее см. TFasmLine). +Lines - подробная информация об ошибках (подробнее см. TFasmLine). TFasmLine=record Line:UInt32; @@ -75,4 +75,4 @@ Lines - подробная информашия об ошибках (подро Line - номер строки с ошибкой. -File - имя файла с ошибкой('' или файл из папки темпа подразумевает что это код реоеданный в FasmAssembleFile или FasmAssembleFileToFile). \ No newline at end of file +File - имя файла с ошибкой('' или файл из папки темпа подразумевает что это код переданный в FasmAssembleFile или FasmAssembleFileToFile).