eportillo
Posts: 1
Joined: Mon May 21, 2018 12:40 pm

Good ARM64 Assembly lesssons? also what version of arm for each rpi model

Mon May 21, 2018 12:53 pm

I am a beginner programmer and I am looking into making operating systems. In order for me to pull off my OS though, I will have to create the bootloader and program a Python interpreter (i know it's not good for a lot of things but im taking baby steps so bare with me) The only tutorials I found for ARM ASM were for the 32-bit ones. So are there any good ones for ARM64 (by the way i am trying to go crossplatform so what are the architectures for the other ones besides rpi3?)

Heater
Posts: 9213
Joined: Tue Jul 17, 2012 3:02 pm

Re: Good ARM64 Assembly lesssons? also what version of arm for each rpi model

Mon May 21, 2018 3:12 pm

eportillo,

If you are a beginning programmer, writing an operating system and Python interpreter are gigantically huge baby steps!

Not that I want to discourage you.

If you want to go cross-platform then you want to make most of your bootloader, operating system and whatever else in a high level language that can be used on different processor architectures. That is why the Linux operating system and many others are written in C. If you write it in assembler then you have to write it all again for each different processor architecture.

You will probably need some assembler code for very processor specific code. But that can be kept to a minimum.

There are tons of architectures out there.

ARM, as used on the Pi, mobile phones, embedded systems etc. In both 32 bit and 64 bit variants. Very different.

x86, as used in PC's and Macs. Again in 32 bit and 64 bit variants. Again each very different.

RISC V. A new open instruction set standard that is on the rise.

Then there are the good old war horses, Motorola 68000, MIPS, Spark, IBM Power etc, etc.

Anyway, as a start, I think it's a great idea to get familiar with assembler. Even if you end up not writing most of your code in assembler it teaches an appreciation of what is going on "under the hood" in your computer. I suggest you check the sticky threads in bare metal form here: viewforum.php?f=72 and then have a look through the rest of it.

jahboater
Posts: 2622
Joined: Wed Feb 04, 2015 6:38 pm

Re: Good ARM64 Assembly lesssons? also what version of arm for each rpi model

Mon May 21, 2018 4:07 pm

eportillo wrote:
Mon May 21, 2018 12:53 pm
so what are the architectures for the other ones besides rpi3?)
If you mean the other Raspberry Pi models, then the Pi Zero is ARMv6
The old Pi2 was ARMv7, and the new Pi2, the Pi3, and the latest Pi3+ are all ARMv8.
These last are Cortex-A53 cpu's with NEON. They can run in 64-bit mode.

The ARMv8 architecture reference manual (the ARM ARM :) ) is here:-

https://static.docs.arm.com/ddi0487/ca/ ... v8_arm.pdf

The individual instruction descriptions are easy enough to follow.
Look for section C - the A64 instruction set.

The assembler is called "as" or you can use the C compiler.

The debugger is "gdb"
I suggest using "layout reg" in gdb then si or ni to step through single instructions watching the register contents change as you go. The registers affected by each instruction are shown in inverse video.

Return to “Other programming languages”

Who is online

Users browsing this forum: No registered users and 3 guests