Programming in assembler?

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
May one program a Raspberry Pi 3 in assembly language?  Yes, I would  
suppose, but what tools are available?  Naturally, I'd like free ones.
--  
Do, as a concession to my poor wits, Lord Darlington, just explain
to me what you really mean.
We've slightly trimmed the long signature. Click to see the full one.
Re: Programming in assembler?
On Wed, 24 Aug 2016 17:32:30 +0100,  
Quoted text here. Click to load it

Yes.  Writing assembly on linux is easy.

You should have an assembler already installed.  There are tons
of references and howtos on google to get you going.

If you want to do bare metal (no linux or Risc-OS) then it is still
possible but a bit more involved.

--  
Andy Leighton => snipped-for-privacy@azaal.plus.com
"We demand rigidly defined areas of doubt and uncertainty!"
We've slightly trimmed the long signature. Click to see the full one.
Re: Programming in assembler?
On 24/08/16 17:32, Peter Percival wrote:
Quoted text here. Click to load it

I assume Pis come with Gcc.


That will assemble OK


--  
"Women actually are capable of being far more than the feminists will  
let them."



Re: Programming in assembler?
On 24.8.16 19:32, Peter Percival wrote:
Quoted text here. Click to load it

Yes, you can. The assembler is included in the C compiler suite,
actually it is a part of the binutils package (binary utilities).

The assembler is called 'as' and the linker is 'ld'. However, you
may need to call C routines in the standard runtime library, libc,
to access operating system facilities.

--  

-TV


Re: Programming in assembler?
On 24/08/2016 20:38, Tauno Voipio wrote:
Quoted text here. Click to load it


On x86, at least, "as" is a bit of a pain to use. It is more suited to  
the output of gcc than for humans to use.

Is "as" as bad on Arm? Is there no more helpful free assembler for the RPi?


--  
James Harris


Re: Programming in assembler?
On Thu, 25 Aug 2016 13:29:32 +0100, James Harris wrote:

Quoted text here. Click to load it
It doesn't look too bad, especially if you set up a makefile to manage  
compilations.  

At a glance, its worst feature would seem to be its apparent insistence  
on using C-compatible entry points and exit methods.
  
Quoted text here. Click to load it
ARM supports their multi-OS assembler armasm but a quick search failed to  
find a Raspbian package of that name.


--  
martin@   | Martin Gregorie
gregorie. | Essex, UK
We've slightly trimmed the long signature. Click to see the full one.
Re: Programming in assembler?
On 25/08/16 14:10, Martin Gregorie wrote:
Quoted text here. Click to load it
http://arm.flatassembler.net/

compile from source that one.


--  
?it should be clear by now to everyone that activist environmentalism  
(or environmental activism) is becoming a general ideology about humans,  
We've slightly trimmed the long signature. Click to see the full one.
Re: Programming in assembler?
The Natural Philosopher wrote:
Quoted text here. Click to load it
Thank you for drawing my attention to that.

I've just noticed there's a book /Raspberry Pi Assembly Language  
RASPBIAN Beginners: Hands On Guide/ by Bruce Smith.  I know nothing  
about it beyond that it exists and has a clumsy title (is *really*  
called /Raspberry Pi Assembly Language RASPBIAN Beginners: Hands On  
Guide/?).

--  
Do, as a concession to my poor wits, Lord Darlington, just explain
to me what you really mean.
We've slightly trimmed the long signature. Click to see the full one.
Re: Programming in assembler?
Quoted text here. Click to load it

There are two versions of the book - 'Raspbian beginners' and 'RISC OS
beginners'.  The first edition was 'Beginners Hands on Guide' which was for
RISC OS but not specifically named in the title - after comments that this
was confusing the author produced two different versions in the second
edition.

Bruce Smith wrote one of the canonical 1980s ARM assembly books and I think
this book covers the area in a more up to date form, though I haven't seen
it.  (He also has a RPi RISC OS System Programming book I commented on when
it was in draft form).

Theo

