flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Anatoly 27 Sep 2005, 13:25
Sorry, forgot to mention: my systyem is
WIndows XP Prof x64 on AMD Athlon64 3000+ Venice |
|||
![]() |
|
Tomasz Grysztar 27 Sep 2005, 14:25
As the name says, proc32.inc is designed for 32 bit. The proc64.inc is not finished yet, and so I have not yet made it available to the public.
|
|||
![]() |
|
Anatoly 27 Sep 2005, 15:08
Thank you Tomasz, but how could I solve this problem? Only wait for new version? Sorry for time you spent on me
|
|||
![]() |
|
Tomasz Grysztar 27 Sep 2005, 15:57
You can construct the procedure manually (also depending on the calling convention you want to use to call it), using the pure labels and standard instructions only.
If you want some example, please specify, how do you plan to call your procedures. |
|||
![]() |
|
Anatoly 27 Sep 2005, 17:25
Yes I already used this way with pure labels, but i got error 'illegal instruction' at the line
'export 'testdll64.DLL',ForwardStepTruncated,'ForwardStepTruncated' '... So I cannot export my so-called 'procedure'! If you'll be so kind, here is my code example... I plan to call fast and optimized DLL procedure from a Visual Basic 6 program... [It has to do with signal propagation in a neural network... Written in assembler DLL function works with defined in VB program's memory array, and writes calculations in the another array. Pointers to this array (and some other params) are stored on the stack, and further passed to this procedure ] How can I get this code to compile?? Thanks in advance! format PE64 GUI dll entry DllEntryPoint section '.code' code readable executable DllEntryPoint: ; hinstDLL,fdwReason,lpvReserved mov rax,0 ret ForwardStepTruncated: ;!!! My procedure sarts here! ;here stack parameters mNet equ rbp+16 dt_ptr equ rbp+24 V equ rbp+24 ;........................ dt_sent equ r14 ;prolog push rbp mov rbp,rsp ;end prolog finit fld1 mov rax,[dt_ptr] mov i,0 mov dt_sent,rax Next_i: ;....... ;....... cmp rax,i jne Next_i mov rax,1 ret ;ForwardStepTruncated endp section '.edata' export data readable export 'testdll64.DLL',ForwardStepTruncated,'ForwardStepTruncated' section '.reloc' fixups data discardable |
|||
![]() |
|
Tomasz Grysztar 27 Sep 2005, 17:54
You have to include export.inc to have the "export" macro. It is bitness neutral, so you can use it with 64-bit PEs aswell.
The macro packages that can be used with both PE and PE64 don't have the "32"/"64" at the end of names, like export.inc; the ones that can be used with Win32 PE files end with "32", like import32.inc and proc32.inc. I will add their equivalents for 64-bits in the future updates of the fasm for Windows package (the package may get updated with changed includes/examples even when the version of assembler stays the same). |
|||
![]() |
|
Anatoly 27 Sep 2005, 18:06
Thank you very much,Tomasz! I was really stupid! Wish you good luck, keep it real
![]() |
|||
![]() |
|
Reverend 27 Sep 2005, 18:10
By the way: you have something else wrong surely. Here:
Code: mov i,0 ... cmp rax,i |
|||
![]() |
|
Anatoly 27 Sep 2005, 18:33
2 Reverend:
Thanks, i published not all code i have written ![]() But u're right, i missed brackets with i ![]() |
|||
![]() |
|
alorent 20 Mar 2006, 12:35
Hello Anatoly,
Did you manage to create a 64-bit DLL? I have been trying with no success. Even I could compile and export funtions in my 64-bit DLL, Windows x64 says invalid windows image for my DLL. If someone could copy-paste the code to create the most basic DLL for x64 I will be really happy ![]() Thanks. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.