Login Register






Tutorial ARM [Part 2: Writing basic programs] filter_list
Author
Message
RE: ARM [Part 2: Writing basic programs] #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]
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)
all in one instruction, in one step:
Code:
ADD R0, R2, R1, LSL #25

[+] 1 user Likes phyrrus9's post
Reply





Messages In This Thread
RE: ARM [Part 2: Writing basic programs] - by phyrrus9 - 03-18-2018, 02:19 AM