Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #198017 > unrolled thread

Cross-Platform Assembly Language Compilers?

Started bycyaiplexys <cyaiplexys@sitesplace.net>
First post2018-07-26 14:30 +0200
Last post2018-08-05 13:40 +0200
Articles 8 — 5 participants

Back to article view | Back to linux.debian.user


Contents

  Cross-Platform Assembly Language Compilers? cyaiplexys <cyaiplexys@sitesplace.net> - 2018-07-26 14:30 +0200
    Re: Cross-Platform Assembly Language Compilers? deloptes <deloptes@gmail.com> - 2018-07-26 20:20 +0200
      Re: Cross-Platform Assembly Language Compilers? Joe <joe@jretrading.com> - 2018-07-26 22:00 +0200
    Re: Cross-Platform Assembly Language Compilers? Erik Christiansen <dvalin@internode.on.net> - 2018-07-27 06:40 +0200
      Re: Cross-Platform Assembly Language Compilers? cyaiplexys <cyaiplexys@sitesplace.net> - 2018-07-30 14:20 +0200
        Re: Cross-Platform Assembly Language Compilers? Erik Christiansen <dvalin@internode.on.net> - 2018-08-05 11:10 +0200
          Re: Cross-Platform Assembly Language Compilers? T BkRl <krusete@gmail.com> - 2018-08-05 11:30 +0200
          Re: Cross-Platform Assembly Language Compilers? Erik Christiansen <dvalin@internode.on.net> - 2018-08-05 13:40 +0200

#198017 — Cross-Platform Assembly Language Compilers?

Fromcyaiplexys <cyaiplexys@sitesplace.net>
Date2018-07-26 14:30 +0200
SubjectCross-Platform Assembly Language Compilers?
Message-ID<wfNz3-2CI-1@gated-at.bofh.it>
Thanks to a very nostalgic thread, now I'm curious about something else. 
Back in the day I used to do assembly language programming on a Tandy 
Color Computer 3 with Disk-based EDASM+.

I'm wondering what is the best assembler/compiler for the x86 (64-bit) 
system?

I'd like to try a native compiler but also I would like to have 
something I could compile for Arduino (here we go again) and ARM and 
other CPUs as well.

However, for now I'd like to just stick to x86. I would imagine that 
would be easiest since I could test right on the laptop. And it's 
something I've always wanted to learn.

I don't plan to really do anything major with it (we have C, Python, 
Perl and a host of other languages for real programs).

[toc] | [next] | [standalone]


#198026

Fromdeloptes <deloptes@gmail.com>
Date2018-07-26 20:20 +0200
Message-ID<wfT1L-62A-3@gated-at.bofh.it>
In reply to#198017
Hi,
cyaiplexys wrote:

> Thanks to a very nostalgic thread, now I'm curious about something else.
> Back in the day I used to do assembly language programming on a Tandy
> Color Computer 3 with Disk-based EDASM+.
> 

well, times have changed since.

> I'm wondering what is the best assembler/compiler for the x86 (64-bit)
> system?
> 

Is your google broken today?

> I'd like to try a native compiler but also I would like to have
> something I could compile for Arduino (here we go again) and ARM and
> other CPUs as well.
> 

Here we go again - true :) these are different and pretty vague
formulations: Arduino mostly AVR. ARM != AVR.
For AVR you may have advantage of using assembler. For ARM I doubt unless
you write firmware or drivers or similar. So basically start with C - there
are tons of tutorials and examples also many Arduino or whatever projects.
Just meet your best friend Google :) 
Come to the list when you have debian user related questions.


> However, for now I'd like to just stick to x86. I would imagine that
> would be easiest since I could test right on the laptop. And it's
> something I've always wanted to learn.

It actually doesn't matter or better what does matter is what you want to
achieve. Again it is too vague from your side, but one advice from me.

Imagine you want to make a chair out of wood. This is the goal and the
context for you. You need specific tools and know how to operate them. If
the chair would be from plastic or iron - tools and skills were different.
So pick up a material first (draw a context line) and then look for the
tools and the skills.
So if you were developing gui it would be one thing, but if it were driver
another.

regards

regards

[toc] | [prev] | [next] | [standalone]


#198032

FromJoe <joe@jretrading.com>
Date2018-07-26 22:00 +0200
Message-ID<wfUAx-6QE-5@gated-at.bofh.it>
In reply to#198026
On Thu, 26 Jul 2018 20:10:47 +0200
deloptes <deloptes@gmail.com> wrote:


> 
> Here we go again - true :) these are different and pretty vague
> formulations: Arduino mostly AVR. ARM != AVR.
> For AVR you may have advantage of using assembler. For ARM I doubt
> unless you write firmware or drivers or similar. 

