English Amiga Board

Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

Thread Tools
Old 09 October 2013, 21:09   #1

Asman's Avatar
Join Date: Sep 2005
Location: Somewhere
Posts: 731
Tool to convert asm to gnu asm (gas)

I'm looking for some tool which can convert asm source to gnu asm. Mean about some tool (Amiga/PC) which transfer for example

move #33,D0 --> move #33,%D0
clr.l -(sp) --> clrl %sp@-

and so on.
Asman is offline  
Old 10 October 2013, 20:23   #2
Registered User
Join Date: Aug 2004
Posts: 3,175
The two types of syntax are sometimes referred to as Motorola and MIT. So you could google something like: mit motorola syntax convert

Doing that brought up mention of a "mit2mot" program which is probably the same one as at http://ftp.back2roots.org/geekgadget...cc/mit2mot.lha. But that converts from Motorola to MIT syntax, not MIT to Motorola. This comp.sys.amiga.programmer thread from 1995 mentions a mot2mit tool, but I couldn't find that yet.

Update: Found it! mot2mit and mit2mot executables are in http://ftp.fi.netbsd.org/pub/amiga/g...cc263-base.lha

Last edited by mark_k; 10 October 2013 at 20:32.
mark_k is offline  
Old 11 October 2013, 16:05   #3

phx's Avatar
Join Date: Nov 2009
Location: Herford / Germany
Posts: 1,717
Originally Posted by Asman View Post
I'm looking for some tool which can convert asm source to gnu asm.
Why would you want to do that to your sources? There are free and portable cross assemblers which understand the original syntax.
phx is offline  
Old 11 October 2013, 16:59   #4
Computer Nerd

Thorham's Avatar
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 44
Posts: 3,091
Originally Posted by phx View Post
Why would you want to do that to your sources?
Because they want to use gnu asm for something
Thorham is offline  
Old 11 October 2013, 17:07   #5
Toni Wilen
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 45
Posts: 24,047
I think you only need d0 -> %d0 conversion. At least gcc (used in aros m68k) supports both syntax in addressing modes, for example clr.l -(%sp) does work.
Toni Wilen is online now  
Old 11 October 2013, 18:11   #6
Registered User

Join Date: Dec 2010
Location: Athens/Greece
Age: 49
Posts: 557
Cross-assembling this:
            movem.l a2-a3/a6,-(sp)

            move.l  4*4(sp),a3
            move.l  5*4(sp),a0
            lea   	6*4(sp),a1
            lea.l   stuffChar(pc),a2
            move.l  _SysBase,a6
            jsr     _LVORawDoFmt(a6)

            movem.l (sp)+,a2/a3/a6
with this:
m68k-amigaos-as -version
GNU assembler 2.14

works fine.
alkis is offline  
Old 12 October 2013, 12:45   #7
Registered User
Join Date: Nov 2012
Location: Willich/Germany
Posts: 176
You might try the MRI compatibility mode. Also using a good editor to replace the items via the regex replace function would be a good idea.
AnimaInCorpore is offline  

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need an ASM manual VoltureX Coders. General 2 17 November 2011 15:24
6502 Asm pmc Coders. General 21 06 November 2008 09:37
ASM Uni Course BippyM Coders. Tutorials 27 18 September 2008 10:37
Newbies to ASM BippyM Coders. Tutorials 24 06 June 2006 21:55
hex2ascii in asm redblade Coders. General 6 30 June 2005 10:56

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 14:17.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Page generated in 0.06709 seconds with 13 queries