RE: ARM [Part 2: Writing basic programs] 03-18-2018, 02:19 AM
#3
(03-18-2018, 02:08 AM)Ender Wrote: Well that was uhhm... long... Nice though, thanks for writing this
I expected it to end at "Hello World", but nope, you dove into file I/O.
I'll get that NSP later today (I hope), and I'll also read part 3. Time to break out a Raspberry Pi, hell, maybe I'll even write an ARM kernel to learn more about this.
I find it interesting how ARM chose a 3-argument format, you generally see only 2.
I'm considering learning a few assemblies for the hell of it, MIPS, 6502, Z80, whatever else. Z80 would be an easy one though, I already know 8086...
They actually did some crafty stuff so that using 3-arg instructions and 32-bit fixed width wouldn't prevent you from doing the same things that you can with variable width.
![[Image: wOZGRtu.png]](https://i.imgur.com/wOZGRtu.png)
The example here being the very wise use of the barrel shifter, which iirc only ARM has. It allows you to effectively do
Code:
R0 <= R2 + (R1 << 25)Code:
ADD R0, R2, R1, LSL #25

























![[+]](https://sinister.li/images/modern/collapse_collapsed.png)