If we're still on the nostalgia kick, I remember using an ARM assembler
in 1989. Nothing whatever like a CISC instruction set, it was more like
that of the Nova and other 70s minis, for exactly the same reasons. I
particularly recall writing a colour-based cellular automaton.

-- 
Joe

[toc] | [prev] | [next] | [standalone]


#198038

FromErik Christiansen <dvalin@internode.on.net>
Date2018-07-27 06:40 +0200
Message-ID<wg2HL-3Ab-1@gated-at.bofh.it>
In reply to#198017
On 26.07.18 08:29, cyaiplexys wrote:
> I'd like to try a native compiler but also I would like to have something I
> could compile for Arduino (here we go again) and ARM and other CPUs as well.

$ apt-cache search avr | more
arduino - AVR development board IDE and built-in libraries
libavresample-dev - FFmpeg compatibility library for resampling -
development files
libavresample4 - FFmpeg compatibility library for resampling - runtime
files
gcc-avr - The GNU C compiler (cross compiler for avr)
avrdude-doc - documentation for avrdude
avr-libc - Standard C library for Atmel AVR development
gdb-avr - The GNU Debugger for avr
avrdude - software for programming Atmel AVR microcontrollers
binutils-avr - Binary utilities supporting Atmel's AVR targets

When you install gcc-avr, binutils-avr will also be installed, else
gcc-avr can't produce executables. You can use avr-as to assemble your
own assembler source files, but if you put your *.S files through
gcc-avr, then you can use the 'C' header files, with cpp doing the macro
mappings.

Unless arduinoing, you'll probably want to install "make", as it's very
handy for building a code suite. (Duno what arduino uses, but IDEs
usually try to appear to do something more than the elements of a CLI
build environment - aka "*nix is the IDE")

Once entangled in the peripherals (initialisation and utilisation) of
one CPU, you'll find enough to learn that hopping on to the next target
will not immediately appeal. However, what you learn of the GNU
toolchain on one target is equally applicable to the next. (E.g. ld,
objdump, nm, ar, gprof, gdb, readelf, ...)

Read the avrdude manpage and avrdude-doc for suitable programming
dongles, or just hop on ebay. Maybe buy a couple of arduinos while there,
leave the bootloader intact, and produce your code with the GNU toolchain
if arduino "sketches" seem too naff. They're easier, than a laptop, to
screw to a post if the project is a computerised birdfeeder. (And easier
to power out there.)

Arduino: # apt-get install arduino
         Then read all doco, and google.

X86: Similar to above.

Erik

[toc] | [prev] | [next] | [standalone]


#198093

Fromcyaiplexys <cyaiplexys@sitesplace.net>
Date2018-07-30 14:20 +0200
Message-ID<whfjA-7yT-15@gated-at.bofh.it>
In reply to#198038
On 07/27/2018 12:31 AM, Erik Christiansen wrote:
> On 26.07.18 08:29, cyaiplexys wrote:
>> I'd like to try a native compiler but also I would like to have something I
>> could compile for Arduino (here we go again) and ARM and other CPUs as well.
> 
> $ apt-cache search avr | more
> arduino - AVR development board IDE and built-in libraries
> libavresample-dev - FFmpeg compatibility library for resampling -
> development files
> libavresample4 - FFmpeg compatibility library for resampling - runtime
> files
> gcc-avr - The GNU C compiler (cross compiler for avr)
> avrdude-doc - documentation for avrdude
> avr-libc - Standard C library for Atmel AVR development
> gdb-avr - The GNU Debugger for avr
> avrdude - software for programming Atmel AVR microcontrollers
> binutils-avr - Binary utilities supporting Atmel's AVR targets

Awesome! I also will hope that there is an x86 assembler and maybe even 
an ARM assembler in there as well (I just want to tinker with assembly 
language for different types of systems).

[toc] | [prev] | [next] | [standalone]


#198279

FromErik Christiansen <dvalin@internode.on.net>
Date2018-08-05 11:10 +0200
Message-ID<wjncZ-4bo-9@gated-at.bofh.it>
In reply to#198093
On 30.07.18 08:11, cyaiplexys wrote:
> On 07/27/2018 12:31 AM, Erik Christiansen wrote:
> > On 26.07.18 08:29, cyaiplexys wrote:
> > > I'd like to try a native compiler but also I would like to have something I
> > > could compile for Arduino (here we go again) and ARM and other CPUs as well.
> > 
> > $ apt-cache search avr | more
> > arduino - AVR development board IDE and built-in libraries
> > libavresample-dev - FFmpeg compatibility library for resampling -
> > development files
> > libavresample4 - FFmpeg compatibility library for resampling - runtime
> > files
> > gcc-avr - The GNU C compiler (cross compiler for avr)
> > avrdude-doc - documentation for avrdude
> > avr-libc - Standard C library for Atmel AVR development
> > gdb-avr - The GNU Debugger for avr
> > avrdude - software for programming Atmel AVR microcontrollers
> > binutils-avr - Binary utilities supporting Atmel's AVR targets
> 
> Awesome! I also will hope that there is an x86 assembler and maybe even an
> ARM assembler in there as well (I just want to tinker with assembly language
> for different types of systems).

