Assembly language vs. machine code - 6502 part 3

Поделиться
HTML-код
  • Опубликовано: 10 дек 2024

Комментарии • 861

  • @PlasticCant
    @PlasticCant 5 лет назад +556

    2:35 lol Glossing over the "Thanks to Ben Eater for providing the Mac and Windows versions."
    You're really a gem.

  • @Meneer456
    @Meneer456 5 лет назад +1225

    Cool how high level Assembly looks right now because you got us started with just logic gates...

    • @burdendmist6543
      @burdendmist6543 4 года назад +14

      @pyropulse lol same

    • @BadKnightLv01
      @BadKnightLv01 4 года назад +84

      @pyropulse Now you write code for minecraft mods using abstract mathematical functions describing the behaviors of all of the electrons in your PC

    • @footballCartoon91
      @footballCartoon91 4 года назад +17

      Hi, i have a question for you..
      How does a human being invent a new asembling language??
      Let say if he does not have a second computer i.e. there are no computer at all in this world for example like alan turing.
      I mean how do you define "Add" function to the computer?
      If the function "add" is presumed as an individual character such that A is
      equals to some number (which can be converted into binary number) let use hexadecimal for easier purpose. If A=10, D=13, D=13;
      So we write it in binary:
      1010, 1101 , 1101 with each the values written on the EPROM or harddisk or anything. Then, when the
      user's input is like this (i.e Add), the computer will execute addition function either through programming as you've mentioned in the video, or maybe design a new logic gate??
      But my main concern is that how do we reduce the memory size for each character written? i.e due to the fact that "D" character in this example is greater than "A" character because D= 13 in hexadecimal and A= 10.
      How do we make all the characters on our keyboard to have same memory size when converting them into hexadecimal but still they are distinctive from each other?
      Hopefully you understand my question

    • @emberleona6671
      @emberleona6671 4 года назад +1

      @pyropulse karnaugh maps

    • @CH3LS3A
      @CH3LS3A 4 года назад +23

      @@footballCartoon91
      >Then, when the user's input is like this (i.e Add), the computer will execute addition function either through programming as you've mentioned in the video, or maybe design a new logic gate??
      we don't send the ASCII representation of the instruction mnemonics to the CPU. the assembler will turn our source code (which is that ASCII plain text) into the appropriate opcode. the CPU understands this opcode because its circuits are *designed to understand it.*
      remember that in memory, everything is just numbers. what matters is how the CPU treats them. it usually expects instructions, and depending on the instruction it might expect raw data. each instruction triggers the appropriate bits and logic gates to perform its function.
      so to answer your question, we don't really invent an assembly language. we invent a CPU and the assembly language is a byproduct of how the CPU's circuits work.
      since you mentioned the restriction of having only one computer in the world, in that case you would have to assemble the program by hand.
      >But my main concern is that how do we reduce the memory size for each character written? i.e due to the fact that "D" character in this example is greater than "A" character because D= 13 in hexadecimal and A= 10.
      those values still fit inside 4 bits. your main concern should be the width of the value in binary, not the value itself.

  • @CZghost
    @CZghost 5 лет назад +486

    Nice little shoutout to you for Mac and Windows version :D 2:37

    • @rty1955
      @rty1955 5 лет назад +8

      Should make an open source for Linux. I spoke too soon. It is ooen source....

    • @dentjoener
      @dentjoener 5 лет назад +35

      @@rty1955 It is open source... These are just prebuilt binaries

    • @rty1955
      @rty1955 5 лет назад +2

      @@dentjoener awesome. I left M$ decades ago... Its shareware at best

    • @sdspivey
      @sdspivey 5 лет назад +5

      I don't think windows or Mac will run on a 6502.

    • @cokeforever
      @cokeforever 5 лет назад +4

      @@rty1955 Why?? He should eventually do Eatix ;) that's the point of building your own computing system )

  • @bubba_brandon
    @bubba_brandon 4 года назад +126

    Graduated with a degree in Computer Engineering a few years ago and I WISH I had an instructor like this guy because I've understood more from these videos than all of my Computer Architecture classes combined!!

    • @RajKumar-he3dv
      @RajKumar-he3dv 3 года назад +2

      So true man

    • @timsanders9111
      @timsanders9111 3 года назад +3

      Agreed. Same situation for me in 1987. Too bad Ben was not my instructor.

    • @deang5622
      @deang5622 2 года назад +3

      So your computer engineering degree must be worthless then? Which college was this?

    • @ckannan90
      @ckannan90 Год назад +2

      @@deang5622I mean, it’s one class out of dozens you take in college. I have the same degree (different college probably) and loved my computer architecture class, but there are other classes which had poor instruction. All college courses are hit or miss, because they’re taught mostly by researchers who just happen to be teachers. They are good researchers. There is a chance that they are good teachers. And they keep their job by doing good research, not by teaching well.

    • @deang5622
      @deang5622 Год назад +1

      @@ckannan90 I learnt more about computer architecture than I did in my university degree by self study.

  • @connorking8503
    @connorking8503 5 лет назад +598

    14:20 - my dad once worked on a nine-bit processor.
    It was a bit much.

    • @spongerobert
      @spongerobert 5 лет назад +35

      badum-tsss... I can imagine some dad telling this joke to a waitron and the waitron awkwardly laughing because of a possible tip at the end of the super awkward exchange.

    • @connorking8503
      @connorking8503 5 лет назад +12

      @@spongerobert There's a nonzero chance that he did exactly that at some point. That's the sort of thing he would do.

    • @joethestrat
      @joethestrat 5 лет назад

      womp womp lmao

    • @zo1dberg
      @zo1dberg 4 года назад +1

      Is your dad any good at dad jokes?

    • @xtdycxtfuv9353
      @xtdycxtfuv9353 4 года назад

      this meme was indeed kek.

  • @robcumberland8089
    @robcumberland8089 6 месяцев назад +3

    Four years on and these Videos are still being found and much appreciated by the likes of me.
    Thank you very much, Ben. Your Videos are THE BEST ones, to cover this topic.

  • @RohitSardessai
    @RohitSardessai 5 лет назад +20

    What makes this channel so great and educational is that he shows the actual process of programming a chip from scratch including things like referring to the documentation and datasheets and so on. It's really helping me understand how these things work and how to work with microprocessors.

  • @wessmall7957
    @wessmall7957 4 года назад +1472

    This series really shows how we're standing on the shoulders of giants when we use our PC

    • @damiankaleomontero496
      @damiankaleomontero496 4 года назад +63

      Or any modern science really

    • @loserface3962
      @loserface3962 4 года назад +21

      @pyropulse almost anyone can learn how to program computers as its not that expensive compared to doing something like learning to weld and machine or learning to fly a plane

    • @krabsauce9792
      @krabsauce9792 4 года назад +36

      @@loserface3962 I would have 5000x more chance of learning how to fly as opposed to learning any of the magic I'm watching right now.

    • @Blink_____
      @Blink_____ 4 года назад +36

      @@krabsauce9792 You think that, but it's really a matter of repetition and coursework with a competent instructor.

    • @BruceHoult
      @BruceHoult 4 года назад +34

      @@krabsauce9792 what's kind of crazy is that I could read and understand what instructions the hex code were, and when he went "let's delete the #" I was "yeah, you'll get A5 instead of A9 ... because I programmed an Apple ][ in machine code without having an assembler back in 1980 when I was 17.

  • @IvanToshkov
    @IvanToshkov 5 лет назад +662

    TL;DW: Still no "HELLO WORLD" :D
    I'm sure you have this a lot, but I have to say it too: your videos are amazing! Thank you very much for doing them.

    • @BenEater
      @BenEater  5 лет назад +238

      It will definitely* happen in the next video! And really, is there any reason it should take fewer than four videos to print "hello world"?
      *probably

    • @leonardjanke2855
      @leonardjanke2855 5 лет назад +53

      @@BenEater time in the universe is not infinite. But i like your style of taking everything slow to really make us understand the process and really making us smarter for life

    • @MrTridac
      @MrTridac 5 лет назад +31

      A blinking LED is the "Hello World
      " equivalent in the raw CPU assembly programming world. So, in some way he did it already. I wanna see his display code, though. It's always a bit of a mess in assembly.

    • @austin6141
      @austin6141 5 лет назад +1

      @@BenEater thanks again, great videos, great tutor

    • @Phred_Phlintstoner
      @Phred_Phlintstoner 5 лет назад +1

      @@BenEater yes dude, you are awesome!

  • @2Sor2Fig
    @2Sor2Fig 2 года назад +21

    I never thought Assembly would ever make sense to me, but you've explained it so clearly. I think it really helped that you did this as a series, starting with the physical pins and connections made understanding how the instructions correspond to them so much easier. This has been a really awesome series, I'mma subscribe.

  • @justincobb5853
    @justincobb5853 5 лет назад +81

    I have learned more about practical digital electronics from your videos than two semesters of dedicated digital electronics labs. Thanks for all your hard work!

    • @uliun2344
      @uliun2344 4 года назад +1

      pyropulse
      >plays minecraft
      I bet you’re a subhuman with a double digit IQ that wants to look smart.

    • @anders5611
      @anders5611 4 года назад +3

      Bad labs then

    • @justincobb5853
      @justincobb5853 4 года назад +3

      @pyropulse Excuse me?

  • @chrissesock4245
    @chrissesock4245 5 лет назад +18

    You are the only reason I'm passing my embedded systems class in college. I love you.

  • @Xenthera
    @Xenthera 5 лет назад +115

    This is my favorite series on RUclips right now. Nothing makes me excited like seeing a new video about this 😊

    • @MrThomashorst
      @MrThomashorst 5 лет назад +1

      yepp ... and he is not the only one on yt :)
      ruclips.net/video/QgDR8LrRZhk/видео.html

    • @williammentink
      @williammentink 5 лет назад +1

      @Memes On Piano It's all about the content, i.e. the music not just the piano.

    • @youdonotknowmyname9663
      @youdonotknowmyname9663 4 года назад +1

      "Normal people" watch Netflix or TV.
      I am here watching a video series about microprocessors ...

  • @Mike-mu7tk
    @Mike-mu7tk 5 лет назад +214

    Honestly glad we haven't reached "Hello World". That would mean we're done learning cool stuff, and who wants that!? Thanks for all your hard work.

    • @matthewe3813
      @matthewe3813 3 года назад +4

      well this didn't age well

    • @Yehor-v7y
      @Yehor-v7y Месяц назад

      ​@@matthewe3813 lol

  • @skillfulfighter23
    @skillfulfighter23 5 лет назад +31

    Man I love this 6502 series. I'm currently almost finished with the 8 bit cpu (I've made some upgrades). Money definitely well spent. Thanks for all you do Ben, from your semiconductor video to this video.

    • @skillfulfighter23
      @skillfulfighter23 5 лет назад +4

      Not yet, I want to finish first so I don't post anything that's broken and could mislead others

  • @CosmJJ
    @CosmJJ Месяц назад

    Amazing! This is when the magic disappears and instead engineering starts. Thank you, Ben, for enlightening this world! You are truly the teacher!

  • @sdspivey
    @sdspivey 5 лет назад +34

    I haven't used zero page in close to 25 years. Nostalgia.

  • @KnightViper
    @KnightViper 4 года назад +2

    I love your approach in these videos so far. You always show the manual or raw way to accomplish something, and then you show another way that is more efficient or natural to accomplish the same task. ie. using labels instead of the actual hard coded address values. It makes so much sense when presented this way. I learn much faster by example, and your videos are exactly this!!!

  • @michelles.3835
    @michelles.3835 3 года назад +4

    This video series is weirdly relaxing and I appreciate it immensely.

  • @LeonardoCamposBR
    @LeonardoCamposBR 5 лет назад +5

    Please keep doing video like this. I'm sure everyone is learning a lot and at this speed no beginners are left behind.

  • @badstate
    @badstate 5 лет назад +9

    I should have learned this stuff thirty years ago. Thanks, Ben, for making it so accessible.

  • @frivolas
    @frivolas 3 года назад +2

    I've been wondering for years how the bridge between software and hardware works, and here it is, and in such an easy to follow way! Thanks so much!

  • @mradminus
    @mradminus 5 лет назад +12

    @Ben Eater
    You're not only exceptionally good at what you do, you're exceptionally good at explaining it too!

  • @simsanutiy
    @simsanutiy 5 лет назад +7

    2:32 >thanks to Ben Eater for providing the Mac and Windows versions
    Yep, thanks, when my 6502AD arrives I'll use the windows one a lot

  • @JamesPotts
    @JamesPotts 5 лет назад +34

    I'm not here to learn (I write embedded software for a living), but I still enjoy watching your videos. Good stuff.

    • @satibel
      @satibel 5 лет назад +3

      I don't do it for a living, but I've written some asm and took applied electonics classes, so I pretty much know everything he talks about, still, pretty good entertainement.

  • @jumbleblue
    @jumbleblue 3 года назад +5

    These Videos are CRAZY in the amount of complicated content, presented in a very clear way. Very well done and one thing that is making this happen is that he repeats information relatively often. But also the calm voice and the "its really easy tone". Very well done. TopNotch teaching. Coming from a fellow teacher.

  • @timsanders9111
    @timsanders9111 3 года назад

    These are some of the best videos I have ever seen. Organized, easy to follow, professional quality. Thank you Ben.

  • @idjles
    @idjles 5 лет назад +10

    Back in 1985 that’s how I coded, with 6502 instruction set and paper and pencil and then typed the bytes. I had to count the bytes for the jumps by hand and if I had to jump more than 256 bytes I coded smaller jumps by hand.
    We had no compiler to do that.

    • @MrSapps
      @MrSapps 5 лет назад

      Did they not have assemblers back then?

    • @QuintarFarenor
      @QuintarFarenor 5 лет назад

      @@MrSapps probably did but they were also expensive

    • @jarisipilainen3875
      @jarisipilainen3875 5 лет назад

      @@MrSapps yes there was,but nobody know it was stone age. people do their own assembler or becouse they were so good on machine code they not need

    • @idjles
      @idjles 5 лет назад

      PaulsMagicVideos I had the Print-out of the Apple 2 OS in the back of the Apple Manual, so I knew Assemblers existed, but we didn’t have that at school. yes, 6502 programming was a school topic in 1985! It was awesome. I met and thanked my science teacher for it 36 years later! The 6502 had a clock speed of about 961 kHz, not even 1 MHz!! We entered the bytes with a poke statement for each byte.

    • @YourUNKus
      @YourUNKus 5 лет назад

      You want pain? Had to toggle in addresses and instructions individually on the high school's brand new PDP-11
      circa '72. Big hoorays when they later that year 'upgraded' with a punched papertape reader/writer. Ah the good ol days. LOL.

  • @jc_from_tx9229
    @jc_from_tx9229 2 года назад +1

    I had an entire semester of 6500 training back in 1989, we built and interfaced circuits just like this. I wrote an assembler program in a relational database that was called Paradox and downloaded programs from my PC through a serial link to the processor. This brings me right back to the great times I had !

  • @jenskapmeyer2579
    @jenskapmeyer2579 3 года назад

    Introduction of very single new little feature of the assembler made me literally smile, bringing back memories from the mid 80s. Great lessons !

  • @endofourlives
    @endofourlives 5 лет назад +19

    This is my new favorite channel.

  • @kdog3908
    @kdog3908 Год назад +1

    This highlights both the beauty and the frustration (for me, anyway) of programming. I started out self teaching on all this at 12-13 yrs of age. This all made sense, was intensely fascinating but remembering and recalling all of the "fiddly" little quirks like the carry bit, "little" vs "big" endian etc, is what caused the frustration.....which caused me to give up programming almost before I started it. Unbeknownst to my 12-13 yr old self and parents and teachers, I had ADHD. A fact I didn't learn until I was diagnosed at age 38.
    Looking at this now, knowing what I know now, considering my own neurocognitive "quirks", i'm getting tempted to dive back in. The fascination and the fact it makes perfect sense is all still alive but now I can include workarounds for the working and processing memory deficiencies (meat, not silicon) I have.
    Thanks for rekindling the memory of being an enthralled kid!

    • @Piano_Board
      @Piano_Board 11 месяцев назад

      I'm autistic 😅

  • @pawagnathom
    @pawagnathom 2 года назад

    It is so complex, with some explanations so logical yet so ground level and hard to learn. Amazing work.

  • @JohnSmith-vm5cv
    @JohnSmith-vm5cv 3 года назад +1

    It is so cool seeing you make these circuits and then programming the hardware. I took an embedded systems class last semester and we coded in HCS12 Assembly Language and it is so cool seeing everything that I learned in that class applied here.

  • @drivers99
    @drivers99 Год назад +13

    For my machine language program I wanted to increment A from 00 to FF and send it to the LEDs. That worked, but in plain 6502 assembly there’s no INcrement A mnemonic (op code 1A). After doing a little googling I see 65C02 added a few really useful instructions beyond the MOS 6502 and vasm supports them if you add the -c02 option on the command line! Actually for this chip there’s the -wdc02 option which includes even more instructions added by WDC.

    • @Sypaka
      @Sypaka Год назад

      so without "INC A", you would have to write extra code? How would that look like? Just 3 lines of code?

    • @Veliki-k3i
      @Veliki-k3i Год назад

      ​@@SypakaADD A, 1

    • @Sypaka
      @Sypaka Год назад

      @@Veliki-k3i Why ask for something complex, if the solution is actually simple. I seriously forgot increasing is adding by 1..

    • @picoplanetdev
      @picoplanetdev 11 месяцев назад

      ​@@SypakaAdding one to A is a good idea as has already been mentioned but depending on the scenario you might also use the X or Y register with INX and then store it with STX for example. Those registers are made specifically to be counters/indexes to increment, but if you need to do other things with that value it'll take an extra transfer.

  • @Pow3llMorgan
    @Pow3llMorgan 4 года назад +2

    I have little to no idea of what is going on most of the time in these videos but it's super enjoyable and I get the sense that, if I were to stay and listen for long enough, I might learn a lot!

  • @bob-007
    @bob-007 5 лет назад +3

    I think the shorter but more frequent videos are better than waiting 2 months for a long one. thx :)

  • @markell1172
    @markell1172 Год назад

    What a fun way to show assembly instructions background without passing through pages of deep down content.

  • @peneloperafael8800
    @peneloperafael8800 3 года назад +1

    It seems sooo incredible today that we had learned all these stuff in the 80s without internet, without youtube...
    Wish I had a teacher like you when I learned assembly!

  • @MrTridac
    @MrTridac 5 лет назад +4

    Even though I'm neck deep in C64 assembly programming, I still enjoy your explanation. Low level is just great.

  • @ottobass9193
    @ottobass9193 5 лет назад +38

    Wow, you made the mac and Windows versions of vasm! Well done!

    • @jamesmnguyen
      @jamesmnguyen 5 лет назад +1

      @@tau8550 My personal question is, can Vasm be compiled without using make?

    • @baileyharrison1030
      @baileyharrison1030 5 лет назад +1

      Otto Bass he just compiled the code and then uploaded the binaries.

    • @baileyharrison1030
      @baileyharrison1030 5 лет назад +3

      James Nguyen Yeah. You could just execute the commands in the makefile by hand

  • @gkcadadr
    @gkcadadr 5 лет назад

    I've been into computers for almost 15 years by now, and it's with these videos of yours, especially the bread board CPU series, that I finally get to learn how they actually work underneath all the software and hardware abstractions. Thanks a lot, this is great work!

  • @henrypostulart
    @henrypostulart 2 года назад +2

    I remember when these details were much more ‘bleeding edge’ than a walk down memory lane. I’m glad someone young is still paying attention to these details…

  •  10 месяцев назад

    Congratulations teacher for this brilliant series! I have learned a lot from your videos!
    The Lord has my best salute!

  • @ProjectPhysX
    @ProjectPhysX 5 лет назад +1

    These LCDs are quite fun to play around with. I once made a 2x16 character display with 5x8 pixels per character draw a ping pong ball moving around pixel by pixel and bouncing off the edges as well as a small pixelated image moving across the display pixel by pixel with the 8 user-definable characters that the display offered. The assembly language is incredibly powerful once you make use of subroutines.

  • @n2n8sda
    @n2n8sda 5 лет назад +7

    lol as others have already pointed out, I also smiled when I saw the thanks to you on the download link. I use vasm myself from time to time as I have a homebuilt 6502 from the late 90's that does various automation tasks that I built to replace a pic based system when it became too limiting... it used to do quite a bit from lighting to door locking and things but now it just mainly keeps plants watered... of course these days you can do plenty more and a lot quicker on a $2 arduino uno clone but back then I used to repair arcade boards when there were still plenty of arcades about I often had donor boards about and 6502s, z80s and eeproms were pretty abdundent, as well as an unbelievable amount of ttl glue logic. Kind of funny that now the technology is more available and easier to build and use the less I do :P

    • @pugcookie8739
      @pugcookie8739 3 года назад

      Hello! I am trying to do this project and vasm isn't working for me, I can't find anywhere online about how to fix this, so you are my last resort. I'm trying to compile a file but it says no input specified, I've tried everything, I am using Cygwin for windows 10 64bit, I put in the command: "./vasm6502_oldstyle -Fbin -dotdir blink.s" am I doing something wrong?

  • @gingeral253
    @gingeral253 2 года назад +2

    I would have never though I would be learning assembly. It’s crazy how much our compilers do for us.

  • @Umski
    @Umski 5 лет назад +2

    Learnt more here in 15 minutes than I did in an entire term's module on Microprocessor programming at university 20 odd years ago ( I was probably hungover most of the time back then mind :D)

  • @bardus_hobus
    @bardus_hobus 4 года назад

    As a C# developer, I'm glad there are smart people like you out there who make my life much much simpler :)

  • @nihushu8748
    @nihushu8748 5 лет назад +2

    I want to build 6502 computer for a competition in my school and you fell from heaven for me :D

  • @LEGENDZyo
    @LEGENDZyo 3 года назад

    This is the kind of thing id like to see all the kids in school doing. Would be a great thing for kids to have fun learning.

  • @asemabuelhija4501
    @asemabuelhija4501 5 лет назад +8

    I'm so assembling this computer some time soon!
    Thank you sir!

  • @SciHeartJourney
    @SciHeartJourney 3 года назад

    I took this course in Digital Electronics with Laboratory through Cleveland Institute of Electronics many years ago. We built a 4-bit computer for one project! We used RAM chips, switches to do addressing and a 1Hz clock (whew!!!). It had 1 kbye of memory, 2 input registers and 4 instructions: AND, OR, XOR, NOT. It did not fetch instruction and decode them though. We do that manually. It was just a tool for learning how a computer works. These kind of projects like the 6502 remind me of the good old days! I used to used the Motorola 6809e, Intel 8085, Zilog Z80 and others.
    Embedded computing was a lot harder in the old days.
    Today they have so many microcontroller boards that are way more powerful, cheaper and easier to use, but using them robs one of the underlying knowledge that makes it work.

  • @stephenbranley91
    @stephenbranley91 2 года назад

    I'm far too stupid to understand most of what you do, but I find it fascinating none the less. I also think it's great that you don't edit your videos to remove little things that go wrong like compiler errors, but instead show how you fixed them. Excellent stuff, keep it up!

    • @eextence
      @eextence Год назад

      You aren’t stupid, just un-knowledgeable. You can learn all this stuff and anything you want as long as you are willing to. I believe in you :3

  • @ShimaKiyoshi
    @ShimaKiyoshi 5 лет назад +2

    In my first job, I wrote 680x assembly programs, and by wrote, I mean I had to write them down on lined paper, then write the machine code next to each line in the margin, then type all the bytes into a BBC micro which had a ROM burner attached. My biggest program was almost 8k which, for reference, is a full ring-binder worth.
    You guys have it so easy these days, with your fancy assemblers!

    • @craftsmanwoodturner
      @craftsmanwoodturner 5 лет назад

      It was a very long time ago, so I could be mistaken, but I seem to remember that BBC Basic had built-in 6502 assembler support?

    • @ShimaKiyoshi
      @ShimaKiyoshi 5 лет назад

      @@craftsmanwoodturner - well, long answer is that we also used the (awsome) Dataman S3 programmers, and to do software updates we would call out any changed bytes on the telephone to our customer, who would be typing them into their Dataman. In order to make this work, each page of code was divided into 4 line groups, and when your code got to the end of a page (only one page allowed per subroutine!) the remaining bytes in the final group of 4 were left blank - to allow for pudent modification of that page of code without affecting any other page. An assembler *might* rearrange a whole load of other code after an update.
      While a similar approach could probably have been forced with an assembler, my Boss was an eccentric PDP owner/operator, and insisted it was done this way. As a 'rookie' it certainly was a good way to learn the careful writing of code.
      It's a process that younger generations might find hard to imagine!

  • @Hettilo
    @Hettilo 5 лет назад +3

    While i would lie if i sad i would pass my computer technology class only with your videos, but those are by far the best ilustrationon of what the hell is going on:) keep up the good work i really helps me to understand it

  • @myhobbies5965
    @myhobbies5965 2 года назад +5

    Excellent way of teaching, please sir make some video tutorials for AVR microcontrollers in assembly. Thank for providing us such a great knowledge.

  • @tratbagd4500
    @tratbagd4500 5 лет назад

    My favorite channel and content on RUclips.

  • @OneAndOnlyMe
    @OneAndOnlyMe 4 года назад +1

    Opcodes were how we did do it back in the day! Literally by writing DATA statements in BASIC, and reading those and POKE'ing the values into memory addresses. Back then we used to be able to memorize the decimal values for the opcdes (there weren't that many to memorize for the 6502).

  • @carecavoador
    @carecavoador 5 лет назад

    Oh my gosh, Ben. What a cliffhanger! Your videos are simply awesome. Thank you so much.

  • @mysock351C
    @mysock351C 5 лет назад

    Brings back memories of programming in assembly on old GM 6800 series car/truck ECMs from the early 80's. Kind of fun to program on since they did not require a bootable operating system like the later ones, which meant you could use them for simple control projects.

  • @xanderplayz3446
    @xanderplayz3446 2 года назад

    Thanks for teaching me about computers! You make everything easy to understand. Thank you.

  • @zaberfluten8978
    @zaberfluten8978 5 лет назад

    It satisfies me so much so see your circuits. It is also the main reason why I watch your videos tbh😂😂

  • @AHotLlama
    @AHotLlama 5 лет назад +2

    2:32 good on you for providing the Mac and Windows versions

  • @sailor67duilio27
    @sailor67duilio27 2 года назад

    boy oh boy this brought me back in the early 70's, thank you

  • @sjpwarren
    @sjpwarren 5 лет назад

    Wow as a Kid wanted to understand assembly etc. Over time it made sense but it was always something I never fully understood. Thanks for making it clear. I wish I knew how to do Assembly programming back in the Z80 days!

  • @melkiorwiseman5234
    @melkiorwiseman5234 5 лет назад

    These videos remind me of when I built a Z80 based computer from a kit (a complete computer with a proper video display - B&W of course - and cassette tape storage) and then entered Microsoft BASIC for the TRS-80 into it, one hexadecimal instruction at a time, saving it on tape between sessions, and finally altered it so it would run on the kit computer. That was fun.
    The kit computer had a display half the size of the TRS-80 and used a different method for saving and loading on tapes and accessed the keyboard differently, so I had to alter all three of those sections of the code.
    Yes, I made it work. I used it for quite a while until computers which used disk drives became affordable.

  • @kirbymia6209
    @kirbymia6209 5 лет назад +1

    Another Ben Eater video! I'm really excited for this series of videos. I look up to your skill and ability to teach others and hope to be like you one day.

  • @spongerobert
    @spongerobert 5 лет назад

    I won't lie. A large amount of what you do on your channel is way over my head but I find the content both fascinating and somewhat philosophical. I always say that computers turn stupid electricity either from a wall socket or battery into smart electricity that can dazzle our senses and create worlds and realities beyond most of our imaginations.
    I often draw parallels between things that happen in everyday life like the predictable nature of my dog when I give it basic commands like sit or roll over to the pure logic nature of computers and sometimes wonder where is the 6502 chip(s) controlling my dog. It's just interesting seeing the "magic" happen bit by bit and realizing it's not magic at all but just a crap ton of very basic commands. It's really quite enlightening.

  • @elhananben8341
    @elhananben8341 4 года назад

    Ben
    In every video you make, you blow my mind!
    You have an amazing skill of explanation and you present the ideas in a great order!
    For years I have been looking to understand computers, and never found nothing as clear as your videos (besides the book of J. Clark titled But how do it know).
    Thank you very much!

  • @TheSephrn
    @TheSephrn 5 лет назад +12

    The only RUclips notifications I'll allow

  • @jamesallen74
    @jamesallen74 5 лет назад +23

    Ben: "No one actually writes software this way"
    Ben moments later: "hold my beer, in my last video actually I DID write this program by writing out the machine code by hand".

    • @TheGuyThatEveryoneIgnores
      @TheGuyThatEveryoneIgnores 4 года назад +9

      I wish someone would have told me this back in the 1980s. I wrote a few video games and my own disk operating system in 6502 machine language. Yes, typing in hexadecimal. (It can be done.)

    • @matthewe3813
      @matthewe3813 3 года назад

      @@TheGuyThatEveryoneIgnores what a madlad

    • @nizwiz._.5906
      @nizwiz._.5906 2 года назад +2

      @@TheGuyThatEveryoneIgnores oh dear god

  • @williamkim7719
    @williamkim7719 3 года назад

    멋진 동영상입니다! US$2.00 상당의 환호를 보냅니다. 👏

  • @dustchip8060
    @dustchip8060 2 года назад

    It amazes me how much I enjoy watching something I'm clueless about.

  • @edgeeffect
    @edgeeffect 5 лет назад

    I've been programming in assembler for (yikes) about 40 years.... but it's still great to watch this series and see you helping othrrs pick up my dubious habits. ;)

  • @GodzillaGoesGaga
    @GodzillaGoesGaga 4 года назад

    This takes me back. Damn do I miss those old days. This is a lot of fun.

  • @ETG168
    @ETG168 5 лет назад +3

    I'll be damned: after watching the previous 2 vids, i started thinking about building a similar project, just using some things differently, such as not using the 6522 chip and such. Then, on the day i started planning it all out, you released a vid which mentions that you'll be using it to drive an LCD, which was one of the things i planned on doing once i got it running

  • @JustinSBarrett
    @JustinSBarrett 5 лет назад +2

    Really fun stuff! This reminds me of my one-and-only assembly language program that I wrote for our family's Commodore VIC-20, back when I was in my teens. It just put a little Pac Man character on the screen and made his mouth open and close. Nothing thrilling, but I was stoked to have figured it out. I'm kinda wishing I'd stuck with assembly language stuff beyond that one program, but I've been coding in other languages over the years, so at least the programming vibe is still alive and well.

  • @darwinvinci7744
    @darwinvinci7744 5 лет назад +1

    Can't wait to start earning and be your patron.
    Thank you for everything!

  • @eldanielo0001
    @eldanielo0001 4 года назад +1

    This is ingeniously brilliant! Thank you for this series!

  • @malcolmherbert6483
    @malcolmherbert6483 5 лет назад +2

    am really enjoying this walkthrough, btw - I couldn't quite convey that enthusiasm to my wife, but I think she mostly got it ... :)

  • @drfailbucket
    @drfailbucket 3 года назад

    Just got the use of Arduino 3 Years ago... And this Assambly Code makes a whole lot more sense to me than what you have to deal on the Arduino IDE.. I kinda like Assambly 😁

  • @ZedaZ80
    @ZedaZ80 4 года назад

    I used to program primarily in machine code on my TI-84+ because you can type the code in hexadecimal on-calc and I didn't have a computer. I got really, really good at memorizing the addresses of all my routines. I still code this way, too, because it's just so convenient when I need to quickly test something. No compiling, no typing out so many characters to spell out one instruction, and I don't have to set up sending a binary from my computer to my calculator.

  • @danbance5799
    @danbance5799 5 лет назад +13

    Next, can you make a time machine and send these videos back to 1986? I could have really used them about that time. Still fascinating to watch.

  • @jayb9687
    @jayb9687 5 лет назад

    I don't understand any of this but I find it fascinating. You are a very smart person. :)

  • @soyz6375
    @soyz6375 4 года назад

    This series is so good! This part is my favorite so far. So instructive!

  • @3a_n739
    @3a_n739 3 года назад

    Thank you thank you, i was searching for ages for a compiler for Z80. I am remaking the z80 for college license in logisim and i was looking for a compiler so i don't program it by hand. Will be looking in the future to program it in a fpga for a more complex project. Your videos helped a lot and i must say, you are the one that made me understand and i've been searching for a while for someone. You are the best!

  • @benbowyang
    @benbowyang 5 лет назад +2

    You're a great teacher! Thanks, and well done!

  • @erygion
    @erygion 4 года назад

    Thank you Mr. Eater. Great video and I'm learning so much. I can't wait for the next one.

  • @hatsjie2
    @hatsjie2 4 года назад +119

    When someone calls Assembly language "easier"...

    • @AshtonSnapp
      @AshtonSnapp 4 года назад +23

      It’s easier than messing with raw machine code.

    • @ggldmrd5583
      @ggldmrd5583 4 года назад +10

      @@AshtonSnapp Creating our own 8bits turing machine, then creating the assembly language and the assembler for it, then creating compiler programms for it, then creating programs for it, is way easier than programing a x64 intel processor with pre-built libraries for a langage made from an other one made from an other one made from x64 assembly that we have to learn and that have no other issue than just getting the work done. Well, im a fan of homemade tech.

    • @mhballa5866
      @mhballa5866 4 года назад +5

      @@ggldmrd5583 it is like walking a road yourself from beginning to end , instead of using a map by someone else .
      the understanding is deeper and fuller .

  • @Wanttoknowabout
    @Wanttoknowabout 5 лет назад

    If there was a Nobel prize for just being awesome, you would easily get it!

  • @Vermilicious
    @Vermilicious 5 лет назад

    It's all pretty simple, but many find it hard to grasp. Kudos to Ben for making the knowledge so accessible and easy to follow.
    And who would've thought the 6502 would teach people how computers work so long after it was conceived? Modern processors work in much the same way, so it's still relevant. Using Arduinos and whatnot seems like overkill, and quite wasteful to me, for small hobby projects.

  • @vuurniacsquarewave5091
    @vuurniacsquarewave5091 3 года назад

    One thing about the ROR and ROL instructions is that if you look one of the "on" leds seems to disappear for one rotation before reappearing on the other side. That's because ROR and ROL run the bits through the Carry 'C' flag in the processor status, acting as a "9th bit" for additions/subtractions and moving bits around. This makes it easier to chain bytes together and interpret them as a variable larger than 8 bits. If you want to leave the carry out, on the 6502 it's easy to put a CMP #$80 before the ROL instruction because this will essentially copy the highest bit to C before you rotate it back into the lowest bit.

  • @AiOinc1
    @AiOinc1 5 лет назад +6

    8-Bit guy has a great video on how those LCDs work

  • @Jamesthe1
    @Jamesthe1 3 года назад

    I'm really enjoying this series. It's been making me want to look into how this is done to make my own program, maybe a 6502 emulator on an arduino for myself.

  • @tmhchacham
    @tmhchacham 3 года назад

    14:42 "not to say that blinking leds can't be fun"
    I love you.

  • @gypsyjr1371
    @gypsyjr1371 5 лет назад +1

    I toggled machine code into a Dec PDP-8 long before the 6502. And wrote tons of BAL (assembly language). Things are a *lot* easier now.

  • @simondann7371
    @simondann7371 5 лет назад

    I look forward to seeing the next video in this series drop, every time I get notified you have posted I can’t wait to check it out.

  • @r00tyschannel52
    @r00tyschannel52 5 лет назад +9

    This was how us poor people, in the 1980s wrote our Z80 machine code. I was too young to afford devpac, and the ZX Spectrum +3 manual had the z80 mnemonics listed. So, I needed to do it manually.
    I wrote it out machine code style on paper, then put the opcode numbers next to the commands on the right and in the margin popped in the address (for jumps). Then pop them all in a data statement with a poke loop and boom. Instant program (that would often crash, but still).
    Yeah, it was a pain for anything remotely complicated. But, I was young so not doing anything THAT complex.
    I did manage a track by track disk copier though. That needed to be in machine code, because you had to swap out the basic rom, and swap in the +3DOS rom, which if you tried to do from basic, for obvious reasons would cause a pretty instantaneous crash.

  • @1gogo76
    @1gogo76 2 года назад

    This guys was born with a breadboard in hand, never seen someone going to much into machine level details