flat assembler
Message board for the users of flat assembler.

Index > Windows > Converting 32-bit codebase to 64-bit

Author
Thread Post new topic Reply to topic
a rabbit



Joined: 12 Oct 2009
Posts: 13
a rabbit 12 Jul 2014, 11:36
In one of my programs, which is written in C, I use an editor component called RAEdit, written in 32-bit assembly. Link: http://sourceforge.net/p/fbedit/code/HEAD/tree/SimEd/RAEdit/

I need to convert the program to 64-bit. The program itself is written in C, so it's not a problem, but is there some way to (semi)automatically convert RAEdit to 64-bit?

For what it's worth, the code heavily uses macros, such as if, while, invoke, which I believe should simplify the conversion. Typical source file from the codebase: http://sourceforge.net/p/fbedit/code/HEAD/tree/SimEd/RAEdit/Edit.asm

Any help is appreciated!
Post 12 Jul 2014, 11:36
View user's profile Send private message Reply with quote
ACP



Joined: 23 Sep 2006
Posts: 204
ACP 12 Jul 2014, 13:27
First of all I believe that the source code your are using is using MASM not FASM syntax. So if you are going to use it with FASM you need to convert the syntax first.

Secondly I'm not aware of any automatic conversion tools from 32 to 64 bit assembly language. The invoke macro has to be handle differently since calling convention is different both for Win32 and Win64 - consult MSDN for further explanation but besides using R* registers you also need to provide a so call shadow space.

Also SEH and other system structures are different (and under different addresses). Since you are using C the compiler may take care of exception handling for you but nevertheless if your code is using segment registers to access system structures if will fail.

So to make long story short without peeking much into the sources you provided, there is no (semi)automatically method of converting it to x64 I believe.
Post 12 Jul 2014, 13:27
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.