How do hardware timers work?

In this video, learn how a CPU uses hardware timers to control execution timing.
More 6502 stuff: eater.net/6502
Support these videos on Patreon: / beneater or eater.net/support for other ways to support.
------------------
Social media:
Website: www.eater.net
Twitter: / ben_eater
Patreon: / beneater
Reddit: / beneater
Special thanks to these supporters for making this video possible:
Aleksey Smolenchuk, Anders Carlsson, Andrew C. Young, Anson VanDoren, Anthanasius, anula, Armin Brauns, Ben, Ben Cochran, Ben Kamens, Ben Williams, Benny Olsson, Bill Cooksey, Binh Tran, Bouke Groenescheij, Bradley Pirtle, Bradley Stach, Bryan Brickman, Burt Humburg, Carlos Ambrozak, Chris, Christian Carter, Christopher Blackmon, Dale Andrew Darling, Daniel Jeppsson, Daniel Tang, Dave Burley, Dave Walter, David Clark, David Cox, David Dawkins, David House, David Sastre Medina, David Turner, David Worsham, Dean Bevan, Dean Winger, Dilip Gowda, Dissy, dko, Dmitry Guyvoronsky, Dušan Dželebdžić, Dzevad Trumic, Emilio Mendoza, Eric Dynowski, Erik Broeders, Eugene Bulkin, Evan Thayer, Eveli László, fisksvett, fxshlein, George Miroshnykov, Harry McDow, hotwire33, Ingo Eble, Ivan Sorokin, James Capuder, james schaefer, Jared Dziedzic, Jason DeStefano, JavaXP, Jaxon Ketterman, Jay Binks, Jayne Gabriele, Jeremy, Jeremy Cole, Jesse Miller, Jim Kelly, Jim Knowler, Jim Van Meggelen, Joe Beda, Joe OConnor, Joe Pregracke, Joel Miller, John Fenwick, John Hamberger jn., John Meade, Jon Dugan, Jonn Miller, Joseph Portaro, Joshua King, Jurģis Brigmanis, Kai Wells, Kefen, Kenneth Christensen, Kitick, Koreo, Lambda GPU Workstations, Larry, László Bácsi, Lucky Resistor, Lukasz Pacholik, Marcos Fujisawa, Marcus Classon, Mark Day, Marko Clemente, Martin Noble, Martin Roth, Mats Fredriksson, Matt Krueger, Matthäus Pawelczyk, Matthew Duphily, Max Gawletta, Maxim Hansen, melvin2001, Michael Tedder, Michael Timbrook, Michael Weitman, Miguel Ríos, mikebad, Mikel Lindsaar, Miles Macchiaroli, Muqeet Mujahid, My Yiddishe Mama, Nicholas Counts, Nicholas Moresco, Nick Chapman, Not Yet Wise, Örn Arnarson, Paul Pluzhnikov, Paul Randal, Pete Dietl, Phil Dennis, Philip Hofstetter, Phillip Glau, PixelSergey, Porus, ProgrammerDor, Randal Masutani, Randy True, raoulvp, Renaldas Zioma, Ric King, Richard Butler-Malone, Richard Ertel, Rick Hennigan, Robert Comyn, Robert Diaz, Robey Pointer, §çīŤøşHï ŇåĶąýŐbŕÔ, Scott Holmes, Sean Patrick O’Brien, Sergey Kruk, SonOfSofaman, Stefan Nesinger, Stefanus Du Toit, Stephen, Stephen Kovalcik, Stephen Riley, Stephen Smithstone, Steve Jones, Tayler Porter, TheWebMachine, Thomas Bruggink, Thomas Eriksen, Thomas Rolfs, Tim Walkowski, Tom, Tom Yedwab, Tommaso Palmieri, Tyler Latham, Vincent Bernat, Walter Montalvo, Warren Miller, William, Wim Coekaerts, Wraithan McCarroll, xisente, Yee Lam Wan

