flat assembler
Message board for the users of flat assembler.

Index > DOS > MASM/ArrowSoft Asm to FASM conversion

Author
Thread Post new topic Reply to topic
RicardoFco



Joined: 15 Apr 2009
Posts: 7
RicardoFco
How I can translate sources for MASM/ArrowSoft Asm to FASM?

EDIT by DOS386 : corrected subject to match post content
Post 15 Apr 2009, 16:47
View user's profile Send private message Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo
Why do you want to? Do you absolutely need to use FASM?

JWasm is intended to be MASM v6 compatible (or v5 if you use -Zm):

http://www.japheth.de/JWasm.html

I'm not saying it isn't possible with some macros for FASM, but you'll have to be more specific which parts you want to translate.

P.S. FASM does not support OMF/OBJ.
Post 15 Apr 2009, 18:00
View user's profile Send private message Visit poster's website Reply with quote
RicardoFco



Joined: 15 Apr 2009
Posts: 7
RicardoFco
Yes , I absolutely need to use FASM.
I have the files MASM.exe and LINK.exe but I prefer to use FASM.
I want to translate the files created with BASM286 (Basic2MSAsm translator by Kevin Diggins, you can found it at the bottom of this page http://www.bcxgurus.com/ )
Post 15 Apr 2009, 19:00
View user's profile Send private message Reply with quote
RicardoFco



Joined: 15 Apr 2009
Posts: 7
RicardoFco
No Answers? Sad
Post 20 Apr 2009, 16:21
View user's profile Send private message Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1901
DOS386
RicardoFco wrote:
No Answers? Sad


There are several threads on this subject, distributed around all subforums here. There is no 100% automatic converter (yet ?), the 2 are simply ways too different. One thing is NOMYSO - it reportedly converts from MASM (or TASM ?) to NASM, and it's PEARL, not an executable, and it didn't work for me Sad If you post some offending code, you might get some help (as happened in the past). Drop "assume" "offset" "ptr" "addr" "proton" , put prefixes into the brackets [es:bp-4] , drop all the offending directives, ... There are also some MASM emulation macro's (HLL, proc, proc16 ? , assume ? , struct ?), but they are part of Win32 includes, not necessarily/well usable for 16-bit real mode code.
Post 25 Apr 2009, 11:18
View user's profile Send private message Reply with quote
pelaillo
Missing in inaction


Joined: 19 Jun 2003
Posts: 878
Location: Colombia
pelaillo
I have done large translations of masm code to fasm and I find it easy to take the disassembled dump from Ollydbg (in IDEAL mode) and then paired it with the sources in a spreadsheet in order to recover labels and variable names. It also have the advantages of get rid of those high level constructions that I dislike and to get some optimizations that the assembler does.
Unfortunately, this process is not suitable for automation.

Using this approach, it's about 2 hours per 1000 lines of masm code (depending on the quality of masm sources)
Post 27 Apr 2009, 13:49
View user's profile Send private message Yahoo Messenger Reply with quote
RicardoFco



Joined: 15 Apr 2009
Posts: 7
RicardoFco
Thanks for the answers.
I think that the best solution is translate the code templates of BASM286 from MASM to FASM and compile again the Compiler/Translator again.
Post 29 Apr 2009, 21:43
View user's profile Send private message Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo
Besides just wanting it, why would you need to use FASM here? I'm not just whining or picking on you, it's just that FASM isn't really intended to be 100% MASM compatible and especially doesn't support 16-bit OBJ linkable output. Besides, if you want a 386+ BASIC, try FreeBASIC, it's probably easier to use!
Post 02 May 2009, 09:35
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17284
Location: In your JS exploiting you and your system
revolution
There is nothing like the right tool for the right job.

And this is nothing like the right tool for the right job.
Post 02 May 2009, 09:41
View user's profile Send private message Visit poster's website 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-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.