• 68k assembler

    From Mux@21:1/5 to All on Sun Oct 25 22:47:01 2015
    Howdy folks,

    I've been toying around with GCC but before I do that I just need a really simple assmebler. A68k seems to work well but spits out object files and I can't seem to find the linker, which kinda sucks.
    Anyone know where I can find a straight-forward assembler, preferably public domain that just lets me do stuff like this:

    org $0

    dc.l start
    dc.l stack_pointer_address

    org $200

    main:
    lea blah,a0
    jmp main

    org $80000

    dc.l main

    Thanks!

    -Y

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael Schwingen@21:1/5 to Mux on Mon Oct 26 20:34:16 2015
    On 2015-10-26, Mux <yvo.zoer@gmail.com> wrote:
    I've been toying around with GCC but before I do that I just need a really simple assmebler. A68k seems to work well but spits out object files and I can't seem to find the linker, which kinda sucks.
    Anyone know where I can find a straight-forward assembler, preferably public domain that just lets me do stuff like this:

    Try Alfred Arnold's macroassembler:

    http://john.ccac.rwth-aachen.de:8000/as/

    It will do 68000, as well as lots of other CPUs.

    cu
    Michael

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bruce Mardle@21:1/5 to Mux on Mon Oct 26 14:12:01 2015
    On Monday, 26 October 2015 05:47:01 UTC, Mux wrote:
    I've been toying around with GCC but before I do that I just need a really simple assmebler.

    Hi, Mux.
    I've been using Easy68k (http://www.easy68k.com/). As distributed it only does plain 68000 but it also has a simulator (which keeps track of clock cycles) and a few other bits (e.g. convert S-records (which are pretty simple) to raw binary, which I'm
    using). (I built a 68010 version by uncommenting some of the source but the simulator doesn't support the differences).
    I'll probably be using it tomorrow to try your ideas for testing for odd address registers :-)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Schultz@21:1/5 to Mux on Mon Oct 26 17:35:23 2015
    On 10/26/2015 04:58 PM, Mux wrote:
    Anyone here point me in the right direction?

    Mux


    CP/M-68K included an assembler and two different linkers. You could try
    editing the source until it compiles on your system or just run under a simulator.

    --
    David W. Schultz
    http://home.earthlink.net/~david.schultz
    Returned for Regrooving

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mux@21:1/5 to Bruce Mardle on Mon Oct 26 14:58:26 2015
    On Monday, October 26, 2015 at 2:12:02 PM UTC-7, Bruce Mardle wrote:
    On Monday, 26 October 2015 05:47:01 UTC, Mux wrote:
    I've been toying around with GCC but before I do that I just need a really simple assmebler.

    Hi, Mux.
    I've been using Easy68k (http://www.easy68k.com/). As distributed it only does plain 68000 but it also has a simulator (which keeps track of clock cycles) and a few other bits (e.g. convert S-records (which are pretty simple) to raw binary, which I'm
    using). (I built a 68010 version by uncommenting some of the source but the simulator doesn't support the differences).
    I'll probably be using it tomorrow to try your ideas for testing for odd address registers :-)

    Hi There!

    Yeah, I've been screwing around with eas68k and to be perfectly honest, I'm not that impressed with it. All I want is to be able to create 'hard' rom-able files (68k only). I've managed to re-compile a68k but need the source to the linker so I can make
    it output straight binaries, which would be awesome..

    Anyone here point me in the right direction?

    Mux

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mux@21:1/5 to All on Tue Oct 27 13:10:43 2015
    I'll add that to the list :-)

    For GCC, I found a link to a 5.x.x version that runs standalone using MinGW. Does anyone know where I can describe the memory map for the linker as well as the vector table? Other than that it seems to work sorta alright...

    If anyone's interested I'll see if I can find the link and post it here..

    -Mux

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marco@21:1/5 to All on Wed Oct 28 05:35:42 2015
    Le 27/10/2015 21:10, Mux a écrit :
    I'll add that to the list :-)

    For GCC, I found a link to a 5.x.x version that runs standalone using MinGW. Does anyone know where I can describe the memory map for the linker as well as the vector table? Other than that it seems to work sorta alright...

    If anyone's interested I'll see if I can find the link and post it here..

    -Mux


    From http://bitsnbikes.blogspot.fr/2010/02/das-blinklicht-with-gcc-elf-m68k.html

    OUTPUT_FORMAT(srec)
    OUTPUT_ARCH(m68k)
    OUTPUT(rom.srec) /* The default filename, if -o is missing */
    SEARCH_DIR(.) /* include CRT0.S */
    /* removed libraries path pointing nowhere, might need to correct
    this... - JS */

    /* Define where RAM and EPROM areas reside.
    * This gives the linker a rough possibility to detect errors while
    linking,
    * for example a .text-section growing bigger than 64k.
    * Don't rely too heavy on this, it can detect only very crude errors.
    */
    /* moved before sections -JS */
    MEMORY {
    rom : ORIGIN = 0x00080000, LENGTH = 64K
    ram : ORIGIN = 0x00000400, LENGTH = 511k /* after the 1k byte of
    vectors */
    }

    SECTIONS
    {
    /* Text section at start of ROM
    * The next line tells the linker that the EPROM on my board starts
    * at 0x00080000. The command AT (0) places the code on address
    0 in
    * the S-Record output file, ready for burning in an EPROM.
    */
    .text 0x00080000 : AT (0)
    {
    LONG (0x00080000) /* RESET SSP - JS */
    LONG (___main) /* RESET PC - JS */
    __s_text = . ; /* Define a symbol */
    * (.text)
    CONSTRUCTORS
    __e_text = . ; /* Those symbols are used by crt0.S */
    } > rom

    /* Data section; initialisation data is stored immediately
    * after the text section in the ROM, but is loaded for
    * use in RAM
    * Again, the first address (0x00000400) tells the linker where
    * the RAM is mapped, while AT (SIZEOF(.text)) puts the initial
    data
    * into the output file right after the end of the .text section,
    * from where it can be copied into RAM on startup.
    */

    .data 0x00000400 : AT (SIZEOF(.text))
    {
    __s_data = . ; /* Symbols, to know where to */
    *(.data)
    __e_data = . ; /* copy the data. */
    } > ram

    /* BSS section:
    * 0x00000400 + SIZEOF(.data) places the .bss-section into the RAM
    * right after the .data-section. The defined symbols enable the
    * startup code to clear this RAM area.
    */
    .bss 0x00000400 + SIZEOF(.data) :
    {
    __s_bss = . ; /* We should be able */
    *(.bss)
    *(COMMON)
    __e_bss = . ; /* to clear the bss. */
    } > ram
    }

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jeff Jonas@21:1/5 to All on Wed Oct 28 23:07:37 2015
    I used a minimal 68008 kit around 16 years ago
    and documented it here:
    http://ferretronix.com/tech/sbc/index.html#68k

    Additional documentation is here:
    http://ferretronix.com/tech/68k/

    such as Application Note AN897: MC68008 minimum configuration system
    and
    ; 68EC000 MONITOR Version 2.10, modified April 6, 2003.
    ;
    ; Based on Antonakos's monitor with substantial changes
    ; since the original version lacked many features.
    ; Register display, register modify, tracing and
    ; break-pointing were added by Sol Rosenstark (SR).


    -- jeffj

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mux@21:1/5 to All on Wed Dec 16 16:09:54 2015
    I managed to find the source for A68k. Unfortunately, you need to linker to turn it into a binary. Does anyone know where to find that?
    Upside of re-compiling A68k is that it actually works in a 64-bit environment and can be adapted..

    -Mux

    P.S. Thanks for all the offline answers ;-)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zoltan Kocsi@21:1/5 to All on Thu Dec 17 21:55:26 2015
    If you are going to use gcc as C compiler, why don't you use binutils
    as well? That has an assembler and a linker and a librarian and
    everything that you might need. Plus the GNU assembler has a fairly
    decent macro facility, plus you can run your assembly source through
    the C preprocessor as well, which makes it very easy to share
    definitions between ASM and C.

    --
    Zoltán Kócsi
    Bendor Research Pty. Ltd.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From BobH@21:1/5 to Zoltan Kocsi on Thu Dec 17 17:01:40 2015
    On 12/17/2015 3:55 AM, Zoltan Kocsi wrote:
    If you are going to use gcc as C compiler, why don't you use binutils
    as well? That has an assembler and a linker and a librarian and
    everything that you might need. Plus the GNU assembler has a fairly
    decent macro facility, plus you can run your assembly source through
    the C preprocessor as well, which makes it very easy to share
    definitions between ASM and C.

    Does the GNU assembler accept Motorola like syntax? It used to be pretty wretched, but it has been years since I looked at it.

    Thanks,
    BobH

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zoltan Kocsi@21:1/5 to BobH on Fri Dec 18 15:43:35 2015
    On Thu, 17 Dec 2015 17:01:40 -0700
    BobH <wanderingmetalhead.nospam.please@yahoo.com> wrote:

    Does the GNU assembler accept Motorola like syntax? It used to be
    pretty wretched, but it has been years since I looked at it.

    Yes, gas supports both the Motorola and the MIT syntax.

    --
    Zoltán Kócsi
    Bendor Research Pty. Ltd.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bruce Mardle@21:1/5 to Zoltan Kocsi on Fri Dec 18 07:38:05 2015
    On Friday, 18 December 2015 04:45:49 UTC, Zoltan Kocsi wrote:
    On Thu, 17 Dec 2015 17:01:40 -0700
    BobH <wanderingmetalhead.nospam.please@yahoo.com> wrote:

    Does the GNU assembler accept Motorola like syntax? It used to be
    pretty wretched, but it has been years since I looked at it.

    Yes, gas supports both the Motorola and the MIT syntax.

    Don't forget to use the option --register-prefix-optional or you'll have to write "%D0", etc.

    IIRC I've never been able to find documentation on the syntax 68000 GNU as accepts :-(

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zoltan Kocsi@21:1/5 to All on Sat Dec 19 16:38:25 2015
    IIRC I've never been able to find documentation on the syntax 68000
    GNU as accepts :-(

    info gas might help?

    It has a section titled "9.21.3 Motorola Syntax"

    --
    Zoltán Kócsi
    Bendor Research Pty. Ltd.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bruce Mardle@21:1/5 to Zoltan Kocsi on Sat Dec 19 12:23:31 2015
    On Saturday, 19 December 2015 05:40:34 UTC, Zoltan Kocsi wrote:
    IIRC I've never been able to find documentation on the syntax 68000
    GNU as accepts :-(

    info gas might help?

    It has a section titled "9.21.3 Motorola Syntax"

    So it does! [blush]
    Thanks, Zoltán!
    (I'll read it later; up to my elbows in Z280 code today!)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)