x86 Assembly - Hello World Explained

Поділитися
Вставка
  • Опубліковано 21 лис 2024

КОМЕНТАРІ •

  • @StephenEhrlichPhotos
    @StephenEhrlichPhotos 3 роки тому +141

    About 1970, I first started to learn programming. Initially I had to write in Machine Code (Binary). Later we learned Assembler, which was so much easier than Machine Code. Later the programming languages we could learn was Fortran or BASIC (the first iteration of BASIC). All of our code had to be punched onto Punch Cards and then loaded into the computer. Our modems were either 110 or 300 baud. (yes, very slow). So seeing a video about assembler brings back many memories.
    FYI -- the largest Assembler program I wrote in college was about 500 to 900 punch cards. (You did not want to drop your box of punch cards.)

    • @MaxCE
      @MaxCE 3 роки тому +7

      im afraid to ask how you wrote in binary

    • @StephenEhrlichPhotos
      @StephenEhrlichPhotos 3 роки тому +14

      @@MaxCE On punch cards, Only could use zero or one, and each instruction was the exact number of bits. Typically a first few bits were the instruction (add, subtract or compare.) and the remaining bits were the parameters, such as which register and maybe a constant. This was about 50 years ago, so I do not remember all the specifics.

    • @adaptablerubenvideos3097
      @adaptablerubenvideos3097 2 роки тому

      @@StephenEhrlichPhotos binary, that’s probably pretty insane if you are able to write on that language today because the only thing you see are numbers

    • @user-dn2ud7jl6i
      @user-dn2ud7jl6i 2 роки тому +2

      So insane i thought u was ironic

    • @restfulcube-notyet
      @restfulcube-notyet 2 роки тому +1

      Remarkable

  • @duttybwoy556
    @duttybwoy556 4 місяці тому +4

    note: it's no mandatory to put the numbers in hex form, you can use regular integers, assembly x86 accepts that equally, but of course knowing how to convert from regular numbers to hex abd vice versa, and from regular numbers to binary and vice versa is a necessary and very useful advantage in low level programming (assembly,C ,etc)

  • @ericchu4364
    @ericchu4364 2 роки тому +7

    This is the clearest video I have seen about assembly language. Thanks a lot.

    • @si1az0
      @si1az0 2 роки тому +1

      ikr I could actually follow along without errors somehow

  • @decoder6878
    @decoder6878 3 роки тому +11

    Damn!!!
    I never expected this content.
    Please make a series.
    Love your content!!! ❤️

  • @bishnudas3562
    @bishnudas3562 3 роки тому +8

    Finally I can add Assembly on my resume

  • @abrarmasumabir3809
    @abrarmasumabir3809 3 роки тому +7

    plz make a series on Assembly

  • @isomane7911
    @isomane7911 3 роки тому +2

    wow i did not expect x86 assembly here and although i've been learning it already, i'm still really excited

  • @ericmurithi8481
    @ericmurithi8481 Рік тому

    This is your first video I have seen and I'm so impressed. You teach well

  • @SVSingam273
    @SVSingam273 3 роки тому +3

    @NeuralNine. More tutorials on Assembly would be much appreciated. Really interesting.

  • @otiopo7459
    @otiopo7459 3 роки тому +27

    Why so underrated

    • @LukieHZX
      @LukieHZX 3 роки тому +1

      I found it after hours on my start page

    • @andrewlalis
      @andrewlalis 3 роки тому +1

      Cuz nobody writes asm

    • @otiopo7459
      @otiopo7459 3 роки тому +1

      @@andrewlalis what about other vids

  • @edinetgrunhed6000
    @edinetgrunhed6000 3 роки тому +1

    perfect !!! i like this video comparing assembly to C and how machine works

  • @rabibasukala7816
    @rabibasukala7816 3 роки тому +6

    why is he so underrated?

    • @MrHasooooni
      @MrHasooooni 3 роки тому

      i dont know it make me sad that he is not famous although his content is super rich !!

  • @ahmedahmedeg7941
    @ahmedahmedeg7941 2 роки тому

    I don't understand how this guys get low views in his videos, his content is really helpful and important

  • @oguzhantopaloglu9442
    @oguzhantopaloglu9442 3 роки тому +22

    can you actually do an assembly 8086 lesson/course?

  • @sw-code6027
    @sw-code6027 2 роки тому +9

    Hello Sir! I recently watched your PRINTING Hello World in Assembly language. I was quite impressed from that video and I understood it very well. Unfortunately there's only one video of Assembly language in your channel. Please it's my humble request to add more videos about Assembly language. Thanks a lot in advance

  • @malwareman2970
    @malwareman2970 3 роки тому +1

    The subtitle helped me ALOT!

  • @thomasgoodwin2648
    @thomasgoodwin2648 3 роки тому +4

    Trippin' back now to places I been to....
    I couldn't afford a decent assembler for my C64(6502/6510), so I wrote my own.
    The assembler itself was written in extremely tight Basic.
    Assy source files were written using Speedscript.
    I used it at the time mainly for a new threaded code compiler language I was working on.
    I don't think I could even imagine trying to solo write an assembler for modern systems today. How times have changed.

  • @RoyWalker-hc1gk
    @RoyWalker-hc1gk 7 місяців тому

    That is so amazing nothing like C at all but I think I will love this just as I love C.

  • @seekilm_
    @seekilm_ Рік тому

    so smooth im impressed

  • @MadGlitch
    @MadGlitch 3 роки тому +4

    Thanks so much for this, looking forward for more assembly content ! Maybe a course ?

  • @MutalibGozalov
    @MutalibGozalov 4 місяці тому +1

    well explained

  • @caleb22lr
    @caleb22lr 3 роки тому +4

    I've been writing assembly for a year now. it's awful and I hate it. I highly recommend learning it 10/10

  • @tonysofla
    @tonysofla 3 роки тому

    Assembler for a high-end CPU's like arm7 or x86 is not recommended, opcodes have many advanced variations like adding two registered and moving it to a third (MOV R1, R3, R8)
    6502 and msp430 assembler is OK, but learn to program in C "assembler style" state machine, let the compiler handle the var placement and initialization.

  • @achiyederi3622
    @achiyederi3622 3 роки тому +1

    Could you make a series out of it?.

  • @maxmuster7003
    @maxmuster7003 3 роки тому

    There are some deleloper manuals from INTEL and AMD for x86 CPU and there is an online assembler to test some instructions.

  • @Nathan-xv1nd
    @Nathan-xv1nd 7 місяців тому

    Please make a Assembly for beginners course please

  • @jedrzejkoszewski4342
    @jedrzejkoszewski4342 7 місяців тому

    Every 5 years, coding becomes 5 times easier. At present it's easy enough that anyone with enough time can create something with it and with A.I. on the horizon it will be easy enough that even complete amateur will be capable of creating something.

  • @codzo2628
    @codzo2628 3 роки тому +1

    Awesome content 👍👍

  • @mahmoudbechki8210
    @mahmoudbechki8210 3 роки тому

    Ur the best man keep it up ♥️🔥

  • @Brutalist_
    @Brutalist_ 2 роки тому

    Which font are u using ? Its look amazing

  • @baudyscars
    @baudyscars 2 роки тому

    more assembly please!

  • @turgutbababalm9981
    @turgutbababalm9981 3 роки тому

    please make more assembly!

  • @raghavsrivastava2910
    @raghavsrivastava2910 3 роки тому +1

    Why did you link , there was just one translation unit... please explain.

  • @javifontalva7752
    @javifontalva7752 2 роки тому

    Do you have a tutorial on x86 assembly?

  • @bgill7475
    @bgill7475 3 роки тому +2

    I'm a little confused, it says x86 in the title but you're using 64 bit registers?

    • @D0Samp
      @D0Samp 3 роки тому

      x86 is a family of processors and instruction sets (IA-16, IA-32 and 64-bit additions to it). Writing assembly for a Linux x86_64 program is a valid modern demonstration of it.
      The 32-bit hello world program looks exactly the same, except it's using 32-bit registers (eax, edi, esi, edx) and the SYSENTER instruction (or INT 0x80 if you're oldschool) since SYSCALL is an AMD invention that Intel processors only support in 64-bit mode.

  • @marsrocket
    @marsrocket 3 роки тому +3

    EQU is equals, isn’t it?

  • @informationgiant7697
    @informationgiant7697 Рік тому

    how does the code you wrote , understood by computer(or coverted to machine code)

  • @guilherme5094
    @guilherme5094 3 роки тому +1

    Nice!

  • @maxmuster7003
    @maxmuster7003 3 роки тому

    I like to write into the framebuffer.

  • @PoorSkill
    @PoorSkill 3 роки тому

    Thank you!!!

  • @raydonmuregi132
    @raydonmuregi132 Рік тому

    Learnt the MOV rax, 0x1 and what it means.
    Also how to start an assembly program.
    global _start
    section .something
    _start:
    I didn't quite catch the MOV rdi, 0x1
    and MOV rsi, msg. Just heard that it's something to do with buffers.
    Learnt about msg: DB "Hello World", 0xA. (A is ten in hex)
    And nasm installation. Assembly is machine dependent.
    Yeah. Okay.
    Just made sure I could type the little bits I got.

  • @elijahjflowers
    @elijahjflowers 2 роки тому

    Thanks

  • @velvethamster9809
    @velvethamster9809 2 роки тому

    Didn’t know Ricky Martin is well versed in Assembly language

  • @0verflowSec
    @0verflowSec 3 роки тому

    Keep it up...Love you

  • @maxmuster7003
    @maxmuster7003 3 роки тому

    How the text is written to the screen memory is not shown and not explained.

  • @billp37abq
    @billp37abq 2 роки тому

    Going to try this under Ubuntu.
    Author: machine, assembly and system programming for the ibm 360. 1969. Been using Forth interactive, incremental assemblers since ~1982. No link step. :) Batch assemblers 1960 technology. :(

    • @trs80model14
      @trs80model14 Рік тому

      Amazing how much of your list is still relevant!

    • @billp37abq
      @billp37abq Рік тому

      Experimenting writing machine code in portable transparent c bypassing assembler. Works on x86 and arm platforms so far. Let compiler writer tell us what machine codes to use.

  • @casinatorzcraft
    @casinatorzcraft 3 роки тому

    Is msglength stored in memory in the data section or assembled as a constant?

    • @shaiavraham2910
      @shaiavraham2910 3 роки тому

      It is assembled at compile time. The EQU directive instructs the compiler to replace all occurrences of msglength with the constant 0x20 (or the other constant it was set to). The object file has no idea what is msglength and it doesn't store it in memory. It only appears as a constant. It's very similar to a C or C++ macro or #define.

  • @thedevnoteyt
    @thedevnoteyt 3 роки тому

    Thanks ❤️

  • @muthurubant5812
    @muthurubant5812 3 роки тому

    🔥🔥🔥🔥

  • @xrafter
    @xrafter 3 роки тому

    What does NR means ?

  • @dexophobia
    @dexophobia 2 роки тому

    for some reason its saying my file (test.o) isnt a reconised format
    (command) ld -o test test.o

  • @himalpoudel7558
    @himalpoudel7558 3 роки тому +1

    set noshowmode to hide the original status

  • @asdasd-hr7xb
    @asdasd-hr7xb 2 роки тому

    Starts at 2:13.

  • @mohamedabdelrehem7698
    @mohamedabdelrehem7698 3 роки тому

    First❤

  • @Charly-cg6om
    @Charly-cg6om 14 днів тому

    He's simply comparing C to Python 0:26

  • @alejandroalzatesanchez
    @alejandroalzatesanchez 3 роки тому

    damn looks ez,
    i hope its ez

  • @amirabas8817
    @amirabas8817 3 місяці тому

    Wow
    I'm not that smart😂

  • @scriptkiddie6151
    @scriptkiddie6151 3 роки тому

    Firstttt

  • @raydonmuregi132
    @raydonmuregi132 Рік тому

    How to write hello world. 14 minutes💀☠

  • @isaacurban2790
    @isaacurban2790 Рік тому

    14 minutes

  • @Joey-dj4cd
    @Joey-dj4cd 10 місяців тому +1

    bro literally make a mistake in a Hello World program and couldn't figure it out. This talks a lot about ASSEMBLY

    • @volkwell-wk3eq
      @volkwell-wk3eq 10 місяців тому

      it tells you a lot about him as a programmer.

  • @trwwrt5687
    @trwwrt5687 2 роки тому

    section .text for what

    • @c3a118
      @c3a118 2 роки тому

      it is a section

    • @__gadonk__
      @__gadonk__ 2 роки тому

      @@c3a118 ....

    • @__gadonk__
      @__gadonk__ 2 роки тому

      @@c3a118 basically Memory is segmented into different segments that hold either data or instructions. I think it has to do with some limitations of the x86 architecture. That way you can load the diffrent parts of the programm into the corresponding segments by defining the section or segment inside it.