Assembly Language Snow Day! Learn ASM Now!

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

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

  • @WilliamPayneNZ
    @WilliamPayneNZ 2 года назад +204

    My day job is working in a the mechanical engineering field. Long story short after an issue with a machine at work ive fallen down the computer rabbit hole and am finding this so fascinating that ill be studying computer science while working full time in 2022. Really glad I found your channel. Also awesome to find a fellow aspergers guy.

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

      Best of luck with your studies!

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

      welcome to the field :)

    • @akumaquik
      @akumaquik 2 года назад +7

      Stay away from python

    • @WilliamPayneNZ
      @WilliamPayneNZ 2 года назад +7

      Thanks everyone. From everything I’ve watched and read the C family of languages seems to be the way to go. I just brought the book “The C programming language” so looking forward to it.

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

      @@WilliamPayneNZ I support going thru C family, however depending on the goals you have you might need to consider some "scripting" dynamic typed alternatives as well.

  • @yodasapien7234
    @yodasapien7234 2 года назад +149

    “Perfect. I’ve tested ever case exhaustively, the code is proven perfect.” That is simply a brilliant line Dave. 😂

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

      Yeah going to steal that line for work!

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

      Dave if only I could download your knowledge like the Matrix and surpass Morpheus.

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

      It would make a great shirt!

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

      Latest upload to the tech curious, is a great demonstrator for how even multi million dollar budgets can miss the mark on what should be easily mastered tiny detail, but historically failing this I have stepped in to objectively improve the visual experience without question.
      I know no matter how hard I try, to beat Dave at the optimization game is realistically therefore probabilistically impossible.

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

      Kernel backstage passes to save passes. I like your style. Wish I had any at all. Im not even the same species oh Great Lord of Programming.

  • @joonglegamer9898
    @joonglegamer9898 2 года назад +57

    Makes me all nostalgic. It's like they say, you never forget your first kiss. I still remember 6502 Assembly code from back in the 80's. But my memory of Amiga assembly code etc, has faded - but the C64 (6502 processor based) will always be inside my mind. Useless information, but meh.... it was our time.

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

      Exact same way. I looked at so much 6502 back in the day I could look at byte code and tell what the code was doing. My assembler didn't have the < or > for low and high byte. Now that's new. Not sure why I find these videos so interesting but like you said, first kiss.
      I did work, as a kid, for a company called perspective software. They wrote C-NET BBS software for the C64. I learned a very cool trick that stuck with me for years which was that RAM and ROM lived at same address and we would toggle between the two at 60HZ to be able to use the RAM under the ROM. It was a clever trick someone taught me and I still see this today on modern ARM SoCs.... anyway, love the videos...

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

      Same. I wrote so much 6502 written as hexcode DATA statements in BASIC. You never forget your first.

    • @joonglegamer9898
      @joonglegamer9898 2 года назад +6

      @@DavidHathaway Oh yes, that's how it started. First Basic, then you'd meticoulously type in all those numbers with Machine Code data that you read in a computer magazine untill you got yourself an Assembler. My first assembler was the Hes Mon 64 cartridge, no such luxuries like Macro Assembly, no - we wrote directly to memory and changed code on the fly, disassembled the rom + numerous games just to see how it all was done, and changing it to learn, snippet by snipped. Oh good times. I was only 13 at the time, my parents thought Games were akin to Gambling so they were against it. My math teacher came up to me once when he saw me sitting there alone in the schools new computer room. What are you doing there? Oh how did you make those objects move across the basic screen without basic, and live while you're typing? Interrupts I told him. He was fascinated, I otherwise sucked at math in school, but the fact I was sitting there doing machine code blew his mind. Pity I couldn't get that inty my grades :)

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

      @@joonglegamer9898 yes, and then my folks got me a Timex-Sinclair 1000, and I saved my paperboy money to get the 16K memory expansion module. Such a good time learning Z80 except for that craptastic membrane keyboard.

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

      @@DavidHathaway Haha, I have that one in my drawers, original packaging and all. It brings even more memoris tolife, when you told me of the Sinclair (which is essentially a ZX-81 with 2 KB of ram instead of 1, right?), anyway - my best friend back then had a ZX-81, and he would constantly stress how superior the Z80 processor instruction set was to the 6502, he was right of course, but the C64 ended up more "overall" powerful because of the specialized hardware, custom sound chip, custom VIC chip etc. The Timex/ZX-81 essentially had a faster processor, 3.25 MHz if I remember correctly? But used a lot of the speed for drawing the graphics screen. He eventually ended up with a C64 himself.

  • @sumikomei
    @sumikomei 2 года назад +36

    This made me laugh so much, I love this less edited, more laid back approach so much personally. Also I find low level programming like this to be completely fascinating, and I really hope I can get comfortable with stuff like this eventually.

  • @morganskinner3863
    @morganskinner3863 2 года назад +47

    Fascinating - at school we had one camp who were Z80 aficionados, and another who were proponents of the 6502. I did heaps of assembly in the 80’s, even writing a modem driver in VAX macro assembly language. I was on the Z80 camp, and looking at your code to draw the characters, I would have loaded the bitmask into the accumulator, then run a loop of 8 left shifts, and test each time through the loop if the carry flag was set then draw the block character. No need to draw a space as the screen is cleared totally before drawing the time. I’m interested as to why you chose to do a logical AND and shift that value around instead, it seems quite a lot more work than just shifting bits left and testing the carry flag. Loving your channel by the way, my MS badge number was 168860, 2001-2011. 😀

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

      And I'm in the Z80 team.

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

      I was a 6502 guy until I went to college. We did 8085 and Z80 there. Some of the VERY CISC instructions on the Z80 were nice.

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

      @@ScottWalde - I agree. I amazed my CS teacher at school with LDIR. 😀

    • @ridefast0
      @ridefast0 2 года назад +9

      Z80 amateur here - wrote a space invaders game in Z80 machine code, pencil and paper, didn't even use assembly. Entered in hex by hand and stored on audio cassette tape. Might have got a better degree if I had spent the time on something more useful!

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

      I was familiar with 6502, but drooled over the Z80,000 spec instruction set. So disappointed it never saw the light of day (that I am aware of), because it so mimicked the IBM S360/370 instruction set. I was subcontracting to IBM around the time the PCs came out, doing mainframe OS subsystem software development. We just couldn't understand how they went with Motorola as a chip, rather than get on the Zilog path. It made no sense, it must have been pricing.

  • @DaveManDaveDude
    @DaveManDaveDude 7 дней назад

    Wow, I watched this 2 years ago as I started my journey with assembly via Ben Eaters 6502. Rewatching and now understanding 6502 assembly is amazing. This was my first of your videos and whilst you have many amazing vids, this has to be one of your greatest in my opinion:-) Thank you Dave

  • @LordCarpenter
    @LordCarpenter 2 года назад +8

    Does anyone remember Dr. Dobb's Journal? (Full name was Dr. Dobb's Journal of Computer Calisthenics and Orthodontia. LOL). They published a ton of assembly source code for everything from games to floating point math, mostly for the Intel 8080, but some for the Z80 and the Motorola 6800 family, as well.
    Truly great publication in its day.

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

      Best monthly for learning Real programming. Ported tiny basic to an intel dev kit. Wonderful days....Running Light without overbyte. Very very clever play on words.

  • @CallousCoder
    @CallousCoder 2 года назад +22

    I love 6502, I still program it frequently.
    I do a lot of assembly on my channel, I still fervently believe that it’s the foundation for learning how to learn to program. And it’s easier than all those web frameworks with 1000s of objects and methods, ugh. Instead of just knowing a handful of instructions and building things up from that.
    Assembly is like that old skool lego, where you had a few hundred different bricks.
    Today’s frameworks are like modern day lego with terrible bespoke pieces for each new box, ugghh.

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

      I agree 100%, my understanding of computers and how code actually works grew exponentially after learning 6502 assembly.

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

    Personally never experienced 6502-assembler, my days began with 8086-assembler (I'm a late bloomer), I still enjoyed the ride along down memory lane, thanks for sharing Dave!

  • @lonelymtn
    @lonelymtn 2 года назад +7

    I love that in a very brief segue, you’ve explained Zero Page pointers very nicely. Love your work as usual.

  • @richmanricho
    @richmanricho 2 года назад +10

    Perfect. I've tested every case exhaustively, the code is proven perfect!

  • @osgrov
    @osgrov 2 года назад +23

    Ha! Very cool, it all comes back to me now. The 6502 was such a simple and fun CPU, very easy to work with. :)
    I started programming with the C64, but never got serious until I got an Amiga. The 68000 is my all-time favorite processor, but the 6502 was always fun to me as well. A bundle of joy!
    Keep up the great work Dave, love your channel. :)

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

    My first ever computer I touched was a Pet whilst being baby sat, I was hooked and was given a VIC-20 for Christmas. Never looked back progressing to commodore basic then to6502 assembly for speed. C64 and then to Amiga with Devpac assembler. The 6502 made me want to get a job designing microprocessor that I did for a bit until working on 3D graphics accelerators and eventually image processors. Learning to code used to be so much easier even writing in assembly language. Such a simple set of instructions and direct hardware registers rather than complex Object oriented languages that we use today. Was certainly a golden time to be a kid with a computer. Thanks for this trip down memory lane!!!

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

    Congratulations on hitting 200k Dave. Love the channel.

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

    Great video Dave, brings back some fond memories.
    The '80's - the 'golden age' for assembly programming. A stunning level of required critical thinking and innovation, particularly for games programming, by folk who quickly developed a strong, deep passion for this subject, and who literally knew this language inside out, fluently - and at a time with no internet and few books...almost zero examples. You had to think outside the box, in fact, there wasn't a box in the first place, lol.
    While there are numerous benefits, of course, we've definitely lost something extremely important for every programmer when we offloaded so much critical thinking to online, with such 'wonders' as stackoverflow to provide a solution to every question.
    Question: as our expertise(!) in assembly language is rapidly becoming reduced primarily to a curious afterthought (I'd hope C++ is the exception), are we leaving some extremely serious doors open for some 'state sponsored' (or otherwise) nefarious activities...???

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

    Dave, you walk us through this so well. No fluff, direct to what matters, and in a very easy way to understand. Thank you so much, you'd be an excellent mentor.

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

    What I love most about this channel is it gives me the feeling, if I put my mind to it, I could learn assembly or programming or anything else. I wouldn't say you make it look easy, but you make it accessible and explain things logically.

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

    The good old days of assembly programming brings back a lot of memories Dave. My Canadian highschool had a Commodore 8032 lab. I remember writing programs that had more LOC than there were transistors on the 6502. 🤣

  • @danielvest9602
    @danielvest9602 2 года назад +6

    Love the coding vids the most! Keep it up! I never had a 6502 machine, but basically did the same on 8086 as a kid in the 80's. Brings me back to simpler times.

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

      If you want some 8088 come to my channel. I also do sone 6502 in hacking old games, to achieve a certain goal.
      Z80,68000 we also have and a whole course on ARM64

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

    I wrote 6502 assembly language when I was in college. Since then, I've written assembly language for a Z-80, several DPS chips, including the TMS320C30, the 68000 processor, and Intel X86 processor, mostly because I wanted to do efficient signal processing using the SSE1, SSE2, and SSE3 instructions.
    At one point, I was fluent in all these processors. Naturally, even back then, I wrote mostly C, and later mostly C and C++. It's been a long time since I wrote assembly code, and while I could still write Intel assembly language code, I don't recall any 6502 assembler now.
    99% of software jobs today could be advertised with, "No assembly required."

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

    Takes me back to my teenage years, slinging assembler on 6809 based Dragon 32. Happy years. Stood me in good stead at uni 🙂

    • @eadweard.
      @eadweard. 2 года назад

      Ah a local lad I see.

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

    I loved the 6502! That zero page pointer addressing was unique and versatile.

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

    I used to code assembly on 6502s back in the day too.. I was a broke kid so I didn't have a program to compile and link so I'd write the code on paper then write out the op codes and calculate the target memory addresses for jumps and jsr's myself then type it all as straight op-codes. Still lots of fun, just super time consuming.. It blows my mind how fast we could make programs run back then with so little.. Thanks for what you do. I love the MS war stories you share!

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

    This sure brings back fond memories for me. The first non-homebrew computer I ever owned was a Commodore PET (with the old Chicklet keyboard and cassette storage). One of the first programs I wrote was a mimic of Pong, written in BASIC. It ran far too slow to be usable, forcing me to rewrite it in 6502 assembly language. I didn’t own an assembler, so I had to hand-assemble my code using pencil and paper, and then type in the hex using a “monitor” program. It was tedious, but I sure learned a lot. My beginner programming buddies thought I was a genius for pulling it off.

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

      You had a "monitor" program? I remember POKEing my hand-assembled code into memory. (VIC-20) Eventually I got a VICMON cartridge, but that was years later. The Apple was such a leap forward with CALL -151. :-)

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

    I actually understood everything you did there, only because you explain so well. Easy and entertaining to follow along.

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

    Light bulb on! Zero page is pointers! Brilliant! I would love to see a segment on some methods of disassembling back into ASM. I realize that can be a tall task, but some tips and pointers on how you tackle such a task, even with just a simple program, I think would be a fantastic video! Keep up the great content, Dave! You're making RUclips worth watching!

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

    Gotta say your videos represent everything good about youtube. Your presentation is clear and you get straight to the point. Love the lens you use that creates a lovely bokeh background. My fav channel! Thanks so much for the time you lavish on this and sharing your knowledge!
    This episode brought back memories from 1983 when I graduated from a Sinclair to the first IBM PC, bought Peter Norton's Assembly Language Book for the IBM PC, (which amazingly, is still for sale), and in a fit of masochism, wrote a word processor in assembly. I looked back on the code and I have to say yours is way more elegant. Cheers.

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

    Gosh Dave, this takes me way back. I taught myself assembly on a C64 (also to write games), which served me well over the years as I learned 6811, Intel, and pic assembly. I eventually graduated to C, but always loved assembly for the pure control of the system. These videos are great!

  • @tedbenson8056
    @tedbenson8056 8 дней назад

    Toad
    My only class in coding has been doing Assembly on a thing called a "Wang 3000" desktop calculator. It had 14 Nixie tubes for a display. That was 1975. I fell in love with coding, as a hobby, and still do!

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

    To anyone in the UK wanting a generic introduction to what is inside a Microprocessor/computer chip I can highly recommend the Open University course T224 "Computers and processors" - which you can still buy the student books for - even though I see the course itself has been replaced by a newer course. That course explains processor cores, CISC and RISC, memory system architectures and things like bus bridges (as in Northbridge etc) and allows you to see what happens - step by step - when one of the asembly language steps used in Dave's tutorial is executed.
    In the early 1980s I did absolute oceans of machine code for the SC/MP microprocessor (Nat semiconductor chip) and then a little for the 8086 (Intel's first 8 bit MP) and yes, it gives you a knowledge of the basic processor like *nothing* else can. Nevertheless my goal was not to study processors it was to create useful programs and consequently I was very happy to move on to BASIC which I always likened to "flying after spending years crawling on hands and knees"! Visual Basic and then C++ and Jscript etc experience all followed though I did have a brief regession around 2000 when I had to write some assembly language code for an Atmel AVR microcontroller - which taught me huge amounts about that architecture, but reminded me how much work for relatively little result - albeit that the resulting code ran within the memory constraints and very fast.

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

    Learning 65c02 assembly was my goal for 2021. The "basics" down but much to learn I still have. More 65c02 videos are always appreciated. Thank you Dave!

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

    Man, it's been over 30 years since I've done anything in Assembly language... I'm amazed at how much I remembered, honestly. I only had to back up and re-watch a couple of times to get it all. Thanks!

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

    Loved this, always wondered about assembly language having started my computing career programming a Texas TI58. The coolest programmable calculator. Someone saw me doing that and said I'd like the new micro computers. This was 1979 and by taking some equity out of my move from one apartment to another I funded an Apple IIe, No car, no money and a computer costing 2/3 of my annual salary. My mother said it was the most stupid thing I had ever bought. I went on to have a good career in computers so I think I proved her wrong.

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

    I love how you explain every little bit for the curious viewers at, for instance, 4:00 :-) Great video, as always! And happy new year from The Netherlands!

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

    I started assembly code with the TMS9900, which was the first 16 bit processor, released in 1976. As a very junior engineer they asked me to design built in test equipment (BITE) to test memory cards on a ship borne system. The only display device was an oscilloscope, so I went into deep development mode for a few weeks (we had quite a free hand) and came up with code that ran all the tests then converted it to text messages via a digital to analog converter (DAC) that would scroll across the oscilloscope screen once the right time base and voltage range was selected. It became a standard test bed for the memory cards wherever they were used in the system. Happy days.

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

    I admire you so much Dave, don't stop! Greetings from Barcelona!

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

    I look back fondly on the days when I did 6502 and Z80a assembly. DJNZ was my favorite Z80a instruction.

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

    My God... I love this channel. It brings me back into the late 90s where everything that our forefathers taught us comes back to the present. And here we are 25 years later - rediscovering the past. I haven't been back to this information in ages. This type of information is a special spice that only a few people remember. Ancient Recipes!

  • @mr.stratholm4999
    @mr.stratholm4999 2 года назад

    I moved from Seattle to Honolulu in October of this year and I'm glad I did. I don't miss that weather. Growing up in the upstate NY area I wasn't a fan of snow to begin with and seeing you're dealing with snow convinces me I made the right decision.

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

    I love this. Stealing memory from unused buffers, making code concise as possible... ah the 8-bit memories!

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

    Was very interesting to see "2022"-era coding style applied to this older architecture.
    I started learning assembly in 6502 on an Apple//e in school in the mid 80s. My mind went to "how to optimize" this code at each step - those old habits are so hard to step around.

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

      yes, That was a very interesting setup, all round, the bit that was only slightly touched on pet, was pet's memory and resources , (lack of), and resources being used to 2022 had software, hardware talking, communicating, to the same goal?
      Was anyone thinking a flip clock, as Dave was moving the time back and forth with the PET's clicking keyboard sound going and number changing on the screen?

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

    Wow this takes me back. Still have my first ever assessment in IT for my work in ASM at Amex. Praised because it was a dying skill. Though that was the last year i ever used it professionally. Started on a 6502 at school and i was hooked :). As a kid that loved logic puzzles I didnt know what i wanted to do in life but found this was my calling. Surpised how much i could still understand. Helps that you didnt try too many tricks,

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

    Reminds of a scrolling Times Square display I wrote for fun in assembly for the Sinclair ZX81. It was all hand-assembled using a Z80 processor reference and ZX81 memory map. Lots of fun! I later landed a job at Motorola programming their early cellular switching system, which used fault-tolerant Z80 boards. The project somehow impressed my interviewer, along with a similar hand-assembled Space Invaders game. I hated calculating those relative jumps by hand. Stayed at Motorola for 30 years.

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

    I took every electronics class offered from jr high thru high school. Our teacher was able to source an entire cabinet full of Rockwell AIM 6502 computers complete with register tape, breadboards & oscilloscopes.. We would write code and build projects that would do everything from measuring temperature to controlling a robotic arm and power transformers to cook hot dogs for class parties / holidays etc. . These were great times. You have my attention anytime you start talking 6502.... ;)

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

    That gorgeous house is what working for Microsoft in the relatively-early days gets you! And very well deserved it is too :)

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

    This is amazing. I could watch you code and optimize and explain PET assembly for hours. I will never code PET assembly, but it's just fascinating.

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

    Really enjoyed this code walkthrough, especially since I only learned the basics of assembly at university but never had to use it afterwards.

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

    Great video !
    You have to appreciate today with almost limitless memory and explicit programming languages !
    Back in the day they must think about everything and take all in account.
    Hope you have nice holyday !
    Love your videos great stuff !
    Thank you for sharing your knowledge.
    Wish you the best 👍

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

    Wow. Having bought an Apple ][ in 1977 this brings back memories. I definitely did NOT code in such a structured method. In fact it was load fire aim back then lots of experimentation and trouble shooting. It is so cool to see a properly disciplined and structured assembly code for a computer that’s slightly older than my marriage. Thank you for this. Keep it up.

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

    Jim Butterfield was my hero back in the 80’s. I didn’t hear any mention of TPUG or TPUG magazine. As I remember Jim’s contributions to the club and the whole 6502 club were many!

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

    sta (zptmp), y Ahhh indirect indexed addressing mode. That was when I really grasped that you can point the processor anywhere. It blew my mind. It was the single most important instruction I ever learned cause it's the one that taught me pointers to pointer tables, to pointer tables, that could go on infinitely. I was on an Atari 800. It had memory mapped video also. Used to point it to the OS and watch the OS work by watching the characters change. It was an ad hoc way to find things, as the Atari had a closed architecture and info was scarce.

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

    It's amazing what can be done with a couple registers, a few dozen instructions, and a handful of illegal opcodes.
    By the way, the fact you can write to memory and "the rest just happens magically" is extremely convenient. Not so on the Atari 2600!
    Edit: If you want to continue this series, it might be fun to take advantage of the green-on-black display and add a Matrix background behind the digits!

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

    Assembly is the 1st language I learned. I struggled for years trying to learn OO programming. One day I stumbled on a book on assembly and started reading. It began with how a CPU worked and what each instructions was doing inside the CPU. It all suddenly clicked! I thought to myself, "I thought assembly was supposed to be the hardest language but it's the easiest!"

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

    Oh man I love this. 6502 is where it all started for me on the Apple ][+ "wait? What? There's more than FP Basic in here???" Call -151 & the Editor/Assembler started a whole new life for me. Thanks for this.

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

    While I was in college, I had a job in the Physics Department doing lab tech stuff. One of the computer labs was being upgraded, so we got a bunch of Apple // computers, but no floppy drives. I wanted to make some basic logic analyzers to use in the digital electronics classes.
    So I designed and wire-wrapped an 8-bit input card and wrote an assembly capture program for it. I wrote the display and control program in BASIC. The problem was how do I get the programs onto the machines w/o drives.
    So I made a boot loader that pretended to be a disk controller card so the Apple would call a routine on it when it was turned on. I burned the BASIC program into an EPROM, along with a little assembly program that could copy it out into RAM in the spot the interpreter was expecting it. Then pretend to type "RUN" so it would launch the program.

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

    Great video with just the right balance between technical depth and length - and I quite like the result, too.
    BTW: Isn't it incredibly satisfying when all your test cases work? Perfect code! 🙂

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

    So glad I found this channel. Every video I watch just makes me a slightly better developer

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

    Very well spoken not only for a lifelong programmer. Well spoken, period.

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

    This video couldn’t have dropped at a better time. Currently working on a scoreboard for my curling game. Thank you!!!

    • @8_Bit
      @8_Bit 2 года назад

      Is this who I think it is? :)

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

    Brings back fond memories of writing a 6502 disassembler in 6502 assembly. The addressing modes are just opcode bits.

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

    Absolutely awesome. This takes me back to my attempts to code in 6502 assembler on the BBC.

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

    I knew machine and assembly language for the IBM 1620, an old machine from the 1960s that had no registers. I once modified the assembler to allow it to call routines for a Calcomp flat bed plotter when I worked at Argonne National Laboratory West in the summer of 1968. The laboratory scrapped the machine a few weeks after I went back to school.

    • @matt.604
      @matt.604 2 года назад

      I also wrote code for old calcomp plotters back in the early 90s, but I had the luxury of using C instead of assembly.

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

    I really enjoyed the episode, but for some reason my favorite part was the snowy intro. You have an incredible house!

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

    Great infotainment, Dave.
    You're a legend!

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

    Lol would love to see you play with the C compiler targetting 6502...

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

    My bread and butter is "full stack Java" web app development, but between you and Ben Eater I'm now very intrigued by Assembly.

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

    "So eh Dave...what about code coverage?" - "Perfect! I've tested every case exhaustively - the code is proven correct!" 👍

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

    I'm enjoying your content from Ottawa Dave. I'm also super jealous of the software quality running your many RGB LED displays. Thanks for your time.

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

    I was way too old to learn to program in assembly language 😂 but I did, a whole 1k of memory was huge 😱 I used to design games etc. Sadly things went mad and I couldn't keep up. But at least for a couple of years, I was a computer programmer. 😀 I was about the first in my local building construction industry to have a website, 20years later it is still providing me with more work than I can handle.

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

      What? Nobody is to old to learn how to program in assembly.

  • @marcoose777
    @marcoose777 2 года назад +6

    Excellent stuff, I learnt BBC Micro 6502 back in the day, having a builtin assembler was definitely an advantage

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

      A small change if writing this for the BBC Micro would be to read the character definitions from ROM that are used for screen modes 0 to 6 but display the clock in mode 7.

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

      @@martinrwolfe I was just setting up VICE for commodore PET emulation 👍, but your suggestion makes sense.... mode 7, teletext mode.

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

      Back in 1988 I was taking an electronics course in which I had a crash course with 6502 assembly on the BBC Micro. I had created a light pen for the BBC and had to write the assembly routines to read the pen to get the screen position! All the pen was was a light sensor so all the actual work was in the assembly code.

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

      @@martinrwolfe I think there might even be a 'licit' way to obtain the character definitions through some system call on the Beeb, believe it or not.
      Definitely Acorn tried to write their APIs {as you might truly call them} as if it were already 'the future'. Pity the 6502 was unable to code a relative jump (except for a conditional of short range - i.e. 8' signed). Motorola's 8-bit was the belle of the ball - but they (Acorn) had their own solution in the pipeline, as we know well!
      My blood was almost boiling when I heard him talking about jumping into the right place in the ROM... but then I thought, how cool it would be to prove that to be the case with a comprehensive a step-wise debugger! (emulated or otherwise.)

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

    I love this! Also, I saw the colon character as an inverted "8" and now I can't unsee it. Happy New Year!

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

    Looking at Dave's Green monochrome screen brings back a special feeling of those early days. It's hard to describe the feeling of looking at monochrome text on a green or amber screen which I did for a number of years.

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

    Thank Dave Happy New Year from Australia 🦘😎

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

    AWESOME! Thank You! Happy New Year! 6502 was my first assembly language programming on the PET2001. Great memories.

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

    Thanks Dave! I wish I had gone your route in career choices. Learn stuff every time you are online.

  • @dalrob9969
    @dalrob9969 4 месяца назад

    Thank you, Dave. This is good for modern programming use to work with old school. Remember, Android Nim? :)

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

    I’m so glad I found this channel. Really great content for a computer nerd like me 😀

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

    I wrote a couple of utilities for the C64 and Amiga in ASM back in the day and this video brings back the memories and headaches :)
    I wrote a utility to open a disk on the C64 move, copy delete, etc files and even make the disk self-starting and made it do it all in a popup Windows. I personally used it for the rest of my c64 life.
    The Amiga was for Amigas that had add-on cards so you could pick your start up depending on the addon card for booting.
    Both are out there somewhere.
    After those, I retired :)

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

    Takes me back to writing 6502 assembler for the Apple II at high school. I was writing a text adventure and after several days of coding I demoed it to my friends, who were wondering why it took me so long to do something they could have written in basic in hours rather than days. I tried to explain that I had written all the data structures for inventory, word map etc., but they weren't impressed. ;-)

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

    I started with 6502 assembly, but 68000 is my favorite, z80 and 8080 have really growing on me recently.

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

    Really enjoyed that.. Took me back 30+ yrs to my 6502 (C64) days. Thanks Dave.

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

    It'd be so nice if everyone who programmed a computer actually went through and learned an assembly language of any kind, as it's instrumental in understanding systems better. When I went through my CS program, it required demonstrable experience of one low level (assembly) language and one high level language before you could even enter the program. I had the good fortune of doing 6502, 8080/Z80, 6809, and 68K assembly over the years, and the only claim to fame on the 6502 was is that it was so much cheaper and plentiful than everything else. Even treating the zero page as a set of registers, it's still cumbersome and awful to program with maddening limitations.

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

    I have a million great compliments to give in regards to your videos. I'm watching this to get inspired by how you teach this subject. So this time I settled on giving many 👏👏👏 for the fact that all code is perfectly readable also on a small phone, where I personally watch RUclips on.

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

    Yo, this kind of programming takes me back -- thanks for a new year's treat!

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

    Wonderful! Someone else on RUclips who really knows 6502 CBM assembly well is Robin from 8 bit show and tell. I was able to follow you somewhat, I know LDA for example "Load the accumulator" and BNE "Branch if not equal to zero" etc But Assembly is daunting even for though who have used it for awhile. I imagined what is going on with the JRS commands were similar to loading modules in Python for example.

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

    I love listening to whatever you talk about, I find all of it interesting, even if I'll never use it! Hope you have a good new year

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

    Oh, boy, now I feel old. My first MASM was PDP-11, followed by DECsystem 10/20, back in the late 1970s. After ages, I got back to assembly language on 8086 on a PC, mainly below the OS level for specialty device code.

  • @deathreus
    @deathreus 2 года назад +10

    When you're so deep into ASM that you don't even know how to describe what it does, you just know it does

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

    Brings back memories ... I learned Assembly on a C=64 with a special cartridge you plugged in the back that a friend gave me ...

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

    Safe bet: put a like right starting to watch a Dave video. It never fails.

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

    I remember writing an ASM fruit machine simulator years ago, gees how things have changed. I've done the C, Java, now its all enterprise dev ops, full stack, and writing my own multi-cloud diagram tool with compilers into AI pipeline models. All this is so nostalgic. I got into coding when I was at the kitchen table as a 7 year old and my brother had a ZX81 (Sinclair) and he was typing in a listing from some Magazine. Half the fun was typing it in and understanding it, and half the challenge was making sure not to crash the machine too as it had a 16k RAM pack.

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

    What a ride down memory lane,
    I started in the Apple world with a very early Apple II (Integer basic). I could not afford an assembler so I wrote one.

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

    I learned on an Apple IIe at ~7yo (Franklin Ace 1000, actually) and was very confused when the raster memory and special triggers were elsewhere on my stepbrother's C64. Used to spend entire days reading and writing to RAM trying to map everything out. Having time was wonderful.

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

    love the complexities of taming chaos to build functionalities

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

    You are a living legend Dave

  • @IsaacNgui
    @IsaacNgui 2 года назад +6

    6:10 - We won't be making clever optimizations today
    17:00 - Optimized anyway because Raymond could be watching
    That got me 🤣

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

    I remember Jim Butterfield, I read his books on vic20 and c64 to learn. I had to save the assembly code to tape. Run it and if it crashed then I had to load from tape and edit. Very slow process but running in assembly to get the speed was worth it.

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

    Very nice video, Dave. The number of programming tutorials you see on line with a full-screen display and tiny characters... Zooming in on the code that you're talking about is SO much better.
    Keep up The Great Work.
    It'd be interesting to see if you can peek into the memory where the video controller stores it's character table and then use those character definitions for your big characters,

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

    the Motorola 68000 has such a powerful but simple assembly language
    I love it

  • @em-tek
    @em-tek 2 года назад

    Remember back in the days i programmed 6502 directly in machine commands in hex editor, than burned eprom chip with the program. I didn’t had assembler. I suceed to make home alarm system this way consisting of 4 digit 7 segment led and matrix keypad. Oh man, what time it was back then…