Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5044

Bare metal, Assembly language • Re: What assembly language should i learn first: arm32 or arm64?

$
0
0
So its easy to try a simple program on both. The C compiler is handy because you can see how things are done.
Totally agree. It's also handy for seeing how instructions should be if you compile a big enough chunk of source code.
Having said that, on the latest Raspberry Pi OS (bookworm) you will find the assembler defaults to ARM64 and the compiler will emit ARM64 by default (you see what I mean, in this context, ARM32 is obsolete).
I don't know about Assembler defaults but my GCC on Bookworm appears to default to 'armv6' which I thought was 32-bit only -

Code:

pi@Pi4B:/tmp $ cat x.cint main(void) {}pi@Pi4B:/tmp $ gcc --versiongcc (Raspbian 12.2.0-14+rpi1) 12.2.0pi@Pi4B:/tmp $ gcc -S x.cpi@Pi4B:/tmp $ cat x.s        .arch armv6        .fpu vfp        .eabi_attribute 28, 1        ...

Statistics: Posted by hippy — Sat Apr 27, 2024 11:27 pm



Viewing all articles
Browse latest Browse all 5044

Trending Articles