Пікірлер: 1 000

  • @hashtagPoundsign
    @hashtagPoundsign2 жыл бұрын

    Given the lack of activity from Ben there are two explanations: 1. Off camera events have taken priority. 2. Ben set a sleep timer on himself and misplaced the decimal. Either way it may be a while before an update.

  • @BjornHarrier

    @BjornHarrier

    Жыл бұрын

    My hope is that he's planning another series and product suite, perhaps on another architecture or something and is busy doing research for that project. When he's done, he will shower us with videos and have another project ready for us to buy from his site.

  • @danman32

    @danman32

    Жыл бұрын

    Yep, like a series on 8088. Another KZread channel started one, but he stalled too. I've still been messing with the 8 bit CPU on BB, expanded it to 256 bytes as many have, and some other enhancements.

  • @mashrien

    @mashrien

    Жыл бұрын

    I'm terrified he caught the 'rona and didn't survive it :(

  • @ShawnC22002

    @ShawnC22002

    Жыл бұрын

    @@mashrien I hope that is not the case but I was wondering the same.

  • @Learning_Daily

    @Learning_Daily

    Жыл бұрын

    @@ShawnC22002 ben's github did show activity in July, so that might be a sign of life.

  • @XenoTravis
    @XenoTravis2 жыл бұрын

    This is why breadboard computers should be more common in colleges. The simple questions are overlooked with the abstraction we have added.

  • @kilrahvp

    @kilrahvp

    2 жыл бұрын

    When I was taught that stuff in school in the early 2000s we were using 8051 microcontollers, so everything in one chip... worked, but obviously you don't get to see and poke the internals. Then at the end of the year we had to inventory the lab and I came across the tool from the 80s they were using before they moved to that, and it was a delightful single board computer running around a 6809, a monitor ROM, some battery-backed RAM, both a 6321 and 6522 and a keypad and LCD, and it was so much more fun having access to the chips and being able to enter your code directly on the machine and run it that I borrowed it for the summer holidays and played a ton with it. Ended up being able to keep one when leaving that school, still have it of course, and the 34 year old battery is still faithfully keeping those RAM contents.

  • @ShALLaX

    @ShALLaX

    2 жыл бұрын

    This is absolutely right. I don’t think any software developers with whom I work these days grasps the technology at this low level. It explains a lot about the performance of modern systems.

  • @dubbynelson

    @dubbynelson

    2 жыл бұрын

    I wanna know where the hell I could go to study this kind of low-level computing stuff. I'm so sick of all of this needless abstraction.

  • @delphicdescant

    @delphicdescant

    2 жыл бұрын

    ​@@dubbynelson Electrical engineering is a little too low level, and computer science is a little too high level, but there is sometimes a major offered in universities called "computer engineering" that is halfway in-between. That seems like the most likely field to touch on this in my experience. Although I think that in both EE and CS departments, there are often elective 400 or 500-level classes offered that will go in this direction, so it's probably not necessary to center an entire major degree around it.

  • @nickwilson3499

    @nickwilson3499

    2 жыл бұрын

    @@delphicdescant to be fair, today it’s not really that useful to know this stuff these days. For the average software related job today you’ll never use any of this information

  • @RandallStephens397
    @RandallStephens3972 жыл бұрын

    I love everything about this series. I'm eagerly awaiting the point where Ben eventually builds a C compiler for the breadboard 6502.

  • @sadhlife

    @sadhlife

    2 жыл бұрын

    You'd love the book "Assembly language step-by-step" by Jeff D. It does exactly this

  • @ElSenorEls

    @ElSenorEls

    2 жыл бұрын

    @@sadhlife it is not the same thing. It has to be done by Ben.

  • @fathomisticfantasy2681

    @fathomisticfantasy2681

    2 жыл бұрын

    @@sadhlife if not then thanks for the link. I will be looking into it. Thanks for adding to the YT conversation.

  • @SeekingTheLoveThatGodMeans7648

    @SeekingTheLoveThatGodMeans7648

    2 жыл бұрын

    @@ElSenorEls Well, not everything has to be from scratch. Ben might be able to demonstrate an integration of existing freeware into his machine in such a way that one can readily duplicate it.

  • @chiblast100x

    @chiblast100x

    2 жыл бұрын

    Do you mean a C compiler that runs on the breadboard 6502 or a C compiler that merely targets the breadboard 6502? While I get that compiling C on the machine that targets itself would be a really solid learning experience in many ways, especially if it's capable of self compiling, there are a lot of reasons most consumer level computers using 8-bit processors defaulted to an off the shelf Basic interpreter within such constraints and many of those would equally apply to a project like this.

  • @GuildOfCalamity
    @GuildOfCalamity2 жыл бұрын

    If Armageddon happens, we will only need Ben to bring us back to the future.

  • @jeremiahbroccante

    @jeremiahbroccante

    2 жыл бұрын

    Ben is the Foundation!

  • @Scrogan

    @Scrogan

    2 жыл бұрын

    Hope you stockpiled on milspec radiation hardened 6502s!

  • @khatharrmalkavian3306

    @khatharrmalkavian3306

    2 жыл бұрын

    Primitive Technology can make the transistors from mud and pineapples.

  • @Aragubas

    @Aragubas

    2 жыл бұрын

    yes

  • @CMDRunematti

    @CMDRunematti

    2 жыл бұрын

    @@khatharrmalkavian3306 i mean sure we can joke about it, but let's take it seriously... Mud and pineapples, if they work as transistors, they would use a lot of power. We would need chipmakers along with Ben to get back to speed. And some electrical engineers to feed it power... Otherwise, i already learned so much from these videos I'm bloody stunned, how simple and yet how complicated a computer is

  • @invent0r137
    @invent0r1372 жыл бұрын

    I was literally just learning about AVR Timers. This video is perfect timing.

  • @dramforever

    @dramforever

    2 жыл бұрын

    "This video is perfect timing." I see what you did there

  • @rpeetz

    @rpeetz

    2 жыл бұрын

    time spent learning is time well spent am i right?

  • @el-hech2889

    @el-hech2889

    2 жыл бұрын

    God s plan

  • @maxlee3838

    @maxlee3838

    2 жыл бұрын

    Lots of overlap in concepts in how to configure the bits and check status bits between 6502 (a grandfather in many ways to modern microcontrollers) and AVR chips.

  • @alexanderiakimov482

    @alexanderiakimov482

    2 жыл бұрын

    What a time to be alive

  • @JiffyJames85
    @JiffyJames852 жыл бұрын

    Sometimes, when I don't have an o-scope at hand, and I'm testing stuff like this, I like to use a speaker (with a resistor in line). After a while you can make pretty good guesses on order of magnitude of frequencies. In this case, it would sound a B on the far right end of a piano.

  • @SamVidovich

    @SamVidovich

    2 жыл бұрын

    Wicked cool

  • @myleslos9658

    @myleslos9658

    2 жыл бұрын

    You are one mad lad 💀💀😂😂

  • @420oppa69

    @420oppa69

    2 жыл бұрын

    i think you can build some synth modules like that

  • @heisenbug3542

    @heisenbug3542

    2 жыл бұрын

    You debug using hearing, instead of reading, or in case of diode, seeing. That's cool!

  • @JiffyJames85

    @JiffyJames85

    2 жыл бұрын

    @@heisenbug3542 it's not so much a choice as, "you use the tools you have"

  • @d1ngd0
    @d1ngd02 жыл бұрын

    As a software engineer I really appreciate these videos. It makes things make so much more sense.

  • @infinitesimotel

    @infinitesimotel

    Жыл бұрын

    The abstraction people get lost in things that are too removed from the reality of the cold dead machine.

  • @IRedBerryI

    @IRedBerryI

    Жыл бұрын

    ​@@infinitesimotel but arguably, each layer of abstraction you remove is a new layer of programming you can progress. If an AI engineer first had to learn basic breadboards, then machine code, then assembly, and so on further and further up the chain, it would take exponentially more time for each new progression.

  • @TheKhalamar
    @TheKhalamar2 жыл бұрын

    The first method, depending on the processor speed, reminds me a lot of those games in the 80s that became impossible to play when you upgraded your computer to the latest 386 dx-33.

  • @JonJaques0

    @JonJaques0

    2 жыл бұрын

    This was one part I didn’t understand, isn’t the 2nd method still clock speed based? From previous context I know it’s running on 1mhz oscillator, so isn’t it technically a coincidence that 10k phi2 pulses = 10ms?

  • @willb.2800

    @willb.2800

    2 жыл бұрын

    @@JonJaques0 It is clock-dependent, but I'm pretty sure he intends to keep it at 1MHz (and anyway, there's no RTC so the clock is literally the only thing it can use to time).

  • @shaikhahmed7929

    @shaikhahmed7929

    2 жыл бұрын

    @@JonJaques0 Basically if your unit of time measurement is cpu cycles, it becomes clock speed dependent. The idea is to measure the time independently of cpu cycles. The Timer timeout implementation does exactly that.

  • @harrytsang1501

    @harrytsang1501

    2 жыл бұрын

    Same issue in video games. In-game physics sometimes use frames as the unit of time. Anything from Mario 64 to Mario Kart 8 only works right in 60fps.

  • @doctorbobstone

    @doctorbobstone

    2 жыл бұрын

    @@JonJaques0 Many systems specify the tick timer in real time (so here that might be a constant indicating 10 ms or, equivalently, 10,000 us, for example) or they give you constants for how many ticks their tick timer makes per second (so, 100 ticks per second here). There are other variations, but that's the idea. Given those tools, you can write your code to be portable because someone else did some or all of the work needed to figure out how to measure time portably. In situations where people are ignoring portability ("Everyone's got the same computer I do, right?") or at some points in the past when this type of thing may have been less common, people would often write things to only work on their hardware, causing the issues when you switch to new computers. Another issue might be in small systems where memory was tight and CPU time limited, it might be too hard (or at least perceived to be too hard) to make the code flexible and portable. So, basically, it *is* clock dependent, but with the right tools you can easily compensate.

  • @Jarikraider
    @Jarikraider4 ай бұрын

    When he said you can write a 'delay' subroutine with a bunch of nop's in it, I was like, "Please tell me that isn't how hardware timers work."

  • @TomOConnor-BlobOpera
    @TomOConnor-BlobOpera2 жыл бұрын

    Ahh! That HP calculator is beautiful. I rescued a similar, but financial one from the trash recently.

  • @SteeleDynamics

    @SteeleDynamics

    2 жыл бұрын

    I have a HP-15C from '84, but not a HP-16C. They're harder to find. I have a Swiss Micros 16C. Still really nice.

  • @joiscode3832
    @joiscode38322 жыл бұрын

    These vids are just amazing. KZread doesnt have enough high quality highly technical videos that are relatively easy to understand for the average joe

  • @deltakid0
    @deltakid02 жыл бұрын

    Busy-Loop Delay 0:41 One-Shot Timer Mode 7:31 Free-Run Timer Mode 14:57

  • @markbenedict1295
    @markbenedict12952 жыл бұрын

    Brought back some great memories. When I was going to Data Systems Technician school in the Navy in 1974, one of our machine language programming assignments was to turn the front panel registers on a Univac 1218 (clock speed 667Khz and no you did not read that wrong) into a digital clock. We had to do a lot of calculations on the time each op took to make the clock accurate.

  • @priyapepsi

    @priyapepsi

    2 жыл бұрын

    It must be so cool to know how to work with assembly and bare metal. I really want to learn assembly and c for the fun of it, but all I know is python and java

  • @godfreypoon5148

    @godfreypoon5148

    2 жыл бұрын

    @@priyapepsi Start with assembly on the simplest microcontroller you can find, and work your way up to C. That will give you a really sound base of understanding.

  • @TheChrisey

    @TheChrisey

    2 жыл бұрын

    @@priyapepsi No, you start with C, which is one single syntax regardless of platform. Once you've learned it, you move onto basic assembly on either an x86 or some ARM/AVR/Whatever MCU and work your way from there. You need to know that while C has its specific syntax. "Assembly" is not a syntax, but a way to turn actual numbers (opcodes) into readable commands, and every CPU architecture has its own set of commands. Hence why every architecture needs a specific compiler.

  • @danny_racho
    @danny_racho2 жыл бұрын

    How does this guy know all these stuff? I mean, I studied electrical engineering and this is beyond what they teach you in just few years. He's software- as well as hardware-competent. My biggest idol, wish I can be this good one day in this field as you are

  • @x87alpha1
    @x87alpha12 жыл бұрын

    Man if only every teacher in the world had this amazing ability to teach and keep you interested.

  • @garydunken7934
    @garydunken79342 жыл бұрын

    Just woke up on a Sunday morning, made a coffee, turned on my computer and I saw a new video from Ben... awesome!

  • @MatkatMusic
    @MatkatMusic2 жыл бұрын

    everyone who writes any type of code really owes Dennis Ritchie a lot of gratitude. This syntax and how loops are written with it really makes one appreciate the for() and while() loops that came with the C language.

  • @SimonBuchanNz

    @SimonBuchanNz

    2 жыл бұрын

    Actually structured programming was well in vogue by the time C was developed. It wasn't the first, but ALGOL 58 probably was the most influence on control flow in languages, for example it had the rather gross syntax but very familiar logic of: for i := base(increment)limit begin ... end So you should probably direct your language design praise towards John Backus and Peter Naur, though Ritchie's work on C deserves a lot of praise for actually replacing the use of assembly due to C's efficiency.

  • @jaredteaches894

    @jaredteaches894

    2 жыл бұрын

    C was actually a continuation of the programming language, B.

  • @TheChrisey

    @TheChrisey

    2 жыл бұрын

    Wherever it came from.. Let's all just appreciate the existens of C overall. Without it, we would be sitting with ridiculous overly abstract syntax and begin...end...begin..end..begin..end that would make melting clocks look like a walk in the park.

  • @jaredteaches894

    @jaredteaches894

    2 жыл бұрын

    @@TheChrisey Well, to be pedantic, B did not follow that syntax. In fact, C was very similar to B and I'd probably confuse it with C at first glance. But yes, your sentiment is correct. C is a beautiful and simple language! Dennis Ritchie was a king!

  • @ddognine

    @ddognine

    Жыл бұрын

    @@TheChrisey Let's not get carried away. It was well known by the early 60s that assembly was not the ideal solution for every situation. Something better was needed. That was 60 years ago! To say that we would be stuck with an overly abstract syntax were it not for C, is like saying humans are incapable of innovating. However, assembly still plays an important role in modern programming; not everything is written in C.

  • @ast_rsk
    @ast_rsk Жыл бұрын

    This was infinitely more clear how to use the 65C22 timers and interrupts to utilize the cpu's total processing time than any other video I've watched. I feel like I'm 90% of the way there on being able to write a whole (simple) game or general application for this computer (my end goal after following along with this project).

  • @fghsgh
    @fghsgh2 жыл бұрын

    Note: in both the software timer at the beginning and the hardware timer (probably, depending on the datasheet, but most hardware timers are like this), you can set the counter value to 0 to loop 256 (software) or 65536 (hardware) times. This means you get one more counting value to use! This works because the loop checks for 0 _after_ decrementing, at which point it will already have overflowed.

  • @TheChrisey

    @TheChrisey

    2 жыл бұрын

    Almost every timer starts counting from 0. 1 extra count doesn't give much at all tho. The most practical function of modern timer peripherals are the prescalers that lets you divide the actual clock frequency, so the timer could go an X number of magnitudes slower than the CPU clock. I wish you could see the blueprints of the entire clock schematic for the current processor I'm working with. It's massive, and quite amazing tbh.

  • @fghsgh

    @fghsgh

    2 жыл бұрын

    @@TheChrisey Timers usually count _down_ just like assembly loops usually do. What I'm talking about here is just the technical inaccuracy that 255 isn't the highest value, 0 is, because it acts like 256. And don't worry. I am working on some comparatively massive and amazing stuff.

  • @TheChrisey

    @TheChrisey

    2 жыл бұрын

    @@fghsgh Timers can either count up or down, there is no standard. I always have mine count up for convenience. Obviously if you were to count down you would start at a larger value and auto reload at a lower one. Everyone knows that. I didn't see anywhere that the timer he used were by default counting down.

  • @fghsgh

    @fghsgh

    2 жыл бұрын

    @@TheChrisey 1. Counters are definitely easier to implement in hardware if you just have to check for zero than if you have to match against a specific value. 2. The assembly loop definitely works like this. It's obvious from the instructions he uses. 3. Given other details about the hardware timer he used, I suspect that one also counts down. And even if it were counting up, setting it to 0 would still count all the way to 65536, because there is just no reason to overcomplicate silicon logic, especially not in the 70s, when this chip was designed.

  • @allanrichardson3135

    @allanrichardson3135

    Жыл бұрын

    The instruction BCT/BCTR IN THE IBM mainframe similarly decrements a 32-bit register containing a 31-bit signed number in 2-s complement notation and tests for zero AFTER decrementing, branching if not yet zero. So if you put that into a loop, you can execute that loop the number of times you set in the register to before you start. But if you START at zero, you go through the loop 2^32 times, or about 4 billion (0 becomes -1, then -2, down through -2^31, then +2^32-1, 2^32-2, then down to 3, 2, 1, and 0 fails to branch and stops the loop). Even on a moderately fast mainframe this could take hours, even with the branch being back to itself in a one-instruction loop.

  • @bobweiram6321
    @bobweiram63212 жыл бұрын

    I would literally kill to have had this Ben as a professor! It's a crying shame academia is full of people who can't teach worth a damn.

  • @CraftMine1000

    @CraftMine1000

    2 жыл бұрын

    This, 100% this

  • @ldskjfhslkjdhflkjdhf

    @ldskjfhslkjdhflkjdhf

    2 жыл бұрын

    Literally?

  • @bobthecomputerguy

    @bobthecomputerguy

    2 жыл бұрын

    @@ldskjfhslkjdhflkjdhf If they allow you to watch youtube in prison, I don't see a problem.

  • @SeekingTheLoveThatGodMeans7648

    @SeekingTheLoveThatGodMeans7648

    2 жыл бұрын

    @@bobthecomputerguy grooooooooooooooooan

  • @Elite7555

    @Elite7555

    2 жыл бұрын

    Because for most professors, teaching stuff is more of a inconvenience; a distraction from their research.

  • @tobygrover1163
    @tobygrover11632 жыл бұрын

    After watching a trillion youtube videos on various subjects, I believe this is my first post. I felt it necessary to let you know that you inspire me. Thank you for the information you give, and the way that you present it. I find it very easy to digest and grow my confidence and intuition, and let me know that things I once thought too hard or impossible, are actually quite achievable!!

  • @8bits59
    @8bits594 ай бұрын

    I was SCREAMING at my screen to use the ADC instruction! You can simply chain ADC #0 to automatically carry addition across bytes in fewer bytes and cycles than that INC conditional chain. You set it up exactly (but opposite) like that sbb instruction: CLC to clear any existing carry, LDA the LSB, ADC #1, STA, LDA, ADC #0, STA, and so on until all bytes are accounted for. The carry flag gets set by the ADC instructions, and only when overflow occurs. The net effect is that the ADC #0 becomes an effective ADD #1 if and only if the previous add instruction overflowed. Great work as usual ;D I hope to expand my own kit with some goodies here soon, been thinking of porting FLEX (the 6800 DOS) to it for some time.

  • @wolfboyft
    @wolfboyft2 жыл бұрын

    At the beginning when you were telling us it's a 6502 the video froze and my brain suggested that you were about to say "64 bit processor". _Wow, nice work Ben!_

  • @argoneum
    @argoneum2 жыл бұрын

    WDC W65C02S also has a WAI (wait for interrupt) instruction, so adding it in a loop decreases the power consumption. The tick values change after an interrupt was processed anyways. The beauty of it is that in other manufacturers 65C02 it is an "undocumented NOP", and on 65C816 it also is a WAI ☺

  • @averyjohnson138
    @averyjohnson138 Жыл бұрын

    I had to take a machine programming class twice particularly because I didn't understand how timers worked. If I knew about this channel when taking the class it would've been a huge help. I love your videos

  • @Roxor128
    @Roxor1282 жыл бұрын

    Ah, the ticks variable. I remember hearing about something similar in Windows. The resolution is high enough that it hits the 32-bit wraparound after about 29 days of uptime, which can cause bugs if a programmer makes use of it and forgets to take it into account. Debug versions of Windows start with an uptime close to the wraparound point to try and catch such bugs before it ships. If you have a Windows machine that reliably blue-screens every 29 days, blame the hardware manufacturers, because someone forgot to include the appropriate check in one of the drivers.

  • @joshuah345

    @joshuah345

    2 жыл бұрын

    @@Duu2 yeah, because they support 64-bit

  • @eumim8020

    @eumim8020

    2 жыл бұрын

    @@joshuah345 Lol thats so true, tfw you throw money at your problems by buying better hardware and suddenly every optimization task you've done in the last months becomes nearly useless work.💸

  • @isse6790

    @isse6790

    2 жыл бұрын

    @@joshuah345 isn't all of the underlying code and api's 32-bit?

  • @mariocamspam72

    @mariocamspam72

    2 жыл бұрын

    @@isse6790 yes, but not all.

  • @Paulo27

    @Paulo27

    Жыл бұрын

    Yep, some games had issues if your PC was up for that long.

  • @TvistoProPro
    @TvistoProPro2 жыл бұрын

    Ben, I was waiting for the next logical step on this, and then you didn't! Investigating, I realized with some shock that the 6502 doesn't have an instruction I expected. I cut my teeth not on the 6502, but the 6809, which had the SYNC instruction. SYNC on the 6809 would put the CPU into a low power sleep state to synchronize with an external interrupt. It first pushes a limited state to stack (as if an interrupt was happening), then waits for an interrupt to come in. Once the interrupt came in, it would service that interrupt, then resume (via RTI) at the instruction after the SYNC. Such and instruction would be ideal to put in the head of the loop here. It would mean you're only running the subroutines once per 10ms, and are doing so just as the interrupt returns, limiting collision. That would also mean the CPU is using less power (and making less heat) while running this task. The 6809 system I used often (the TRS80-CoCo) would use this trick to presync with hardware for everything from loading data from tape, to doing frame rendering for video output. Lots of neat tricks one can do when one can synchronize with a hardware event.

  • @PhilDennis

    @PhilDennis

    2 жыл бұрын

    The 65C02 from WDC which Ben uses in the breadboard computer does have a "WAI" instruction which pauses until an interrupt occurs and also minimizes interrupt latency. For those using vasm, the wcd extensions must be enabled with the -wdc02 option in order to use this.

  • @bobthecomputerguy
    @bobthecomputerguy2 жыл бұрын

    As a computer engineer, I love your videos. You've managed to condense a couple semesters into something I can watch in a day or two.

  • @KillaKevBrah
    @KillaKevBrah2 жыл бұрын

    Love that you jumped to the display roll over at the very end. 31:09

  • @Ryuzenski
    @Ryuzenski2 жыл бұрын

    Ben is an absolute treasure. I swear in a week we're gonna see : "How did I achieve immortality with a 6502?" With a 2 hour video on a breadboard project he made to make himself immune to dying

  • @endermannull4420

    @endermannull4420

    Жыл бұрын

    We hope.

  • @herethere5637

    @herethere5637

    4 ай бұрын

    This comment aged like fine wine

  • @tehlaser
    @tehlaser2 жыл бұрын

    I swear datasheet writers compete to see who can be the most opaque on timers. Maybe the chips just cram so much functionality into timers that it’s impossible to be clear, but something about timers specifically seems impossible to document well.

  • @douglashill2469

    @douglashill2469

    2 жыл бұрын

    Better than USARTs, generally. Those have to handle SPI, I2C, and serial (at the least). I've legitimately seen a datasheet say "don't use this feature", more or less. It was actually for talking SPI to devices which have input and output happen on different clock phases. Which is something I saw on a frequency synthesis chip, once.

  • @noalear

    @noalear

    2 жыл бұрын

    @@douglashill2469 Just came across something similar in some documentation for SPI myself. A younger me would see a challenge where current me sees compassion.

  • @pattersonzak
    @pattersonzak2 жыл бұрын

    Always excited to see another video!

  • @SvenDawitz
    @SvenDawitz2 жыл бұрын

    Can I wish for a modern version of those "ancient" videos about how transistors work down to the atoms that were never included in the "let's build 8bit CPU"-playlist and probably "nobody" of todays viewer ever saw?

  • @slabo8171

    @slabo8171

    2 жыл бұрын

    Those who didn't are the ones to be blamed :P. It's not one of those over-bloated (even if with good content) channels impossible to watch after joining the party late. I was able to browse the video list a while ago and watch them.

  • @white.rabbit
    @white.rabbit4 ай бұрын

    This video should be shown to all computer science/engineering students in the world. Thanks for the clear explanation with a working demo!

  • @JanBruunAndersen
    @JanBruunAndersen2 жыл бұрын

    A more advanced program would set up a vector (e.g. to a subroutine that controls when to toggle the LED) for the interrupt routine to call at the end. The control routine would then be called during each interrupt and can decide if something needs to be done. The main program could then be reduced to a dummy loop.

  • @TheChrisey

    @TheChrisey

    2 жыл бұрын

    A program with modern hardware would simply setup a timer with a proper prescaler that would trigger an interrupt only when you want the LED to toggle. Ofc no one in their right mind would actually create a randomly switching LED for anything other than learning

  • @jonmayer
    @jonmayer Жыл бұрын

    I hope all is well Ben. I can't believe it's been 7 months since the last video. Please don't say this series is done.

  • @austinwhiteted8231

    @austinwhiteted8231

    Жыл бұрын

    I hope he is okay

  • @raphaelfranzen9623

    @raphaelfranzen9623

    Жыл бұрын

    @Rafael flash 8 months without any sign of live. I hope he is doing well.

  • @danman32

    @danman32

    Жыл бұрын

    I've been wondering what the use was for the 4 buttons shown in the photo on the box for the kit. But yeah, where have you been? Hope you're ok. Love to see more uses for this 6502 on BB.

  • @marcel151

    @marcel151

    Жыл бұрын

    I think there will be a new video at the 1M milestone. ;-)

  • @musturdx

    @musturdx

    Жыл бұрын

    @@raphaelfranzen9623 Not to be an asshole but i think u mean life

  • @newoldbrain
    @newoldbrain2 жыл бұрын

    While he was writing the asm code I was mentally translating the opcodes in hex. LDA #0 -> A9 00 STA PORTA -> 8D 01 60 Last time I needed this was more than 40 years ago. Damn, I'm old!

  • @SimonBuchanNz

    @SimonBuchanNz

    2 жыл бұрын

    Fortunately I haven't quite yet done enough JIT code to do that for x86!

  • @gayusschwulius8490

    @gayusschwulius8490

    2 жыл бұрын

    Under what circumstances did you need to translate between ASM and opcodes in the early 80s? I thought that assemblers were pretty much ubiquitous at that point?

  • @newoldbrain

    @newoldbrain

    2 жыл бұрын

    @@gayusschwulius8490 Let's make it the late 70s. As a teenager I had designed and built a small 6502 based computer (hex keypad and 7 segment LEDs, a PIA, 2114 RAMs and 2708 EPROM). No cassette interface (in the beginning) and no other computer in sight. So my options to get and run an assembler were quite scarce. Internet was really slow in that age, we called it a photocopier.

  • @gayusschwulius8490

    @gayusschwulius8490

    2 жыл бұрын

    @@newoldbrain Oh wow, very cool. I'm currently trying to do a similar thing with a 65C02. Hearing that story I'm glad I live in the age of the internet where all knowledge is at my fingertips, haha. It's quite an impressive feat to do this with just book knowledge and no way to google things. Especially as a teenager!

  • @TheChrisey

    @TheChrisey

    2 жыл бұрын

    @@gayusschwulius8490 If you were to create an emulator (which I did for x86) you'll need to implement the actual opcode decoder. x86 is a mess

  • @emacmulle
    @emacmulle2 жыл бұрын

    Thanks for posting. Brought back memories of PDP and later 6502 assembly programming. I liked the way your video progressed in complexity, including the inevitable debugging.

  • @ShawnC22002
    @ShawnC22002 Жыл бұрын

    I found this very interesting! I work in industrial automation, with PLCs and what not, and I’ve gotta say - These videos have increased my understanding of this hardware so much! Thank you for all of this!

  • @joshseide7109
    @joshseide71092 жыл бұрын

    Would love to hear if Ben has offered a suggested reading list or favorite textbooks he’s learned from over the years.

  • @Mr_ToR
    @Mr_ToR Жыл бұрын

    I hope you're ok. please more content.

  • @OGBhyve
    @OGBhyve2 жыл бұрын

    You do such an incredible job explaining the assembly instructions as well as your reasoning!

  • @6wadekey372
    @6wadekey3722 жыл бұрын

    I'm so glad you gave the shot of the timer overflowing at the end

  • @matthias916
    @matthias916 Жыл бұрын

    Msi realized how much of a threat Ben is to them and took him out, R.I.P. Ben 😔

  • @erictwilegar
    @erictwilegar Жыл бұрын

    Did Ben accidentally call sleep with an extra digit. Miss you.

  • @pushing2throttles
    @pushing2throttles2 жыл бұрын

    Such a cool channel. Love how you correlate hardware with software and you really teach how one is married to the other.

  • @alexandermaasland3494
    @alexandermaasland34942 жыл бұрын

    You have such an elegant way of making people understand what you are doing, my compliments! Looking forward to your next video(s) Ben!

  • @linuxrf1
    @linuxrf12 жыл бұрын

    Great video as always, Ben! Thank you! One thing I think I should point here is that this implementation is prone to a "time drift" effect. The problem here is that we check the "current time", and if the required amount had passed we "do stuff" and then we record "time of last update". But what will happen if between the check and recording a timer tick occurs (and it will sometimes)? We then will wait one tick more than necessary till the next update. Over time, those "extra ticks" will accumulate and cause our program to go "out of sync" with the real world. For small LED-blinking demo that won't hurt much, but if we used this code to drive step-motor clock, e.g., we'd notice that our clock goes further and further away over time. Still, IDK if this is a topic for a beginners' tutorial =)

  • @TREmreprogaming
    @TREmreprogaming2 жыл бұрын

    But when the world needed him most, he vanished.

  • @kodirovsshik
    @kodirovsshik2 жыл бұрын

    Man a new video let's gooo Seeing your new video is like one of the most happy-making me things, the topics you cover and the way you do it are super cool

  • @vdubjunkie
    @vdubjunkie2 жыл бұрын

    I’ve taken the sleep routine for granted hundreds of times. Leave it to Ben to explain it in detail, and make it so interesting! Thanks, as always, for providing these videos to us!

  • @mfaizsyahmi
    @mfaizsyahmi Жыл бұрын

    Ben suddenly ceasing any and all forms of communication is very uncharacteristic of this channel and had me fearing for the worst. Maybe he's taken a permanent break from doing breadboards and has since moved on to breaking bread with higher beings. May the metal clips on the eternal breadboards never wear out. And the wire stock never run out. And the caps, LCDs, and other components forever as pristine as the day you bought them.

  • @jumeme378

    @jumeme378

    Жыл бұрын

    he good

  • @Geosquare8128
    @Geosquare81282 жыл бұрын

    great video!

  • @hey7328

    @hey7328

    2 жыл бұрын

    remove sleep calls to increase cactus finding performance by 4000%

  • @mthf5839

    @mthf5839

    2 жыл бұрын

    oh, really cool seeing you here!

  • @woosix7735

    @woosix7735

    2 жыл бұрын

    of courese it is

  • @atpray

    @atpray

    2 жыл бұрын

    Hello mod

  • @hupa1a
    @hupa1a2 жыл бұрын

    Great one! Your explanations are so clear and complete, you couldn't do it better!

  • @ilyadaemon
    @ilyadaemon2 жыл бұрын

    Hurray! Continue videos about 6502! Thank you!

  • @your_utube
    @your_utube2 жыл бұрын

    I am using timers in Javascript and this coding is so much like what even the OS is doing at a grand scale for all sub-systems. The code is so flexible and the examples clear. Real Eater quality. I literally left looking at other videos when the YT notification showed an update from you. Thanks Ben, you are a star!

  • @Ryuujin1024
    @Ryuujin10242 жыл бұрын

    9:25 Notice the deliberately swapping coloured pens for the next part to be written down. Just a little indication of the preplanning effort that goes into these.

  • @DelphineDofain
    @DelphineDofain2 жыл бұрын

    I always look forward to your video, I love learning with them!

  • @youneschroqi649
    @youneschroqi6492 жыл бұрын

    Sooo informative, well explained, extremely addictive.... Can't wait for your next upload, thank you from the bottom of my heart

  • @TheMechatronicEngineer
    @TheMechatronicEngineer2 жыл бұрын

    Where are you gone Ben? We need you here!

  • @stevedonkers9087
    @stevedonkers90872 жыл бұрын

    I experimented with the timers a few months ago. They're pretty nifty. I worked out a timer interrupt with some counts to blink at 1 second intervals, and printed out the value to the LCD, and after around 6 hours it was still second accurate. I also used it to create a text scrolling effect on the LCD that you could speed up and slow down with some buttons, and printed the speed value on the screen as well. The datasheet is quite helpful with the 6522.

  • @TheChrisey

    @TheChrisey

    2 жыл бұрын

    Timer accuracy has nothing to do with the code tho. Everything comes down to the oscillator precision. 1 second accuracy... Try 1usec. Where heat, PCB impedance and voltage fluctuation all causes the crystal to drift.. Or even the number of times you had to resolder the crystal.

  • @stevedonkers9087

    @stevedonkers9087

    2 жыл бұрын

    @@TheChrisey Timer accuracy depends on the crystal and related components yes (although I used an oscillator can), but as far as software is concerned accuracy can definitely be hampered by code. If you spend too much time in your ISR you'll miss the next interrupt (if I remember correctly the 6502 sets the interrupt disable flag on entry to the ISR). I forget the exact numbers I used, but if you set the timer to 49998 (+2) and have the ISR count 20 times you'll get a fairly accurate 1 second event (depending on the clock accuracy of course.)

  • @TheChrisey

    @TheChrisey

    2 жыл бұрын

    @@stevedonkers9087 Well of course, you can end up writing buggy code that doesn't use the timer properly causing it to skew. But that's more of a suftware bug rather than timer accuracy. Just mere semantics :)

  • @faramarzfalsafinejad4511
    @faramarzfalsafinejad45112 жыл бұрын

    Mr. Eater i have watched almost all of your playlists and i admit that I'm envious of your knowledge and (practical) skills and experience. I'm sure that others feel somewhat the same too. please share with us how you gained your knowledge and experience; like what books you read? what courses you took? etc.

  • @Gastell0
    @Gastell04 ай бұрын

    This is incredibly informative, as someone who have accumulated lots of bits and pieces over my career as IT person (mix of admin, scripting, poor coding and poking at hardware), this allowed me to connect a lot of these bits and pieces together!

  • @cangorkemgunes
    @cangorkemgunes2 жыл бұрын

    We need new videos sir! You are awesome!

  • @harrytsang1501
    @harrytsang15012 жыл бұрын

    Now that you have an irq, the system requirement of an OS has been fulfilled. Just need a scheduler and a way to context switch

  • @mfaizsyahmi

    @mfaizsyahmi

    2 жыл бұрын

    thus BreadboardOS is born!

  • @TheChrisey

    @TheChrisey

    2 жыл бұрын

    Don't need a scheduler nor a context switch on a micro.

  • @jaredteaches894

    @jaredteaches894

    2 жыл бұрын

    @@TheChrisey I'm unsure if you're being facetious, but yes, you do see those in microcomputing. Mainly RTOS when it comes to microcomputing. There have been 6502 operating systems built for microcomputers as well!

  • @TheChrisey

    @TheChrisey

    2 жыл бұрын

    @@jaredteaches894 Not for anything serious. Obviously I know about RTOS, and I also know how useless, slow and bulky they are compared to a minimal HAL library.

  • @saeedradmehr1976
    @saeedradmehr19762 ай бұрын

    Your stuff really delightful. I relax with it before sleep.

  • @lofigirl5835
    @lofigirl58352 жыл бұрын

    I swear you read my mind. I was JUST wondering about this yesterday. so of course you upload a vidoe about it that day and it shows up in my recommended the next. thank you!!

  • @Aaaaaaahron
    @Aaaaaaahron2 жыл бұрын

    Great content! How many Bens have you eaten?

  • @olaff667
    @olaff6672 жыл бұрын

    when you increase multi-byte 'ticks' variable, you can you adc (add with carry) instruction without jumps.

  • @beyondcatastrophe_

    @beyondcatastrophe_

    2 жыл бұрын

    How exactly are you thinking? ADC just sets the carry flag, you still need to jump based on that Also ADC does not work directly on memory, only with the Accumulator, so you need to store it back at some point Like all instructions ADC only works with 1 byte, so you still need to stop at some point as well I think ADC only makes the operation more complex

  • @IanSlothieRolfe

    @IanSlothieRolfe

    2 жыл бұрын

    @@beyondcatastrophe_ No, ADC adds the carry in with the argument like A=A+arg+C, so to add a multibyte number you just need to do CLC/LDA num1/ADC num2/STA num1/LDA num1+1/ADC num2+1/STA num1+1 etc so no jumps would be required. ADC both adds in and creates a new carry. But you are right, if incrementing a single multi-byte variable then doing it the way Ben has is quicker and avoids having to save/restore the A register.

  • @beyondcatastrophe_

    @beyondcatastrophe_

    2 жыл бұрын

    @@IanSlothieRolfe Ah, thank you, I just looked it up on the next-best page, they left that out

  • @danieltakacs8222
    @danieltakacs82222 жыл бұрын

    Thanks for making these. I'm learning assembly for my emulator project, and this helps a lot and also keeps it very interesting.

  • @coyote4440
    @coyote44402 жыл бұрын

    Hello Ben, I really love your videos and hope you are fine in such difficult time, Thank you for giving me better understanding of computer science in really low level! Waiting for new videos patiently.

  • @zerobyte802
    @zerobyte8022 жыл бұрын

    Low power mode: add a WAI instruction to the main loop. This pauses the CPU in low power mode until the next interrupt occurs.

  • @ebenolivier2762

    @ebenolivier2762

    2 жыл бұрын

    Interesting that the newer 6502s have this instruction, older ones definitely did not.

  • @IanSlothieRolfe

    @IanSlothieRolfe

    2 жыл бұрын

    @@ebenolivier2762 yes, WAI was introduced with the Western Digital CMOS 65C02 which came out in 1983. 6502 based machines like the PET, VIC20, Apple 2 etc used earlier Mostek and Rockwell designs which had significant differences. I don't think the 6510 used in the C64 had a WAI instruction but I may be wrong, it had a number of variants of the chip.

  • @ebenolivier2762

    @ebenolivier2762

    2 жыл бұрын

    @@IanSlothieRolfe Interesting! And what is more interesting is how long ago this instruction was added, way before saving battery power was a "thing".

  • @PhilDennis

    @PhilDennis

    2 жыл бұрын

    @@ebenolivier2762 I think the main motivation for introducing WAI, was to improve interrupt latency, since when waiting, the processor will immediately jump to the interrupt service routing instead of having to finish the current instruction first. Indeed if interrupts are DISABLED when executing WAI, the interrupt service routing is bypassed and execution continues immediately following the WAI instruction, for the fastest possible response.

  • @khatharrmalkavian3306
    @khatharrmalkavian33062 жыл бұрын

    Hope you're doing well. You are missed.

  • @tiger12506
    @tiger125062 жыл бұрын

    In the past, I wrote a chromatic tuner, and used hardware timers for measuring the time between sound oscillations. This brings me back. :) Would be interesting to here you discuss balancing different paths. i.e. you know that when it doesn't branch here, it takes longer, so the shorter branch needs some nop to balance it out, and then you subtract the whole from the original period. Of course, you didn't really need that here because the hardware timer runs completely independently, and as long as your ISR isn't long enough to interfere with the timing period, you're good. Cheers.

  • @Twisted_Code
    @Twisted_Code2 жыл бұрын

    the low-level hardware explanations on this channel remind me of something I came across when playing around with quite possibly my favorite cellular automaton: Wireworld anyone ever wanted to see a Turing machine represented in terms of a two-dimensional array where each cell in the grid has 4 states? Someone, back in the nineties (though they didn't write it up until 2004), made the Wireworld computer specifically for that purpose. it uses the Wireworld CA ruleset and the 4 states each cell is allowed to have to make quite an impressive display... With the sample program, it will incrementally calculate and display each prime number starting with two and going up until it runs out of digits.

  • @DrMattRegan

    @DrMattRegan

    2 жыл бұрын

    If you want to see Turing machine in action, try kzread.info/dash/bejne/mXyJmtmhgbOZgso.html

  • @bar10dr
    @bar10dr Жыл бұрын

    I miss your awesome videos Ben, hope everything is okay

  • @Tresla
    @Tresla2 жыл бұрын

    We miss you Ben. Hope you're doing OK

  • @turdwarbler
    @turdwarbler Жыл бұрын

    17.10 I see you have the unique HP16C. I have had one of those for 40 years, I bought it when I started out as a computer scientist and I have used it ever since. I even bought a second one so I have one at home and one at work. For those not in the know, In 1982 these calculators were packing a programmable word length 1 - 64 bits so you could simulate the whole variety of CPU's that were around at that time, bit sliced cpu's, 8 bit, 12 bit 16 bit etc etc. a 64 bit calculator in 1982 ?, amazing, and it will even give you 128 bit results for 64 bit multiply etc. They are just wonderful never to be copied calculators and are worth far more today than when I bought mine. Never had any issues with them and the HP manuals are legendry. Sorry to gush, I have never seen anybody else ever use one. I have the original box, manual, service cards, sales receipt, sad, I know, but it is just unique.

  • @thisisnonpractice
    @thisisnonpractice2 жыл бұрын

    Thanks Ben, you are making Firmware wonderful!

  • @Dorff_Meister
    @Dorff_Meister Жыл бұрын

    Thanks. Really enjoyed this. Easy to follow, logical progression.

  • @UndiagnosedGenXer
    @UndiagnosedGenXer2 жыл бұрын

    Hope you're ok, Ben.

  • @matthias916
    @matthias916 Жыл бұрын

    Next video in 3 months: Making a breadboard quantum computer from scratch on

  • @danieltravinsky3649
    @danieltravinsky36492 жыл бұрын

    i know nothing about these kinds of computers and code but your video explains everything really well. great video!

  • @anindyamitra5091
    @anindyamitra50912 жыл бұрын

    Outstanding demonstration, thank you!

  • @fecu2394
    @fecu2394 Жыл бұрын

    No videos for do long? I hope all is well.

  • @electra_
    @electra_2 жыл бұрын

    In a more sophisticated system, I might expect the timers to be triggered a little differently. In order to not require a "main loop" like you have... perhaps you would instead set up a time to wait and then mark the "return address" of your wait somewhere, and then when an interrupt occurred it would check if it's waited long enough, and if so, jump back to your code?

  • @ELYESSS

    @ELYESSS

    2 жыл бұрын

    That's what schedulers are for.

  • @someguy4915

    @someguy4915

    2 жыл бұрын

    Or just have the timer trigger an interupt, have your interupt routine check which timer triggered it and execute the address you defined for that timer if you want that functionality with this hardware.

  • @tonysofla

    @tonysofla

    2 жыл бұрын

    @@ELYESSS I wrote my own for arm cortex using the 24bit low-power rtc timer: for (int i = 0; i temp = task[i].sleepto; // get a temp copy if (temp != (uint32_t)-1 && temp > rtcmatch) { // a set value and not already past due if (temp eventrtc = (1

  • @luisjalabert8366

    @luisjalabert8366

    2 жыл бұрын

    @@someguy4915 This is how it should have been done. It's not "correct" to handle the LED switching in the main loop like he did, instead, what needs to be done, is to have an interrupt signal coming from the timer to make the CPU execute an interrupt subroutine (ISR). This subroutine should PUSH (and POP at the end) the status of the registers that it uses, and read some variable in memory (or directly from the output port if the CPU allows) to XOR the status of the LED, and output to the LED port. In this way he could have had a dummy while(1) loop doing nothing, and let the interrupts control the whole thing. EDIT: the 6502 has at least 3 interrupt input pins, so he could have wired the interrupt signal from the timer to the CPU, and setup the ISR accordingly. In the end I think he got confused and ended up doing the same thing as before (constantly polling a flag in a loop), but with extra steps (setting up the flag through interrupts).

  • @ratchet1freak

    @ratchet1freak

    2 жыл бұрын

    @@luisjalabert8366 the 6502 doesn't have a low-power mode though so there is no real point in "sleeping" it. You will be busy looping anyway so might as well keep it simple and check the ticks every time. And remember that this is a tutorial series, this kind of multitasking is perfectly valid and a lot simpler than a proper scheduler.

  • @dpatulea
    @dpatulea2 жыл бұрын

    Love the explanation! Wonderful video! I'm always watching your videos first.

  • @ChrisAthanas
    @ChrisAthanas2 жыл бұрын

    Such an excellent explanation of a usually confusing and esoteric subject

  • @great.Indian.culture
    @great.Indian.culture Жыл бұрын

    Sir hope you are absolutely fine

  • @ianmathwiz7
    @ianmathwiz72 жыл бұрын

    Who else saw the notification and immediately clicked?

  • @lukewebb604
    @lukewebb6042 жыл бұрын

    This came up in my recommended feed. I'm not familiar with breadboards at all, especially not programming for them, but this was really easy to understand with just the right amount of explanation but not repetition

  • @kmpnelson
    @kmpnelson2 жыл бұрын

    Always enjoy your videos Ben, and I'm super happy to see that there (as of writing this) are zero, yes zero, dislikes.

  • @z08840
    @z088402 жыл бұрын

    ...if you don't use portA for anything else you can actually just increment it - shorter code, and you can use other bits getting 2^n intervals...

  • @aldobruno712
    @aldobruno7122 жыл бұрын

    Hi Ben, is everything ok? You are not uploading anything since a while, just wanted to ping and ask if you're fine :)

  • @diogocruzdiniz3186
    @diogocruzdiniz31862 жыл бұрын

    Haven't even finished watching, but man this is one I was really looking forwards for

  • @zLcss
    @zLcss2 жыл бұрын

    I'm following Ben for a few months now and there is no doubt for me that he has the coolest channel/ content on KZread 😬

  • @ponchio4586
    @ponchio45862 жыл бұрын

    Why you don't you try to build a simple operating system for this computer? It can be very interesting to see how interrupts handling, graphics and memory management work together to create the operating system

  • @TheChrisey

    @TheChrisey

    2 жыл бұрын

    People do not use operating systems on microcontrollers in production. If you wanted to see how a PC OS works, (I've written one) you should make one for x86 and run it from the EFI loader right away. That way you'll actually learn how to setup basic ACPI, virtual memory tables and so on. Things you don't have on a microcontroller.

  • @NoTraceOfSense

    @NoTraceOfSense

    2 жыл бұрын

    Well, that’s not really the point here, is it? Small steps. Trial and error. That’s what’s going on here.

  • @AlanCanon2222

    @AlanCanon2222

    2 жыл бұрын

    @@TheChrisey One certainly could show the preliminaries, however: a hardware monitor, a boot loader.

  • @omarnaser8291
    @omarnaser82912 жыл бұрын

    where are you man

  • @AlanCanon2222
    @AlanCanon22222 жыл бұрын

    It does my heart glad that not only has this excellent series by Ben Eater been made freely available, but that it uses the 6502, the only assembly language I ever learned (on my old Commodore 64 and Atari 400).

  • @johnm2012

    @johnm2012

    2 жыл бұрын

    You ought to give ARM assembly language a try. It's very elegant and you can see that Sophie Wilson, who designed the original instruction set, cut her teeth on the 6502. She wrote the BASIC interpreter, with its built-in 6502 assembler, for the BBC Micro.

  • @nicholasorro1105
    @nicholasorro1105 Жыл бұрын

    Mr Ben ur one of my best youtuber i. I always enjoy your lessons and always eager to see your uploads. Receive lots of love from Kenya