m68k-atari-mint-objdump: display DEVPAC/Motorola syntax?

C and PASCAL (or any other high-level languages) in here please

Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

User avatar
simonsunnyboy
Moderator
Moderator
Posts: 5101
Joined: Wed Oct 23, 2002 4:36 pm
Location: Friedrichshafen, Germany
Contact:

m68k-atari-mint-objdump: display DEVPAC/Motorola syntax?

Postby simonsunnyboy » Wed Apr 16, 2014 6:38 pm

m68k-atari-mint-objdump can be used to disassemble object files generated with gcc/as.
By default it uses the ugly gcc/Intel format:

Code: Select all

$ m68k-atari-mint-objdump -D main.o

main.o:     file format a.out-zero-big


Disassembly of section .text:

00000000 <.LC0>:
   0:   7072              moveq #114,%d0
   2:   6573              bcss 77 <_main+0x67>
   4:   7320              071440
   6:   616e              bsrs 76 <_main+0x66>
   8:   7920              074440
   a:   6b65              bmis 71 <_main+0x61>
   c:   790a              074412
   ...

00000010 <_main>:
  10:   2f0a              movel %a2,%sp@-
  12:   2f02              movel %d2,%sp@-
  14:   4eb9 0000 0000    jsr 0 <.LC0>
  1a:   31fc 0f04 8240    movew #3844,ffff8240 <_main+0xffff8230>
  20:   203c 0000 0000    movel #0,%d0
  26:   2f00              movel %d0,%sp@-
  28:   3f3c 0009         movew #9,%sp@-
  2c:   4e41              trap #1
  2e:   5c8f              addql #6,%sp
  30:   3f3c 0001         movew #1,%sp@-
  34:   4e41              trap #1
  36:   548f              addql #2,%sp
  38:   4240              clrw %d0
  3a:   241f              movel %sp@+,%d2
  3c:   245f              moveal %sp@+,%a2
  3e:   4e75              rts



Is therew a way to make it display the classic Motorola/DEVPAC syntax instead?
Simon Sunnyboy/Paradize - http://paradize.atari.org/

Stay cool, stay Atari!

1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3474
Joined: Sat Jun 30, 2012 9:33 am

Re: m68k-atari-mint-objdump: display DEVPAC/Motorola syntax?

Postby dml » Wed Apr 16, 2014 8:23 pm

IIRC you can use the -M option to influence output syntax, but the options are 'intel' or 'att' for AT&T. Haven't tried it with m68k objdump though, so the 'intel' term might be 'mot' or something else - not sure.

Code: Select all

-M options
--disassembler-options=options

User avatar
simonsunnyboy
Moderator
Moderator
Posts: 5101
Joined: Wed Oct 23, 2002 4:36 pm
Location: Friedrichshafen, Germany
Contact:

Re: m68k-atari-mint-objdump: display DEVPAC/Motorola syntax?

Postby simonsunnyboy » Thu Apr 17, 2014 10:13 am

I hoped so but the --help does not elaborate on the options and no parameters to -M option seem to have effect. I'll check if I can find a text file desprition somewhere.

The man page lists some options for VAX, Intel and SPARC targets but none for m68k. I find this surprising because I know that gcc and its utilities were originally developped on Unix workstations with m68k cpus inside.
Simon Sunnyboy/Paradize - http://paradize.atari.org/

Stay cool, stay Atari!

1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee

BlankVector
Captain Atari
Captain Atari
Posts: 476
Joined: Wed Oct 24, 2007 7:52 pm
Location: France
Contact:

Re: m68k-atari-mint-objdump: display DEVPAC/Motorola syntax?

Postby BlankVector » Thu Apr 17, 2014 10:35 am

simonsunnyboy wrote:m68k-atari-mint-objdump can be used to disassemble object files generated with gcc/as.
By default it uses the ugly gcc/Intel format:
...
Is therew a way to make it display the classic Motorola/DEVPAC syntax instead?

This is the "MIT syntax", and yes, it is ugly.

As you discovered, it has been a long time that gas an can accept the normal Motorola syntax as input, but not on output.

Unfortunately, objdump sill uses the ugly MIT syntax when disassembling. While everyone on the binutils mailing list agrees that it would be better to use the Motorola syntax instead, no one did the change yet. There are not much people interested in m68k nowadays.
Subscribe to my Vretrocomputing channel on YouTube and Facebook. Latest video: Atari ST video modes.


Social Media

     

Return to “C / PASCAL etc.”

Who is online

Users browsing this forum: No registered users and 2 guests