Re: Programming in assembler?
On 27/08/2016 00:57, Theo Markettos wrote:
Quoted text here. Click to load it

That's understandable. "Beginners Hands on Guide" could mean many  
different things.

Why, for example, would the Guide have beginners' hands on him...? Let's  
say it is for a bit of practice at faith healing. I'll avoid any ribald  
interpretations. ;-)


--  
James Harris


Re: Programming in assembler?
On Sat, 27 Aug 2016 18:18:26 +0100

Quoted text here. Click to load it

    Especially if it is a Girl Guide.

--  
Steve O'Hara-Smith                          |   Directable Mirror Arrays
C:>WIN                                      | A better way to focus the sun
We've slightly trimmed the long signature. Click to see the full one.
Re: Programming in assembler?
On 28/08/16 10:22, Ahem A Rivet's Shot wrote:
Quoted text here. Click to load it
..scouting for boys....

--  
The biggest threat to humanity comes from socialism, which has utterly  
diverted our attention away from what really matters to our existential  
We've slightly trimmed the long signature. Click to see the full one.
Re: Programming in assembler?
On Sun, 28 Aug 2016 10:37:26 +0100

Quoted text here. Click to load it

    If you're looking for adventure of a new and different kind
    And you come across a girl scout who is similarly inclined
    Don't be nervous, don't be flustered, don't be scared
    Be prepared.

    Tom Lehrer (of course).

--  
Steve O'Hara-Smith                          |   Directable Mirror Arrays
C:>WIN                                      | A better way to focus the sun
We've slightly trimmed the long signature. Click to see the full one.
Re: Programming in assembler?
On 08/25/16 06:25, The Natural Philosopher so wittily quipped:
Quoted text here. Click to load it

hadn't heard of that assembler.  thanks.


Re: Programming in assembler?
On 25.8.16 15:29, James Harris wrote:
Quoted text here. Click to load it


ARM is a kind of a RISC computer, and they are notoriously hard
to program in assembler, but it is not as bad as Sparc or MIPS.

The problem is not in the assembler, but in the machine instruction
set. I leave most of the programs to C, and insert embedded assembly
when nothing else helps.

Anyway, ARM's instruction set is far more regular than what we
have on x86.

--  

-TV


Re: Programming in assembler?
On Thu, 25 Aug 2016 18:45:06 +0300

Quoted text here. Click to load it
  
!!!!???

You must be joking! I don't know the others but ARM is a dream.

It has an instruction set so short you can memorise it in a day.

Every operation can be performed on any register.

The way you can perform multiple operations on multiple registers in a single
instruction is positively inspired!


--  
W J G

Re: Programming in assembler?
On 25/08/2016 16:57, Folderol wrote:
Quoted text here. Click to load it

+1

In order of niceness: (IMHO)

ARM
68xxx
6800 (HD63xx)
Z80
8080
PIC16xxxx
.
.
.
.
x86 (especially with MASM)

6809 is a nice instruction set but I've never used it with gusto on a  
commercial job so if feels wrong to include it. Likewise PowerPC and MIPS4k.


Re: Programming in assembler?
Yes, there will be a small need for assembler, but these days, is there  
any pressing need to program in assembler for the vast majority of folk?  
  I've looked at some of the code produced by compilers in the last 5  
years or so and it's really quite good.  Yes, you can shave a little  
time off it by hand coding, but you would likely get a much greater  
saving by tuning your algorithms.  Use a code profiler to see where the  
bottlenecks are, and work on those.  That's my experience, anyway.
--  
Cheers,
David
We've slightly trimmed the long signature. Click to see the full one.
Re: Programming in assembler?
On 25/08/16 17:40, David Taylor wrote:
Quoted text here. Click to load it


Hey, this is amateur stuff. Assembler is FUN



--  
A lie can travel halfway around the world while the truth is putting on  
its shoes.

Re: Programming in assembler?
On Thu, 25 Aug 2016 17:50:31 +0100

Quoted text here. Click to load it

A 'detail' that seems to pass right over the heads of so many people.

--  
W J G

Site Timeline