ARM Assembly: Lesson 1 (MOV, Exit Syscall)

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ก.ค. 2024
  • Welcome to Lesson 1 of the ARM Assembly Series from LaurieWired!
    In this video, we will cover how registers work, create some simple ASM source code, go over a few basic assembly instructions, as well as all the prerequisites you will need for future videos in this series.
    00:00 Intro
    01:02 ARM Emulator Options
    02:50 GCC Prereqs
    03:28 Creating ASM Source Code
    04:14 What are these Registers?
    06:23 Coding ARM ASM
    08:30 Why not "Hello World"?
    09:05 Using Special Registers
    10:57 MOV Instruction
    12:38 SWI (Passing Execution)
    13:24 Compiling
    15:33 Checking Exit Code
    16:07 CPULator
    17:20 Recap
    ---
    Software Links Mentioned in Video:
    CPUlator: cpulator.01xz.net/
    ARM Developer Suite Assembler Guide: developer.arm.com/documentati...
    ChromeOS Syscall Table: chromium.googlesource.com/chr...
    ---
    laurieWIRED Twitter:
    / lauriewired
    laurieWIRED Website:
    lauriewired.com
    laurieWIRED HN:
    news.ycombinator.com/user?id=...
    laurieWIRED Reddit:
    / lauriewired
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 118

  • @immaculate6244
    @immaculate6244 6 วันที่ผ่านมา +3

    Finally someone teaching this like a regular programming course. Very hard to find such videos. Have this in my college coursework, and they don't teach the basics patiently at all. So happy I found this

  • @aihtdikh
    @aihtdikh ปีที่แล้ว +117

    Lovely to see that people in the present day, present time, are still connecting to the Wired. Nice work.

  • @chris3079
    @chris3079 หลายเดือนก่อน +2

    how am I just discovering this channel now, I thought I landed on a 7 year old video and then checked the date. Amazing production. Learned also.

  • @keterclassentity6716
    @keterclassentity6716 3 หลายเดือนก่อน +7

    I don't plan on ever doing anything with this knowledge but hearing someone talk passionately about stuff they know about is the best and this channel is a beauty for that

  • @jordanjackson6151
    @jordanjackson6151 หลายเดือนก่อน +2

    I just started Assembly today (On the higher level, I've learned Python and Lua so far).
    I'd accidently landed on your channel when you were cosplaying while reviewing sort algorithm code. I've always wanted to learn Assembly language. But now I'm subscribed (could've sworn I already was...).
    Isn't it positively-ironic that the person who invented Assembly is a woman? And you're teaching it really well! Awesome and intuitive vids.

    • @shulogou4234
      @shulogou4234 หลายเดือนก่อน

      I have learned assembly language before, but gave up halfway. I also saw LaurieWired's video in the recommended videos on the homepage. After clicking in to watch it, I immediately followed her. LaurieWired's lectures are so damn good. I hope I won't give up halfway this time.

  • @ilForni
    @ilForni 6 หลายเดือนก่อน +16

    i'm so happy to have found this well-done tutorial after tons of searches! thanks a lot!

  • @tackvector
    @tackvector 8 หลายเดือนก่อน +4

    Restarting this series just for the heck of it. Thanks for your hard work!

  • @pretzelogic2689
    @pretzelogic2689 4 หลายเดือนก่อน +1

    Cannot wait to go through all of this series -- and then the rest of your vids. Can't see how I've missed you so long. Thanks for a great presentation.

  • @mattordiway1955
    @mattordiway1955 ปีที่แล้ว +4

    Can't wait for the rest of this series. You do a great job at stepping through this slowly. I feel like only you and Ben Eater take this much time to explain assembly to people. Love it!

  • @kalei91
    @kalei91 ปีที่แล้ว +3

    simple and to the point, glad I finally found a good ARM ASM tutorial video, keep it up!

  • @mareknovotny7808
    @mareknovotny7808 5 หลายเดือนก่อน +10

    omg I love the overall aesthetic of your lessons, keep it up :)

  • @paulinoleal5592
    @paulinoleal5592 ปีที่แล้ว +18

    Broooo whatttt!!!!! This Chanel is a gem 💎

  • @BLSrr
    @BLSrr 4 หลายเดือนก่อน +1

    The most cost effective solution to run arm on real HW is to connect a rpi Zero 2 (not Zero 1 - has armv6) or any other rpi 2..5 (rpi5 has a armv8)headless over USB to you system and connect with ssh to it. Great introduction! -- Happy coding! --

  • @natnif6345
    @natnif6345 ปีที่แล้ว +15

    ur channel is awesome you deserve way more of a following. Also the animation with the menu and the clicking is really satisfying for some reason

    • @RetroPaul6502
      @RetroPaul6502 4 หลายเดือนก่อน

      The audio and visual easter eggs embedded in the various videos is unusual, niche, and quite well done. Using easter eggs here to mean "so obscure that the historical reference is easily missed."

  • @jackk3094
    @jackk3094 ปีที่แล้ว +1

    Cant wait to see this channel grow, amazing content

  • @Edison-newworldBlogspot
    @Edison-newworldBlogspot ปีที่แล้ว +1

    Good work Laurie. The flow is super...

  • @tbthanh7420
    @tbthanh7420 8 หลายเดือนก่อน +2

    Thank you, your voice is so nice so it make assembly easier to learn.

  • @moonmakesmagic
    @moonmakesmagic หลายเดือนก่อน +1

    The production on this is epic

  • @neilclay5835
    @neilclay5835 10 หลายเดือนก่อน +1

    Brilliant presentation and teaching style.

  • @appusage299
    @appusage299 ปีที่แล้ว

    cant wait for next lession, great works

  • @someuser3383
    @someuser3383 ปีที่แล้ว

    Thank you for this course. Continue, please.

  • @jcohen661
    @jcohen661 4 หลายเดือนก่อน +1

    Very clear and concise. Thank you!

  • @PeterUnboxing
    @PeterUnboxing 3 หลายเดือนก่อน +2

    If you would do such a series also for the RISC-V architecture, you would be the greatest person in the world.

  • @gvnpeacock
    @gvnpeacock หลายเดือนก่อน

    This is so well done. I first learned Arm assembly at Apple developing drivers for Apple Newton. I sure wish there'd been something like this around back then!

  • @cstrovn
    @cstrovn ปีที่แล้ว

    This was great, hope you keep up!

  • @N0RT0X
    @N0RT0X 7 หลายเดือนก่อน

    This is the channel that I need

  • @OfficialViper
    @OfficialViper 4 หลายเดือนก่อน

    Your channel is such a gem

  • @vaibhavsijaria
    @vaibhavsijaria 4 หลายเดือนก่อน +3

    Very underrated channel

  • @sushiConPorotos
    @sushiConPorotos 21 วันที่ผ่านมา

    Lovely. I liked the explanation of what a register is: "a small memory location in the processor." Yes, actually, like 4nm, tiny thing :D

  • @noname-ck6ld
    @noname-ck6ld 2 หลายเดือนก่อน

    you're awesome. thanks for the series.

  • @ka7znm
    @ka7znm 2 หลายเดือนก่อน +9

    I am going to nitpick your choice of words... values are not passed to registers... registers are used to pass values to the system call. It is possible that this detail is no longer correct, as I am an old fart. But "passing" was always something that happened with parameters or data between processes or to and from functions. Registers get written or read. Thank you for great video.

    • @user-ys3ev5sh3w
      @user-ys3ev5sh3w หลายเดือนก่อน

      Write argument read parameter.

    • @ka7znm
      @ka7znm 15 วันที่ผ่านมา

      @@user-ys3ev5sh3w I don't want an argument.

  • @martinmaartensson
    @martinmaartensson ปีที่แล้ว +1

    High quality content :-)

  • @flopasen
    @flopasen ปีที่แล้ว +1

    great tutorial, keep going!!

  • @chrishabgood8900
    @chrishabgood8900 2 หลายเดือนก่อน

    man we did a ton of assembly 30 yrs ago in college, been a WHILE!!!

  • @MrWaalkman
    @MrWaalkman 4 หลายเดือนก่อน

    Been a minute since I've seen Neko running around on the screen... And nice tutorial, too. :)

  • @kailashbtw9103
    @kailashbtw9103 3 หลายเดือนก่อน

    This was SUCH an interesting video! So cool to have more smart STEM girlies like me :) I am in a systems level class and we have been covering assembly recently, did not know about cpulator but its a great resource for getting practice!

  • @user-ev6pe8ib7e
    @user-ev6pe8ib7e 5 หลายเดือนก่อน

    great work....

  • @st0rm129
    @st0rm129 3 วันที่ผ่านมา

    I liked the fastest I could the moment I saw that Lain edit lmfaooo least based assembly practitioner

  • @davidomar742
    @davidomar742 3 หลายเดือนก่อน +1

    na this girl is too good of an actress holy shit

  • @kolosso305
    @kolosso305 ปีที่แล้ว +3

    Cool tutorial, but I'm just here for the corgis :)

  • @Buddharta
    @Buddharta ปีที่แล้ว +4

    Nice! Thank you for this video series! What do you think about following along using an arm sbc? Do you think there might be some problems if it is 64bit or another version of the arm ISA?

    • @lauriewired
      @lauriewired  ปีที่แล้ว +2

      There shouldn't be issues using an ARM sbc as long as it's not a significantly different/super old ISA. ARM64 will cause a few differences to the register sizes and such, but most of the overall concepts will be the same.
      As long as you are on ARMv7 or higher most of these lessons should just work as expected.

  • @user-hc9dw9gb5w
    @user-hc9dw9gb5w 3 หลายเดือนก่อน +1

    reminds me of x86 DOS asm programming, with all these "mov ax, 4c00h" and "int 21h".

    • @rty1955
      @rty1955 หลายเดือนก่อน

      The x86 is so brain dead

  • @norm1124
    @norm1124 20 วันที่ผ่านมา

    So happy to see this familiar face known for competence after starting the video 🫶

  • @Mantikor333
    @Mantikor333 6 หลายเดือนก่อน +1

    PC register is always increased by 4 because of the 32bit(=4byte) architecture?
    I am looking forward to the rest of the playlist! Thank you for sharing!

  • @guigomez3441
    @guigomez3441 5 หลายเดือนก่อน +1

    hey, excellent !! Do you have the same guide for x86 or x86-64 assembly than your ARM website guide for instructions?
    Thanks a lot!

  • @Hex-Mas
    @Hex-Mas หลายเดือนก่อน

    asm the best lang for virr in the 90's

  • @vx-iidu
    @vx-iidu ปีที่แล้ว +1

    are you planning to do a series on x64 asm as well?

  • @davidhand9721
    @davidhand9721 4 หลายเดือนก่อน

    People who know assembly are 80% sexier than those that don't.

  • @SleepyChoco
    @SleepyChoco ปีที่แล้ว

    👍👍

  • @Yu-Fei-Hung
    @Yu-Fei-Hung หลายเดือนก่อน

    I can’t stop watching the videos because three reasons:
    1.- interest on ARM assembly
    2.- used to watch SEL when I was in college back in the 90’s
    3.- the quality of the content and production
    Best regards from México ! 👍

  • @HiddenTraveler
    @HiddenTraveler หลายเดือนก่อน +2

    Hint for GCC v12 on RPi5 with 64bit Raspberry Pi OS:
    If at @15:25 you get: "./hello: cannot execute: required file not found" just add "-static" after "-nostdlib"

    • @redpillcommando
      @redpillcommando 25 วันที่ผ่านมา +1

      Thank you for posting this. I just found this series and I was wondering if it was possible to just use a Raspberry Pi for this. I take it from your above post that this is in fact possible.

  • @chmanie
    @chmanie 3 หลายเดือนก่อน

    Could one also use a Raspberry Pi in the local network to develop on?
    Thank you for these video series, really nice to follow along

  • @donjude9585
    @donjude9585 29 วันที่ผ่านมา

    Your too Cool 😎.

  • @Alitar1212
    @Alitar1212 2 หลายเดือนก่อน

    This girls editing so wild it had me wondering what linux distro shes using for the first min

  • @MaxCarponera
    @MaxCarponera หลายเดือนก่อน

    Just a question. What benefit do you have in using gcc to link the program like it was C ? That's why the linker misses the stdlib, because it's not C. The assembler program is compiled after the "as" command, you can just link and generate the executable with "ld". "ld" will look for "_start" label, not the "main" function, and generate the executable file.

  • @shefiroth12
    @shefiroth12 8 หลายเดือนก่อน +5

    Hi, thank you for the video.
    I couldn't run the program using the gcc command you provided on raspberry pi 4.
    I need to modify it
    `arm-linux-gnueabi-gcc -o hello hello.o -nostdlib -no-pie -nostartfiles`
    hope it's helpful

    • @brianh.000
      @brianh.000 4 หลายเดือนก่อน

      Yes, that was helpful.. But why? When I tried to run hello, I got "cannot execute: required file not found", but after using "-no-pie -nostartfiles", it worked fine, and I got "42". What magic did those flags do?

    • @brianh.000
      @brianh.000 4 หลายเดือนก่อน

      I didn't end up needing the "-nostartfiles" flag, but did need the "-no-pie" flag.
      "-no-pie" is apparently for disabling the default PIE (position independent executable)... 🤔🤔

    • @naelpontes8444
      @naelpontes8444 4 หลายเดือนก่อน +2

      ​@@brianh.000For those interested, the problem here is related to memory layout.
      By default, compilers try to generate position independent executables (PIE). That's because they're smaller in size. These executables have their code and data sections placed at random memory addresses during runtime. However, Raspberry Pi being an embedded system, its hardware has a limited amount of memory with specific reserved regions. So you will need to disable PIE by making the executable a position dependent executable (PDE) instead. The trade-off here is that PDEs tend to be much larger files.

    • @oliverdowning1543
      @oliverdowning1543 หลายเดือนก่อน +1

      Thank you SO MUCH. Absolutely saved me I’ve been struggling for bat half an hour trying to get this damned ELF to run.

    • @tkonan
      @tkonan หลายเดือนก่อน

      @@naelpontes8444 Hey there. How does this compare with @HiddenTraveler's recent suggestion to use '-static', can you say?

  • @chiranjeebdas709
    @chiranjeebdas709 หลายเดือนก่อน

    Beauty with talent... thanks for the explanation

  • @standardtemplateconstruct1596
    @standardtemplateconstruct1596 4 หลายเดือนก่อน +4

    i'm person who spent best years of my career rewriting CoreGraphics and UIKit from outside of Apple from scratch using Hopper as guidance, yet managed to never learn asm because it's lame and tedious. your glorious high quality videos, (naturally or intentional? :) leery eyes and lovely voice just sucks me into learning that things i should have just learn years ago. thank you so much you are the best teacher i ever had, and i can see boys of future learning how to combat our future computer overlords by your immortal art!
    ❤❤❤❤❤❤❤❤❤

  • @breves
    @breves 4 หลายเดือนก่อน +1

    Are you reeeally on Copland OS? I thought that OS was just for super_secret_agents and pirates of the Caribbeans:)

  • @johnkunze5362
    @johnkunze5362 ปีที่แล้ว

    I have a gambas3 ide for arm available. No gdb yet. In /use/bin you wll find the abi-as linked to as. In 64b this is the same so I'm soft-linked to as7 for 32b leaving as for 64b. Also, align 4 all .data's or bus error, and add .arch arm7-a before code and data.🤒🙏🥰

  • @mr.shredder5430
    @mr.shredder5430 5 หลายเดือนก่อน

    is learning arm asm good for audio hardware

  • @chiragmalik3872
    @chiragmalik3872 3 หลายเดือนก่อน

    hey can you or someone tell me what do you do? and how can i achieve it?

  • @polycoder
    @polycoder 4 หลายเดือนก่อน

    which microphone do you use?

  • @standardtemplateconstruct1596
    @standardtemplateconstruct1596 4 หลายเดือนก่อน

    vim with key bindings ❤❤❤❤❤❤❤❤❤❤❤❤

  • @redpillcommando
    @redpillcommando 25 วันที่ผ่านมา

    I know this is a one year old video and this may be a stupid question, but can anyone tell me why I could not just use a Raspberry Pi 4 for this. The Pi is a native ARM after all and it runs Linux and even has the "as" command built in?

  • @tuworlds
    @tuworlds 7 วันที่ผ่านมา

    ok so what can build if i was to look into arm programming

  • @ak0904
    @ak0904 6 หลายเดือนก่อน

    please make tutorial for x64 / x86 as well if possible

  • @ajdarseidzade688
    @ajdarseidzade688 หลายเดือนก่อน +1

    18:08 - Look, this very beautiful girl can also play the double bass!!!

  • @breves
    @breves 4 หลายเดือนก่อน

    if you get an error :cannot execute binary file: Exec format install do sudo apt install -y qemu-user-static binfmt-support
    sudo dpkg --add-architecture amd64
    sudo apt update
    sudo apt install libc6:amd64

  • @standardtemplateconstruct1596
    @standardtemplateconstruct1596 4 หลายเดือนก่อน

    notice: your likeness and art are expropriated in name of humankind. thank you for your service, blessings upon your gene-line

  • @emerelle3535
    @emerelle3535 4 หลายเดือนก่อน

    I like elves, maybe I should look further into this!

  • @deadbeef2482
    @deadbeef2482 ปีที่แล้ว +4

    is there anything you *can't* do? 🤯🤔

  • @standardtemplateconstruct1596
    @standardtemplateconstruct1596 4 หลายเดือนก่อน

    EDIT: correction , orthodox asm docs are present

  • @Avokadik13
    @Avokadik13 ปีที่แล้ว

    Dude, visuals so awesome. Mostly that kind of tutorials is looks and sounds like shit.
    P.s. What's that music in the end? Sounds familiar

    • @lauriewired
      @lauriewired  ปีที่แล้ว +3

      Thanks for the compliment! The end song is Thanatos from Neon Genesis Evangelion ;)

    • @Avokadik13
      @Avokadik13 ปีที่แล้ว

      @@lauriewired thx

  • @ihack4free
    @ihack4free 5 หลายเดือนก่อน

    Now do it in x86 and talk about Movfuscator!

  • @Team6OWG
    @Team6OWG ปีที่แล้ว

    Can you go over RISC-V?

    • @sushiConPorotos
      @sushiConPorotos 21 วันที่ผ่านมา

      Yeah, and I also need a tutorial for the HAL-9000 assembly code please.

  • @standardtemplateconstruct1596
    @standardtemplateconstruct1596 4 หลายเดือนก่อน

    yall fans please train LoRA for Master Engineer's face and body likeness and channel chrome, we got other wars to fight at the moment

  • @lucascamposhs
    @lucascamposhs 5 หลายเดือนก่อน

    joga y joga

  • @arvinnick
    @arvinnick 7 หลายเดือนก่อน

    OK let me bring my soldering iron and multimeter. I'm going to make some robots.

  • @standardtemplateconstruct1596
    @standardtemplateconstruct1596 4 หลายเดือนก่อน

    EDIT: labels explanations

  • @standardtemplateconstruct1596
    @standardtemplateconstruct1596 4 หลายเดือนก่อน

    EDIT: missing stack explanation!

  • @standardtemplateconstruct1596
    @standardtemplateconstruct1596 4 หลายเดือนก่อน

    EDIT: obscure unorthodox assembly docs

  • @sergshutk2757
    @sergshutk2757 8 หลายเดือนก่อน +1

    Вам не обязательно использовать Azure для работы с ARM-кодом. Если у вас Linux-x86(-64) вы можете работать с ARM-кодом прямо из терминала. Для этого необходимо установить binutils для соответствующих архитектур.
    th-cam.com/video/Wk4o7OjXmEw/w-d-xo.html - не сочтите за рекламу. В том видео веду подготовительную часть по работе с ассемблером GAS и описываю необходимые инструменты для работы. Так же есть продолжение в других видео, но не для новичков, точнее не для совсем новичков.

    • @standardtemplateconstruct1596
      @standardtemplateconstruct1596 4 หลายเดือนก่อน

      EDIT: refer to Laurie's video about Android Docker (it's probably arm right)

  • @standardtemplateconstruct1596
    @standardtemplateconstruct1596 4 หลายเดือนก่อน

    REQUEST: please play test your videos if they can be comprehended without looking at screen (for blind people and listeners)

  • @YoutubeBorkedMyOldHandle_why
    @YoutubeBorkedMyOldHandle_why หลายเดือนก่อน

    Eeeooowwww! ... You're recommending that we pay for microsoft's azure?? Why not use an ARM development board, for example one of the STM32 Nucleo boards, or even a cheaper Bluepill or Blackpill STM32 based boards for a couple of bucks from China? Writing assembly on these is loads of fun, and being hardware, your code can actually do 'hardware' type stuff, (blink LEDs etc.), which is kind of the point to assembly anyway.

    • @shulogou4234
      @shulogou4234 หลายเดือนก่อน +3

      "another option is going to be CPUlater and this is available online for free"

    • @YoutubeBorkedMyOldHandle_why
      @YoutubeBorkedMyOldHandle_why หลายเดือนก่อน

      @@shulogou4234 Thank you, first time I've seen this one. Looks pretty cool though, so I'll have to take it for a spin later. Actually I'm probably more interested in Risc-V these days, but I see they also have some for support it.

    • @PhillyGunson
      @PhillyGunson หลายเดือนก่อน +2

      She works for Microsoft.

  • @RoadToFuture007
    @RoadToFuture007 4 หลายเดือนก่อน

    11:58 Opps!?

    • @brianh.000
      @brianh.000 4 หลายเดือนก่อน

      Hmm? #42 vs #0x42 ??

    • @RoadToFuture007
      @RoadToFuture007 4 หลายเดือนก่อน

      @@brianh.000Yes, that's what I thought. But it is still a hex, she is right ;)

  • @TrippleXD545
    @TrippleXD545 2 หลายเดือนก่อน +1

    ngl kinda poser of you to use windows (also azure nooooooo)

  • @rty1955
    @rty1955 หลายเดือนก่อน

    A register IS part of a CPU, not next to it.
    I have beem writing assembly code on IBM mainframes since 1969. Witten millions of lines of code, some of which is still in operation today.
    Since the 60s mainframes have 16 general purpose registers. You are not LIMITED to math in 1 or 2 registers. We never have to define sections of code as TEXT, or DATAb etc. Its all memoryn the CPU dont care what you put in it. Another dumb idea of the micro world.
    Fun fact: mainframes dont have a stack or a stack pointer either. Its really useless

  • @0xbitbybit
    @0xbitbybit 4 หลายเดือนก่อน

    What's the point in learning all of this, I'm too late to the party, everything will be much more secure in a few years with the mass transition to languages like Rust, C/C++ will be a thing of the past. Therefore 70-80% of all vulnerabilities will no longer exist.

    • @brianh.000
      @brianh.000 4 หลายเดือนก่อน

      Care to make a wager? 🤣

    • @standardtemplateconstruct1596
      @standardtemplateconstruct1596 4 หลายเดือนก่อน

      you must be kidding right, updated software in wild is simply rarity even in iOS land, outside of iOS updated software exists only on state of art servers, pumpkin friend🎉

    • @standardtemplateconstruct1596
      @standardtemplateconstruct1596 4 หลายเดือนก่อน +1

      gosh software engineer / actress teacher. look at her emotional display she is either training with script or deserves oscar in education

    • @standardtemplateconstruct1596
      @standardtemplateconstruct1596 4 หลายเดือนก่อน

      EDIT in rerender: CPULator is blah tool

    • @ladyville3
      @ladyville3 3 หลายเดือนก่อน +1

      You can just have AI do everything for you, until you can’t remember any phone number…..