This is truly brilliant how you take the time to break this down. I teach RE on C in ARM 64 and ARM 32 and I rarely see such good coverage of ARM well done!
@LowLevelLearning
3 жыл бұрын
Glad you enjoyed it!
@mytechnotalent
3 жыл бұрын
@@LowLevelLearning its brilliant thank for taking the time to do it. I would love t see a Raspberry Pi Pico raw Assembly tut if that interested you. We have the SDK from the RPI but its binding are focused more on C which is good but anyway im babbling...
@dragonofmissingno170
3 жыл бұрын
Just found your channel through another video. I have already learned how to enter thumb mode for the purpose of more efficient programs on the Nintendo GBA. The KZitemr ChibiAkumas has several videos on ARM assembly as well. Just for a computer/game system angle. Subbed for more Pi Pico and Assembly videos. I like lower-level programming over those generic Python and other programming tutorial videos KZitem wants to recommend me.
@LowLevelLearning
3 жыл бұрын
Happy to hear it! Welcome to the channel
@williamdrum9899
2 жыл бұрын
Same here, I learned about thumb mode from Chibiakumas' videos too. Something else I learned about GBA was that the bios calls are different depending on whether you're in ARM or THUMB mode. In ARM mode they're bit-shifted to the left 16 times. So in thumb mode you would do SWI 0x06 but in ARM you do SWI 0x06
@pokemettilp8872
3 жыл бұрын
I have two questions. What exactly does branch exchange do? And can you write thumb for aarch64 or is that not supported, are the only two modes aarch64 and aarch32?
@LowLevelLearning
3 жыл бұрын
From the ARMv8 manual "AArch64 state supports only a single instruction set, called A64. This is a fixed-length instruction set that uses 32-bit instruction encodings." :(
@kurtttttttt
Жыл бұрын
i wish you were around when i was learning arm assembly in undergrad!
@eFeXuy
3 жыл бұрын
Cool. Now, let's say you would want to do that from the comfort of C, how would one tell the compiler? Asking for a friend.
@LowLevelLearning
3 жыл бұрын
Good question! With ARM gcc, you can you the -mthumb flag to compile that piece of code to thumb mode. You will need to separate your C files into which ones you want to be thumb mode and which ones you want to be ARM. This is the answer at the compiler level, there may be C preprocessor flags that I'm not aware of that will have the same effect.
@eFeXuy
3 жыл бұрын
@@LowLevelLearning I tried compiling for the RPi Pico with #pragma GCC target ("thumb") but the output files are a couple of bytes larger instead of smaller, and then I tried passing to Cmake CMAKE_C_FLAGS "-mthumb" but that spews errors about processor does not support such and such instruction in thumb mode.
@minirop
2 жыл бұрын
@@eFeXuy the pico is an M0+ than only support thumb mode.
@hugoboyce9648
2 жыл бұрын
Wow I wish I would have found this channel earlier! Thanks man!
@hanspeterbestandig2054
2 жыл бұрын
Excellent explanation! Thank your!
@hstrinzel
Жыл бұрын
Thumbs UP. BIGLY!
@JGHFunRun
2 жыл бұрын
4:59 that was so funny to me I literally fell out of my chair
@triularity
2 жыл бұрын
Would it be cleaner to jump/unconditional branch to the thumb address (+1) during assemble time rather than compute it at runtime? And than same to switch back (masking out the lsb, if needed). That way you're not eating up all the saved bytes with mode swapping instructions. I'm kind of surprised the assembler doesn't emit a warning (or even an error) if you switch between modes and don't modify the instruction pointer in some way immediately before the transition.
@danielmagnus5239
2 жыл бұрын
What type of computer are you using? Where did you get that? And what OS is you running under?
@jasonlin5884
2 жыл бұрын
Cool ! But question here, in Thumb mode any conditional instruction (except conditional branch instructions ) need to be in a IT block ( if then block ), am i right ? for example it eq moveq r0,r1
@balbino4
2 жыл бұрын
Thank you very much!
@sebscripts
9 ай бұрын
Can you make a arm32/aarch32 tutorial?
@ruditook2367
2 жыл бұрын
how did you run the programs without qemu-arm.
@LambdaJack
2 жыл бұрын
That's like the Great Architect from Happy Three Friends.
@snandi1603
2 жыл бұрын
Awesome!!
@MDarkus3
3 жыл бұрын
When I run my binary I got an error : -bash: ./001.elf: cannot execute binary file: Exec format error
@williamdrum9899
2 жыл бұрын
1:58 Once the CPU performs the jump, is PC odd or even? Does it actually start executing at an odd address?
@LowLevelLearning
2 жыл бұрын
No, its starts executing at an even address, but in Thumb mode.
@xtdycxtfuv9353
Жыл бұрын
Why is it called THUMB?
@lostulutz8526
2 жыл бұрын
When I run my binary I got an error : -bash: ./001.elf: cannot execute binary file: Exec format error
@lostulutz8526
2 жыл бұрын
Searching for fault, fault detected, failure sits for device! ARM M type can only use thumb mode, ARM A type thumb and A32 using OS. But it is not possible, never ever executing a program in AMD64 written for ARM. Sorry, my fault!
@alexk4894
Жыл бұрын
@@lostulutz8526 It's possible to emulate. On linux you can install binfmt-support and qemu-user-static. This allows you to execute binaries for different architectures.
Пікірлер: 32