If your desktop/laptop has an Intel chip, then the native toolchain will
be x86. What I tend to do for that is:

# apt-get install gcc
# apt-get install build-essential linux-headers-$(uname -r)
# apt-get install gcc-4.1-doc glibc-doc manpages-dev binutils-doc

Where the "4.1" will be a higher number now. (See what apt-cache search
finds.)


And for arm:

$ apt-cache search gcc-arm
gcc-arm-linux-gnueabi - GNU C compiler for the armel architecture
gcc-arm-linux-gnueabihf - GNU C compiler for the armhf architecture

You'll be able to get yourself into no end of interesting (not to
mention challenging) situations if you tackle those two and AVR at the
same time.

If you make it as far as tweaking linker scripts, then the info page is
infinitely more informative than the manpage.

Good luck!

Erik

[toc] | [prev] | [next] | [standalone]


#198280

FromT BkRl <krusete@gmail.com>
Date2018-08-05 11:30 +0200
Message-ID<wjnwl-4hE-7@gated-at.bofh.it>
In reply to#198279

[Multipart message — attachments visible in raw view] — view raw

I use Debian amd64 to develop for 68k and have been for some time now! It works great. If anyone needs assistance with this kind of setup let me know. I also used to compile for PowerPC but no longer have any PowerPC machines running. (I love em but they eat up too much dang electricity)


________________________________
From: Erik Christiansen <dvalin@internode.on.net>
Sent: Sunday, August 5, 2018 5:00 AM
To: debian-user@lists.debian.org
Subject: Re: Cross-Platform Assembly Language Compilers?

On 30.07.18 08:11, cyaiplexys wrote:
> On 07/27/2018 12:31 AM, Erik Christiansen wrote:
> > On 26.07.18 08:29, cyaiplexys wrote:
> > > I'd like to try a native compiler but also I would like to have something I
> > > could compile for Arduino (here we go again) and ARM and other CPUs as well.
> >
> > $ apt-cache search avr | more
> > arduino - AVR development board IDE and built-in libraries
> > libavresample-dev - FFmpeg compatibility library for resampling -
> > development files
> > libavresample4 - FFmpeg compatibility library for resampling - runtime
> > files
> > gcc-avr - The GNU C compiler (cross compiler for avr)
> > avrdude-doc - documentation for avrdude
> > avr-libc - Standard C library for Atmel AVR development
> > gdb-avr - The GNU Debugger for avr
> > avrdude - software for programming Atmel AVR microcontrollers
> > binutils-avr - Binary utilities supporting Atmel's AVR targets
>
> Awesome! I also will hope that there is an x86 assembler and maybe even an
> ARM assembler in there as well (I just want to tinker with assembly language
> for different types of systems).

If your desktop/laptop has an Intel chip, then the native toolchain will
be x86. What I tend to do for that is:

# apt-get install gcc
# apt-get install build-essential linux-headers-$(uname -r)
# apt-get install gcc-4.1-doc glibc-doc manpages-dev binutils-doc

Where the "4.1" will be a higher number now. (See what apt-cache search
finds.)


And for arm:

$ apt-cache search gcc-arm
gcc-arm-linux-gnueabi - GNU C compiler for the armel architecture
gcc-arm-linux-gnueabihf - GNU C compiler for the armhf architecture

You'll be able to get yourself into no end of interesting (not to
mention challenging) situations if you tackle those two and AVR at the
same time.

If you make it as far as tweaking linker scripts, then the info page is
infinitely more informative than the manpage.

Good luck!

Erik

[toc] | [prev] | [next] | [standalone]


#198290

FromErik Christiansen <dvalin@internode.on.net>
Date2018-08-05 13:40 +0200
Message-ID<wjpy9-5tc-7@gated-at.bofh.it>
In reply to#198279
On 05.08.18 18:59, Erik Christiansen wrote:
> If you make it as far as tweaking linker scripts, then the info page is
> infinitely more informative than the manpage.

s/the info page/the info page for ld

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web