Assembly language and machine code - Gary explains!

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ก.ย. 2024

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

  • @nezelg
    @nezelg 5 ปีที่แล้ว +437

    My husband, who was a student at MIT at the time, taught me to program in assembly language on our first date! It was a big help in understanding languages in future jobs that I had as a technical writer.

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

      So romantic :)

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

      Programmers are so bad at dating that they explain assembly language for a woman :( !
      But what's good that he won your heart :), wish you a long life!

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

      “Hey baby! akdj - jdbf= inr0 (1)
      😜💦”

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

      Girls nowadays will be freaked out if you show them these freaking codes on first date.

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

      @@biggSHNDO LMFAO

  • @farhaadali4245
    @farhaadali4245 3 ปีที่แล้ว

    Yup.....and I have recently done a course on "Computer Organization" and I loved machine and assembly level programming.

  • @biggSHNDO
    @biggSHNDO 4 ปีที่แล้ว

    Wasn’t expecting the “not understanding what youre saying” guy to pop up at the end- that was a slick visual reference, made me feel some humour. Almost laughed. Pretty good.
    Thanks for the video- learning JavaScript, exploring the BASE basics.

  • @elucidator1277
    @elucidator1277 8 ปีที่แล้ว +16

    Even though I don't code, I did feel like I got a lot from this video...even as a layperson. Thanks Gary. :D

  • @PihkalTheTihkal
    @PihkalTheTihkal 8 ปีที่แล้ว +39

    Back in the days (20 years ago) assembly was one of my favorite languages.
    Sure it was a lot of work to code in it but it was light and blazingly fast.
    I loved It!
    These days I'm more of a C kind of guy.
    Btw, great video Garry, you're the best content creator AA has!

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

      ok

    • @JohnyPhate
      @JohnyPhate 8 ปีที่แล้ว

      +Pihkal82 try TIS-100

    • @amihartz
      @amihartz 8 ปีที่แล้ว

      +Pihkal82 Last time I used assembly was with those TI-83/84 graphing calculators only a couple years ago. Those things are really slow, so the only practical way of writing fast programs is in assembly (Z80 assembly), so I learned that and wrote a lot of nifty apps for it. Working so close to the hardware is quite fun, actually.

    • @Lidi-Rumbling
      @Lidi-Rumbling 8 ปีที่แล้ว

      +Pihkal82
      I am learning C now but I hate the strings in C because its literally an array of chars...

    • @perimiter
      @perimiter 8 ปีที่แล้ว

      +HeroPlane you can cheat a little and use # include

  • @danielcu96
    @danielcu96 8 ปีที่แล้ว +6

    Great explanation! I have only a little bit of insight into programming languages, but this video made the concepts of assembly language and machine code crystal clear. Love your videos Gary, keep being so informative!

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

    I learned how to program in machine code on a user hostile 6809E machine provided to me via my electronics school, CIE. I was able to move out of my parents' house with the work I was able to get. That was over 30 years ago. It does make a difference.

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

    My brain has now restored to tabula rasa, but loved the explanation. Thank You. On to machine code

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

    I wrote machine code and assembly language on a Commodore PET back in 1980

  • @Doomerboss
    @Doomerboss 8 ปีที่แล้ว +7

    I wish my professor would introduce us Assembly Language with a video like this back in college :D Nice video!

  • @Cyberdemon1985
    @Cyberdemon1985 3 ปีที่แล้ว

    I programmed with assembly language in college on on Vax back in 1986. 4 years later I took Data Structures which was heavy Borland Pascal programming. I hated assembly language too. lol

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

    I enjoyed playing with assembly language throughout my engineering!

  • @sandspatel
    @sandspatel 8 ปีที่แล้ว

    Very clear, and fun way to put it across.

  • @mikedugumquick3535
    @mikedugumquick3535 3 ปีที่แล้ว

    Thank you. I found this video to be enlightening. Moreso, I would love to learn more about building a computer random access memory. It would be amazing to find some helpful resources.

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

    We still learn 8086 assembly language in B tech. India

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

    Not 100% true. Java is compiled to java bytecode, yes, but on android there are 1 or two more steps. It is then compiled to dex, dalvik bytecode (Android JVM used to be called dalvik), and if device is newer and runs ART (android runetime), it will be compiled to OAT on device after installation ("optimizing application" dialog is shown while it happens). OAT files are actually machine code (elf binaries). So on modern android devices Java gets compiled into machine code.
    Also, regarding NDK, while it is possible to write native executables, in most cases they are useless toys (unless you are modifying the Android itself). Most of the NDK development is to make shared libraries that run under the virtual machine, interfacing with Java via JNI (Java native interface).

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

    Good information I didn't know there was such a thing as an NDK. That sure will be useful that way I love be able to minimize ram usage of my apps

    • @jamilkafi5551
      @jamilkafi5551 8 ปีที่แล้ว

      +Rafael Santana It is not recommended unless yo need it.

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

      +jamil kafi yeah because you have more power than Google wants you to have

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

    Congratulations to explain this to people, AA! :)
    But I found myself in need to advise: bad writen C/Assembly code is much worse to performance than an average high level code.
    And lets face it: almost all handwriten and not profiled (again and again) C or Assembly code is bad and buggy.

  • @mohamadalikhani2665
    @mohamadalikhani2665 3 ปีที่แล้ว

    Complete and thorough. Keep it up👍🏻👍🏻

  • @DevinDTV
    @DevinDTV 7 ปีที่แล้ว +14

    Good video, though I'd have liked a more specific breakdown of the assembly code so I could fully understand what it was doing without going to another video.

    • @nathanmead140
      @nathanmead140 5 ปีที่แล้ว

      @The USSR i learned 6502 assembly in only a couple days

    • @davidprock904
      @davidprock904 4 ปีที่แล้ว

      Look up boolean logic gates

  • @favorohanwe9575
    @favorohanwe9575 18 วันที่ผ่านมา

    lmfao this was not only funny and interesting, it was informative 👏

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

    You are the true source of knowledge!

  • @Rkogaurav
    @Rkogaurav 8 ปีที่แล้ว

    Yes i have written in assembly using c

  • @aaronramsden1657
    @aaronramsden1657 6 ปีที่แล้ว

    Man I wish I was a nerd enough to know half of what he's talking about

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

    I've been using assembly for PIC microcontrollers, this gets realllyyyy lengthy, and hard to debug

  • @ChiragNayyar91
    @ChiragNayyar91 8 ปีที่แล้ว

    Awesome explanation

  • @thewalnutwoodworker6136
    @thewalnutwoodworker6136 3 ปีที่แล้ว

    I almost always code in high level languages. I sometimes use lower level to optimize more but it’s a butch to code in. I wonder if anyone can code directly in machine code.

  • @jakelam6647
    @jakelam6647 8 ปีที่แล้ว

    Haven't used machine code since my HND years in college. Now I wish that I had taken the software development course rather than the technicians course.....

  • @elninotech11
    @elninotech11 8 ปีที่แล้ว

    U guys couldn't upload this video yesterday before my test? Lol

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

    super video - thank you.

  • @devenmhatre8224
    @devenmhatre8224 4 ปีที่แล้ว

    Thanks, Nice explanation.
    Is Rust also like C, C++ which does not have something like JVM?

  • @TheHooy
    @TheHooy 6 ปีที่แล้ว

    Does the Android Runtime compile Java code to machine code? Or does it compile it to .oat files and something else compiles the .oat file to machine code?

  • @3rdwiki
    @3rdwiki 8 ปีที่แล้ว

    I heard Rollercoaster Tycoon was written in assembly. Any thoughts on that ?
    Also, How high is high ? Is there a way to gage proficiency ?
    I'd like to do something in Lisp. But just because RMS says it's the god language , no other reason.
    Perhaps you could tell me how high Lisp is in the code ladder ?
    Also if it's possible, I'd like to hear a video on Lisp, too.

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

    Why cant you just write something in Java, use a program to "Translate" it to machine code and save this as its own file, and then run the machine code file to make it faster? Why does Java etc. have to compile every time it runs?

    • @NerdyTurd307
      @NerdyTurd307 8 ปีที่แล้ว +9

      because different CPUs and GPUs use different Instruction Set Architecture (ISA), meaning one set of bits (e.g. 01000110) might mean a LOAD command to one CPU, but a STORE command to another CPU. Compilers and Operating Systems (OS) will correctly convert the source code into machine code for each ISA it is compatible with. This is why you need CPUs, GPUs and their drivers need to be compatible with your OS and the compilers you're using need to be compatible with your OS. this means that if you compile a Java program into machine code on one PC, then try and execute the code on another PC, the second PC will only accept the machine code if it has the same OS, GPU, CPU and drivers as the first PC.
      think of software communication like a 5 step ladder:
      Apps
      OS
      Drivers
      BIOS
      Hardware
      Since compilers are apps, they must go through the OS first, then the Drivers, then the BIOS to tell the hardware what to do.

    • @andrewmuller5826
      @andrewmuller5826 8 ปีที่แล้ว

      ok i see. So if you are writing a program you only intend to use on one computer, then it is possible to do this? assuming you dont change any of the drivers/gpu/other stuff? Im just thinking in terms of scientific modelling which can be really intensive.

    • @NerdyTurd307
      @NerdyTurd307 8 ปีที่แล้ว +5

      NOTE: I'm just an amateur programmer myself using free websites (Mainly youtube and tutorialspoint), while studying at Uni. therefore take what I say with a grain of salt or two. Sorry I didn't mention that in my first reply.
      Yes, you can just have the compiled file, if that code is only going to run on 1 PC or PCs with the same OS and the same ISAs for their GPUs and CPUs, with the same drivers, e.g. video game consoles.
      HOWEVER it is extremely imported to keep your source code (Source code is the original code, with the original tools you used to make, e.g. notepad++, gcc compiler, visual studio and PC with specific specs etc.), because it is much easier to edit, debug and upgrade your code with your source code.
      While you can get machine code and de-compile/de-assemble into assembly/mid-level/high-level code you
      1. have to know what language the code was originally written in AND
      2. the de-compiler/de-assembler programs will only work if the PC you're using can understand the machine code AND
      3. the comments in your source code will be ignored by assemblers and compilers, meaning the compiled code won't have any trace of your comments.
      Let's examine the following Hello_World.c source code. Note that the "/* my first program in C */" (Without double quotes) is one of two ways to write a comment in C.
      #include
      int main() {
      /* my first program in C */
      printf("Hello, World!
      ");
      return 0;
      }
      If I compile this code using a gcc compiler I will get this a.exe file, that will display "Hello World!" (Without double quotes). Let's say I get this a.exe file and move it into a USB stick, then my original PC get's lost or breaks and I can't fix it, nor get an exact replacement, because the PC had a CPU that is no longer made. Now what the f*ck do I do with my a.exe file???
      ALWAYS keep multiple backups of your source code, via external storage devices (USB sticks, SD Cards, external HDDs etc.), cloud services (SpiderOak is my personnel recommendation, due to it's security) and backup HDDs/SSDs/SSHDs.

    • @身世成谜
      @身世成谜 7 ปีที่แล้ว +1

      So in your opinion, it's not java, but c and cpp. Java code is organized to be running on jvm, in order to implement cross platform.

    • @rj-nj3uk
      @rj-nj3uk 6 ปีที่แล้ว

      You compile the source code and it is converted into object files. This object files and other required library files are all combined by the linker and then loaded in memory by the loader for execution.
      Here the compiled object files are final compiled outputs. You don't have to compile the source code again if you have compiled the source and have the object code already.

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

    Great video, very informative!

  • @jackspediceye9961
    @jackspediceye9961 5 ปีที่แล้ว +5

    Those smiles 😂😂

  • @marekkrakovsky4187
    @marekkrakovsky4187 3 ปีที่แล้ว

    And who programmed Assembler and Compiler?

    • @IntoxicatedDriver
      @IntoxicatedDriver 3 ปีที่แล้ว

      Those who got tired of coding in machine language

  • @kevinrickey3925
    @kevinrickey3925 4 ปีที่แล้ว

    I really HEART assembly, I used to memorize the opcodes for the Mnemonics, I used to calculate the 2s compliment jump values for the branching by hand. Nowadays, I find myself working with linux, Apache and NginX config files along with different streaming engines and full stack development. Google kicked back my full code example, here is an ancient snippet for indexed-indirect addressing on the Intel 8088, 8086.
    ; SCROLL LEFT ROUTINE
    ;
    L1: MOV AX,TABLE1 ;LOAD SI WITH START OF TABLE
    MOV SI,AX
    L2: MOV BL,ES:[SI] ;LOAD BL WITH SPEED COUNT
    INC SI
    CMP BL,255
    JZ R2 ;DONE, JUMP TO START
    L3: MOV DI,ES:[SI] ;LOAD DI WITH START OF LANE
    MOV BH,[DI] ;SAVE THE FIRST CHR IN BH
    MOV CX,79 ;LINE BYTE COUNT IN BL
    L4: MOV AL,[DI+2] ;* MOVE THE CAR *
    MOV [DI],AL
    INC DI
    INC DI
    LOOPNZ L4 ;JUMP TO MOVE CAR 1 CHR SPACE
    MOV [DI-2],BH ;RESTORE FIRST CHR TO LAST POSITION
    DEC BL ;
    JNZ L3 ;JUMP FOR LANE SPEED
    INC SI
    INC SI
    JMP L2

  • @MM-gz6gv
    @MM-gz6gv 7 ปีที่แล้ว +1

    lol smile and nod , thats me !!

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

    At the moment I'm learning python on my android phone, does that count? 😊

  • @lechi_2002
    @lechi_2002 8 ปีที่แล้ว

    I would like to know what does JIT compilation mean. I heard it takes a piece of byte code that needs to be run multiple times and compiles it to machine code.

    • @GarySims
      @GarySims 8 ปีที่แล้ว

      +Tudor Lechintan Yep, that is basically it... The JIT compiler compiles the Java byte code into machine code, and then calls the compiled code instead of interpreting it. But it does this while the app is running.
      The new JVM on Android uses Ahead-of-Time (AOT) compilation which means the resulting machine code is stored and loaded when needed.

    • @lechi_2002
      @lechi_2002 8 ปีที่แล้ว

      +Gary Sims So does this mean a program written in an interpreted language can be just as fast as if it was written in a compiled language?

    • @GarySims
      @GarySims 8 ปีที่แล้ว

      Tudor Lechintan Well that is the aim, if a JIT or AOT compiler is used. However there will be limitations, for example a normal compiler could take as long as it likes to optimize the compiled code, but a JIT or AOT compiler will always be trying to do it as quick as possible. Doing this compilation at run time or install time always means there are resource constraints.

  • @Benjamin-cx6xb
    @Benjamin-cx6xb ปีที่แล้ว

    Nice One!

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

    Impressive.

  • @domaincontroller
    @domaincontroller 2 ปีที่แล้ว

    04:59 compiler

  • @Volvo50c
    @Volvo50c 8 ปีที่แล้ว

    cool... I have no idea what you just said

  • @amihartz
    @amihartz 8 ปีที่แล้ว +234

    I've written a lot of assembly code for the TI-83 and TI-84 calculators. They're quite nifty little pocket computers that, unlike cellphones, teachers don't question you messing around with in class. They're really slow, so the only practical way of making apps is using assembly language (Z80 Assembly specifically). I learned that and wrote a ton of apps for it. Some were practically useful for class, some were just for fun, and others were just to challenge myself. It's really fun, actually, to interact so closely with the hardware. I wrote one app where you could write out a string of music notes and duration and it could actually play them through a pair of speakers plugged into the I/O port using an adapter. This is not something you can easily do with something like Java because most high-level languages don't let you directly interact with hardware so easily. I attempted to write machine code once just for the heck of it, and I wrote a simple program that could convert numbers to their hex values. But that's about all, writing machine code is pretty pointless unless your machine is so primitive it doesn't even have an assembler yet.

    • @anteconfig5391
      @anteconfig5391 5 ปีที่แล้ว +20

      writing machine code is pointless... Unless you're a hacker that hates compilers

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

      @@coderdude9417 I'd recommend RISC-V for that. It makes it a lot easier.

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

      WORD, I learned to program the Z80 for the TRS-80 back in 1980, since then I've learned the 6502 (zero-page addressing), then finally the Intel 8088-8086 in 1990. Programming in Assembly/machine is Absolutely a rush, I still Love IT! Rodnay Zaks makes good books

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

      @@anteconfig5391, agreed - considering that there exist assemblers to translate assembly source to machine code.

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

      @@coderdude9417 for dabbling with tiny OS functionality and more (compiler, interpreter, "shell"), you may want to consider to have a look at a standalone Forth, which combines all these in a (potentially) tiny program. "Tiny" means, less than 4k (down to around 2k of code)

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

    last used machine code in my bachelors in computer science, we actually put little 3 pin transistors on our own toy of a PCB, created our AND, NOT, OR, NAND gates in different configuration and wrote simple arithematic operations and got happy about it! fast forward 16 years, I am doing data engineer and data science in python against big data and sometimes i get deja vu of the simplest binary operations that are happening underneath with an orchestra of more than a billion finFET transistors! its simply amazing how humans build layer upon layer over original understanding of anything all in name of efficiency and progress!

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

      u dont need to lie about being a data engineer lol

    • @rizzwan-42069
      @rizzwan-42069 หลายเดือนก่อน

      @@ozzyplayz7082 fym lying

  • @manuelpena4547
    @manuelpena4547 8 ปีที่แล้ว +47

    As a computer science student I can say it's a really good explanation. Btw, I have to say I hate assembly code lol

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

      +Manuel Peña As someone who actually has a computer science degree I can say its a good explanation as well! :-)

    • @davidprock904
      @davidprock904 4 ปีที่แล้ว

      What im working on is more complex to make something happen, but at the same time easier to use

    • @JossinJax
      @JossinJax 3 ปีที่แล้ว

      Yeah in some instances i see the register on the right and the literal or variable on the left. Here, it's the opposite. What gives? Just diff. types of assembly?>

    • @manuelpena4547
      @manuelpena4547 3 ปีที่แล้ว

      @@JossinJax all assembly langs are quite similar but yeah, none of them are the same. Must be something about the assembly you use

    • @HarshYadav-yi7tv
      @HarshYadav-yi7tv 3 ปีที่แล้ว

      Same here bro

  • @Enedrapvp
    @Enedrapvp 8 ปีที่แล้ว +91

    Roller Coaster Tycoon was also written in assembly.
    2 Assembler courses is a minimum at my university for any CS major (in 2016, IBM hires like 25% of graduates).

    • @thenineinchnailer5674
      @thenineinchnailer5674 7 ปีที่แล้ว +5

      I did not know that! Thanks for the fun fact!

    • @heatxtm
      @heatxtm 7 ปีที่แล้ว +7

      tons of games were written in assembly

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

      Retro Rampage City had some functionalities written in Assembly I guess...

    • @retiredshitposter1062
      @retiredshitposter1062 6 ปีที่แล้ว +9

      I wrote a fun game called World of Warcraft in assembly, it was a lot of work, but after 2 1/2 months I got it done. People seem to like it! It's very popular.

    • @eyesnteeth1611
      @eyesnteeth1611 5 ปีที่แล้ว

      Love your username what school do you go to

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

    I just started my second semester with subjects related to software engineering, and about to start assembly languages in few weeks. It sounds exiting to get a glipmse, about where and how data gets storage to translate in to binary code... Thanks !

  • @RnBandCrunk
    @RnBandCrunk 7 ปีที่แล้ว +9

    The C compiler first optimizes your code (in C), then creates an assembly file from it and then the object file, which is machine code for the computer and finally an exe-file, which is basically the result of the linker going over the object file afaik.

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

    I learn 8086 Assembly now only for 2 days. And now i can see all these possibilities in programming.
    Before assembly i programmed in C/C++ but after I discovered OS-Development I turned crazy...
    I sat 48 hours in my desktop chair and made my first little bootloader with a minimalistic GUI.
    in the beginning I thought I'll never understand assembly. But when you do its not so hard anymore.
    Except the annoying researches to remember the 8086 BIOS interrupts... and the time you spend to convert ASCII or DECIMAL to hexadecimal...
    Anyway. Assembly is the fastest and best language to use the complete computer power!

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

    Hey I love the video, but the background music/noise was a bit distracting. I’d rather just hear your voice. Just a suggestion.

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

    Explaining assembly without explaining computer architecture first is futile.

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

    Hello Gary. :)
    A minor correction, if I may: OPcodes, not "OPTcodes", since they're OPeration codes.
    Thank you for another stellar video, God bless you Sir.
    Matthew.

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

    If anyone wants to dig deeper into what Gary explained beautifully in this video, I would recommend to learn about the hardware and software of the Intel 8080 or 8085 microprocessor.
    It is basic enough for you to grasp the concept of mnemonics to machine code and its hardware is very simple and streamlined.

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

    So just to be clear, the assembler is software based and not built into the CPU (that is there is nothing in the CPU distinctly built to convert assembly into machine code) correct?

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

      Yes.

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

      The CPU only understands binary like Morse code is binary. When writing machine code it is usually written in hexadecimal rather than binary 1s and 0s. So 0101 1111 would be written as 5f. Trying to remember these hex codes and what instructions they perform in the CPU is very challenging just like trying to remember what the dots and dashes represent in Morse code. So using an op code in assembly language like MOV to indicate that you want to move data into, within or out of the CPU to memory is far easier to remember. The assembler directly converts one assembly language op code into machine code. Because of this it can be done on the fly and that is why assembly language is low level as opposed to BASIC which is high level and has to be compiled first before executing

  • @shyamgohil1595
    @shyamgohil1595 7 ปีที่แล้ว +11

    How assembler works???
    How was the first assembler made???

    • @melvinfoo69
      @melvinfoo69 7 ปีที่แล้ว +10

      shyam gohil you write the first assembler in machine code by hand. Then you rewrite the assembler in assembly code.

    • @Flowtail
      @Flowtail 6 ปีที่แล้ว

      Assembly is actually something you can do entirely by hand; so when he says “the assembler turns it into numbers”, that could mean either a computer, or an actual human

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

    You say for faster processing use 'C'. But does the same apply for C++ or just 'C' specifically ?
    Thanks for this vid and definitely giving thumbs up :)

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

    Anyone here for school work???

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

    In the 70's machine language and assembler was the first computer languages I programmed with. I had to use keypunch. If you did not number each card and accidentally dropped your stack you would have major problems.

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

      +EH CBunny Or if you had one stuck, you had to clean the machine and hope you had everything put back correctly. I used to work on Fortran and Cobalt before DOS 2.0-6.0, I think, then I went to 3.2 word or easy, the Windows 95 and so on. Most of what I knew very well then doe's not apply now, but I have a better base understanding than most programmers today.

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

      I worked in network design and in the 90's I had to convince many corporations it's time to let go of the past and move on to IP networking. When one group removed their mainframe they replaced it with a corporate swimming pool

  • @omsingharjit
    @omsingharjit 2 ปีที่แล้ว

    5:14 now it's makes sense to me Assembler is just newly Called complier both have same work but with different languages . Right ?

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

    7:30 :)

  • @statikverse
    @statikverse 7 ปีที่แล้ว +5

    My current project is writing a simple VM to perform arithmetic. This helped me grasp a lot. Thanks

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

      how it's going

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

      @@anere5326 I passed 😊

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

    I have been off and on developing an assembly language and the boolean logic gate setup to match, mine is not like the Harvard or Von Newman, one person described it as a Wetware and another person said it's like a Virtualized Wetware.
    I say it is extremely wasteful on the level of logic gates being used, and in a regard to security is absolutely horrible (but that can be worked on later)
    And those are its only flaws,, but the power and capabilities it gives you is insane,
    It would (someday maybe) be the last architecture design ever needed to be made.
    Here is a comparison to a regular computer giving you maybe an idea of the unimaginable capability.
    Just say your running an extremely intensive number crunching application. With a regular computer your stuck with the core and thread count that you have.
    My design it is theoretically unlimited but let's shape it up to a regular computer, while running this intensive number crunching. During that time let's say your not making use of the internet (your network) or your mouse or speakers, you could write new code or change current code to disable those external devices to give yourself an extra level of simultaneous parallel internal communication AKA more threads/cores.

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

    I like Efficiency and Assembly, so I find angering when there's no efficiency or even common sense when I Disassemble Apps or even parts of the Windows OS for fun 😊 It has been a passion of me, that I haven't been able to dedicate myself 100% to it, I'd like also to learn the Server CPU ISA and how it's used it on Big Servers and Supercomputers.
    I think Assembly Language is underserved and underdeveloped, so Low Level Hardware Handling is pretty bad 😔 E.G: It's difficult to this day to write games for 2+ GPUs; each game company has to develop proprietary Low Levels Support, and not only for GPUs but for everything; it should be an Efficient Low Level Open Source Standard for everyone to use.
    Also Compilers are not the perfect deploying machines nor the programming Philosophy: which is: automate the most lazy way possible; hence Virtual Machines 🤪 Code Targeting 🎯 is a joke: Compilers Operating Systems and Programs don't check the hardware they're running on, not as thorough as they should. There's no backward compensation nor cross-translation for CPU/GPU/OS, just the super-lazy and super-inefficient VMs; which will generates entropic solution at a exponential scale, which is of course not only inescapable unsustainable but delusionally non-scalable. I'm all for Virtualization done right; Hardware-accelerated, Assembly efficient, and only when needed. Also software virtualization of items in the computer like a keyboard or other functions are common now, and that also should be done Assembly Efficient 🙂
    I'm trying to make computers efficient, so more and better solutions can be built on them, that would be difficult today because not all Compilers do mult-itarget well or generate humongous executables of 100s of MBs on Disk and multiple times that on RAM ♈🐏
    So I hope you teach better Programming Philosophy, to fix these problems

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

    Done courses on C and C++, hated them both. Nice video though. Keep it up Gary.

    • @controlledmaniac27
      @controlledmaniac27 8 ปีที่แล้ว

      It was time well spent.

    • @valizeth4073
      @valizeth4073 5 ปีที่แล้ว

      Just gotta love C++, C can be a bit annoying though.

  • @ChrisM541
    @ChrisM541 2 ปีที่แล้ว

    08:32 " The ARM64 chip, for example, only has 64 registers"
    --> I spent much of my early years programming games in assembler for the C64 and later, the Amiga. Every opcode and 'trick' was part of my(and other's similar) 'everyday language'. When you say ARM64 "only" has 64 registers, I have to laugh extremely loudly - primarily at the suggestion that "only" 64 resisters absolutely WILL hinder today's programmers...
    For context, how many registers did the C64/6510 have? -->> 2...yes - TWO...!!!
    --> I strongly believe that waay too many of today's new programmers are CRIMINALLY lazy, writing poor code, always looking for the easy, most abstracted way out.
    For countries that 'encourage' this i.e. produce 'products' that are utterly incapable of communicating directly with the CPU at expert level, your biggest security threat is going to be state-sponsored assembly/machine code experts...!!!

  • @kevinrickey3925
    @kevinrickey3925 4 ปีที่แล้ว

    The ARM cpu Only has 64 registers! Dude, that is a huge BOON, Try playing with an 8bit 6502.... 64 registers is HUGE!! I could keep every variable for my programs in registers, bypassing ram. I know register to register data manipulations take less machine cycles than dealing with RAM data addressing. For a RISC processor, it is very, very nice. I am glad I found you, you are good, lets see what other YAFFS2 filesystem insights you have.

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

    I'm learning how to write assembly/machine code on the TI-84. I guess the actual writing isn't so bad perse but finding out about key memory locations like VRAM and figuring out the routines that you can call from ROM are what make the actual coding challenging...

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

    I found your video, because I'm trying to make a decompiler to go from machine to Arm Assembly - not a full-scale project of course, just something to work with a very limited instruction set to play with.

  • @Dr.physioAli
    @Dr.physioAli 7 ปีที่แล้ว +3

    I am literally fascinated by the programmings and its complexity complexity

  • @g.v.6450
    @g.v.6450 16 วันที่ผ่านมา

    Interesting, but what is a “stack”? (There may be other terms that you didn’t define.)

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

    Thank youu!! This video was so useful.

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

    Funny that you upload this right now - I just tried out 6502 coding for a university assignment last week :D

    • @aggbak1
      @aggbak1 8 ปีที่แล้ว

      nes coding I presume?

    • @aggbak1
      @aggbak1 8 ปีที่แล้ว

      can you help me out with that?

  • @AbdulWahab-gn5hn
    @AbdulWahab-gn5hn 8 ปีที่แล้ว +1

    I am a student of electrical and electronics engineering and I had experience with Java but I really like assembly language.
    We use Atmel 8052 series as testing platform.

  • @Johnsmith-yv8tx
    @Johnsmith-yv8tx 3 หลายเดือนก่อน

    so assembly language is middle man between machine code and higher level language like javascript, right? if so why?

  • @MasthaX
    @MasthaX 3 ปีที่แล้ว

    The main reason why ARM processors are in most portable devices is that they run quite allot less hot... you don't want a X86_64 based system in your pocket.

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

    Still somehow the best explanation of these concepts even after 6 years.

  • @deaustin4018
    @deaustin4018 6 ปีที่แล้ว

    never got lower than cobol in the 60s, and that was frustrating enough for me. You gave the punch cards to the girl at the window. If your program was good, you got a thin print out back. If it was full of bugs, you got a nice thick printout and spent another few days finding all the errors.

  • @puravalva9157
    @puravalva9157 3 ปีที่แล้ว

    if you've just seen the most mind-numbingly brain dead ad by Nescafe showing the Nescafe Allegria, like the comment

  • @mohammedmaslehuddinkhan157
    @mohammedmaslehuddinkhan157 8 ปีที่แล้ว

    HI
    to Android Authority
    I am having a problem that
    my samsung galaxy note 4
    3 times it got hung up
    1 time the screen locked🔒 I'd like to press the power button on the home button does not waking up and the second time the display was on but same problem I tried to click the power button and the home button it was not opening so I have to remove the battery and switch it on again and the third time today it happened when I woke up I tried to cross on Locked download of engine light was beeping and I try to click the power and home button same things that display was black does not opening up so I have to remove the battery and put it on again so please help me what should I do

  • @bluecometzola773
    @bluecometzola773 8 ปีที่แล้ว

    Hell no, i'm not nerd enough to use assembly language or even C haha. Wasn't aware the NDK exists, would be nice once i have free time.

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

    I don't have any programming skills, but I understood what you were explaining.

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

    Assembly language is extremely underrated I’ve written a lot of it and I can say it was a lot more fun to learn assembly than any other language I’ve used

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

    Is the assembler the same as a compiler ?
    Also, how exactly does it "translate" the assembly language into binary ?
    Thanks

  • @bulentyldrm828
    @bulentyldrm828 3 ปีที่แล้ว

    hello gary my name is bulent i am from turkey i want to ask you something. Do you think I should learn assembly to be a good hacker? where should i start i will be glad if you can help me thank you

  • @harsham2481
    @harsham2481 6 ปีที่แล้ว

    So a compiler converts high level language directly to machine code?or does it convert into assembly language???
    I dint hear him.

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

    found me a bad romance! Something must be wrong with me. I really like this

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

    do very compiler convert our coding to assembly language and to binary codes??? please reply me

  • @IgnoreSolutions
    @IgnoreSolutions 8 ปีที่แล้ว

    I think NDK only let's you write *parts* of your code in C or C++. You still need some Java logic and I think even the C/C++ still compiles to the virtual machine (Davlik or Art).
    Don't quote me on this but this is what I've heard.

    • @GarySims
      @GarySims 8 ปีที่แล้ว

      +Axiom I don't think you are right, C/C++ code compiled using the NDK compiles to native code. When you compile the app you need to specify which architecture you are compiling for, e.g. ARM, Intel etc.

  • @bertincdacardoso8516
    @bertincdacardoso8516 3 ปีที่แล้ว

    hello friend, can you finish a game in bin for me? mortal kombat 1 genesis,? missing fix Shang tsung

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

    the cpu is like the human brain, but why neuman way? human is not a 100% perfect creation

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

    I'm afraid everyday language is largely "vocabulary I don't understand...". 😂

  • @noway4517
    @noway4517 5 ปีที่แล้ว

    Why the music in the background? It gives me a headache to concentrate on what you say because I have to try to blind out the music.

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

    This helped amazingly in my project to understand how NES games were programmed. I suddenly have a higher respect for those old cartridges.

    • @skycloud4802
      @skycloud4802 4 ปีที่แล้ว

      Yeah, I have a lot of love for my Gameboy and it baffles me how much they squeezed the games out of its extremely limited hardware. Those programmers must have been gods.

  • @fireninja10
    @fireninja10 8 ปีที่แล้ว +7

    making a game like that? it's suicide!

    • @julian4064
      @julian4064 7 ปีที่แล้ว

      Brandon Tate yep

    • @MulleDK19
      @MulleDK19 7 ปีที่แล้ว +5

      Not really. RollerCoaster Tycoon was written by one guy, in assembly.

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

      The entire Genesis, SNes and NeoGeo libraries were written totally in assembly, as well as most of Saturn and PS1's.

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

      I made a game called The Witcher in assembly, it took me 2 1/2 months, but people seems to like it.

    • @liberator48
      @liberator48 6 ปีที่แล้ว

      imagine writing an MMORPG with pen and paper

  • @pranaynallapaneni6951
    @pranaynallapaneni6951 4 ปีที่แล้ว

    Your videos are very clean but your content of the videos are unclear. Do work on that.
    Thanks

  • @DoesntReadReplies
    @DoesntReadReplies 5 ปีที่แล้ว

    Machine code isn't that hard. I don't even see it anymore. All I see are blondes, brunettes, redheads...

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

    do more of these type👍