Programming Like It's 1979: 6502 Assembly language on the Apple ][

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

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

  • @GS-oj1zk
    @GS-oj1zk 5 лет назад +748

    Are all IT related people getting this recommended or is it just me?

    • @starplushtv2185
      @starplushtv2185 5 лет назад +11

      Nope, not just you lol

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

      Every one is lol

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

      All IT related people. Targeting individuals with recommendations would be unethical.

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

      Lol

    • @love.ly.
      @love.ly. 5 лет назад

      Yeah

  • @donjohnson24
    @donjohnson24 5 лет назад +345

    Around 1980, I soldered together the COMPUKIT UK 101 to make my first computer and taught myself BASIC. Coincidentally, I was thinking about this recently, but at nearly 80 years old, I couldn't remember how I did machine code programming - and now I know! You mentioned the difficulties of using a line editor, and the one that made me swear was the fact that you could write sub-routines and manually calculate the jump to get there, but if you changed the earlier lines, all the jumps had to be redone. I did eventually get an assembler, but by then I had run out of ideas of things to do on the 6502. Pre-assembler, I coded the game 'rhino' ( a heart symbol being chased around a crossword-type layout) in machine code, and it took me many long nights until 4 a.m. to get it to work. How wonderfully easy it would have seemed with assembler. When my version of rhino did actually run, I then had to put in loads of loops to SLOW IT DOWN 'cos it was ridiculously speedier than the BASIC version. Thanks for this reminder of days gone by.

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

      I was on the Atmos and a Spectrum. They taught me more maths than i learnt at school.

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

      +Don Johnson24 Very interesting story, Don. Thank you, for sharing it. 80's were unique decade, music, movies, and growing computer industry, when only nerds understood it. I love it , I was 90's kid. It has to be very hard to programm in that time. Anyway, I've wrote few programs in BASIC, the longest had 5000 lines, so I understand little bit from it, but I've programmed under DOS with QBASIC of course, in 90's, so I've missed that era of pre-PC 286-486 computers. Anyway, I love to understand those feelings, how people had it in 80's and 70's with computers.

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

      Lovely story - thank you for sharing!

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

      Brilliant!

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

      Oh God, I remember hand assembling. I used to call to a jumptable of jump instructions that pointed to routines... then I learned how to hand assemble indirect addressing instructions and started to use a proper call-table.
      Back then I was 14 and skipping school to hang out in the University library... I managed to steal credentials on their Prime minicomputer (there were dumb terminals in the library and I made a little box to switch terminal lines to steal a session - and I used that session to create a fake login that printed credentials to the library printer). Armed with about 20 user credentials I wrote routines to watch people logging in and out around the building using a who command and a script - and I went around getting terminal ID's and mapping them to locations... just in case I was using a users account and they were sitting at the same table : /
      Later, I got caught and instead of getting into trouble, I was shown around the Prime, asked clever questions, and when they realised I was actually just super-curious I was given the username 'gary' on their system ... making me the only person not on the computing staff to have their name as a username. It was set never to expire ... they also gave me a library card : ) I just had to promise not to skip school and only use the services in the evenings and weekends.
      I spent my time helping adults with their 1st year computing homework : ))))
      After getting into trouble at school, the headmaster marveled at my unusual idea of truancy and permitted me a day-release to spend one schoolday per week at the university or doing my own thing... as long as I knuckled down the rest of the time.
      So, I'd hang out in lecture halls reading adult books on high level languages, digital electronics and telecoms - whilst classes would file in and out - listening to lectures on sociology, psychology, computing, engineering, math ... it was awesome. It was amazing not to be chased away. They didn't care who sat in on lectures... you could get a free education and nobody looked down on you for being young.
      Being treat as an adult made SO much difference to my education.
      I still occasionally code sections in ASM today, although I'm more of a C, Verilog, VHDL and HLSL/GLSL guy. I haven't hand-assembled in about 35 years... but I go sometimes get into 'Magic' and hand-draw machines in silicon for the MOSIS process, laying down N and P-doped wells, polysilicon and metal layers... simulating, doing the timing and heat closures. I guess that's a little like hand-assembly.
      My idea of fun has always been a little twisted : )))
      5 years ago I got an adult ASD diagnosis - it turns out I am autistic, which probably explains a lot XD
      Big love to anyone who ever took the time to learn to hand assemble.
      And thank you to Don for bringing back those memories of an awkward young me, sitting on the floor surrounded by pages and pages of quadrille paper, where I sat cracking away at bitfields and generating strings of MC to try the next day.

  • @starburstdragon
    @starburstdragon 5 лет назад +335

    In 2059 : video : Programming like it's 2019 :)

    • @TeaLeavesProgramming
      @TeaLeavesProgramming  5 лет назад +69

      Everything would be Javascript and Python!

    • @superslayerguy
      @superslayerguy 5 лет назад +56

      "So what you're gonna wanna do is go to stack overflow..."

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

      I don't want to program like it's 2019 though :(

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

      @ You'll probably just be thinking of a program and some other program will write it...

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

      We'll all be dead by 2059 if we keep programming like it is 2019

  • @CoderOfBugs
    @CoderOfBugs 5 лет назад +221

    I wish I would have been able to experience the early days of computing. Everything is so abstracted these days that it's hard to get a grasp on what is actually happening (which is kind of the point, I know). I just recently started to learn about 6502 assembly and I found your videos. Thank you for sharing your knowledge.

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

      There are a lot of emulators, books and documentation out there. Just search !!!

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

      Lol yes and no. It was tedious but so primitive that you couldn't get stuck. I've been trying to compile a Unity game for weeks lol

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

      @@peterberger3518 fun stuff
      Great memories

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

      6502 is a sweet tiny CPU that mimics features of mainframe machines of that era (and I was lucky enough to learn 6502 ASM as a kid, and then a thing or two about IBM360 architecture, which was a basis for the eastern-bloc computing). Later, I also found 8080's assembly was quite awesome, as well as 68000. But if you'll ever feel like trying x86, just don't. Avoid like a plague.
      Anyway, stuff I learnt during that time is really what enabled me to pay my bills to this day. I'm not afraid of writing from scratch, and I'm not afraid of complicated. And that's what you get if you are able to create even a few KB of useful 6502 code.

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

      no reason you cant get yourself an apple 2 today

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

    How did anyone make any kind of graphics like this?

  • @derstreber2
    @derstreber2 5 лет назад +49

    2019: "Here I have set up a stack overflow simulator. I ask it a technical question regarding my javascript program. Entering in all the relevant data of the problem. The simulation, in the form of a simulated user, will first berate me, telling me I don't actually want to do the thing I am asking, subtly hinting that it knows far more about the problem then I do, then hours or perhaps days later another simulated user will respond with an answer. There is a 74.8% chance that this answer is incorrect and does not work at all. There is a 34.2% chance that the program runs but does not do as I require. Additional data may need to be added to the original query. (depending on several factors, this may actually make the problem worse) Now, once I find a correct piece of code that fits my problem specifications I will "copy and paste" it into my integrated development environment (IDE), optional: I will retroactively write some unit tests to in order to be "test driven", and when using git, in order to maintain a clean and tidy version control history, I will be sure to rebase all of my changes on top of the latest commit."

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

      I'd laugh, but this joke is behind at least seven layers of abstractions

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

      @@peterpanther8627 *claps profusely*

  • @pipe2devnull
    @pipe2devnull Год назад +3

    I liked drawing 6502 programs with pencil and printer paper. The arrowed lines showing loops and jumps turned them into artwork.

  • @giordanob.8515
    @giordanob.8515 5 лет назад +25

    My goodness! How great if I could have attendend such a lesson in 1980.

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

      Giordano B. From the video: Lack of documentation and support is an integral part of the experience. 😜
      Anything like this would have helped me quite a bit as a kid with a hand-me-down Apple

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

      @@johnsimon8457 The main problem back then was rather that nobody had a clue and therefore you couldn't ask anyone who would give you a start-up help. If that wasn't the case for you personally, then you were extremely lucky.

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

      @@OpenGL4ever I'm listening to John Romero's memoir, "Doom Guy" and sure there's books like Assembly Lines and the Apple II 6502 manual - but even then someone who wants to do game dev has to be a on a ''teenager with no money and desperate to escape their life situation" level of motivation.

  • @ButchAnton
    @ButchAnton 6 лет назад +9

    To fill a range of memory with a value:
    1. Assign the value to the first byte of the range of memory. In your example, this would be
    800: 00
    2. Move the new value into the rest of the range. If you want to fill 800-807, first note that 800 is already done in the first step. Second, note that you fill one less byte in the range. In your example, this means that we're filling 801-806:
    801

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

    Great video, great educational value. I remember this soooo well. Learned assembly on a PDP-11, and then dropped into Commodore PET 6502 assembly and 6800 assembly (MIKBUG!) for self-developed systems. This was how you really and literally shifted bits around in the processor. And there were even some undocumented opcodes in the 6502. Like Store Immediate IIRC. Those days I wrote assembly with the same easy as writing Python now. Thanks for creating and uploading!

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

    When I turned 6 in 98, I was given two old complete computers filled with some of the best expansion/accelerator cards you could get for the period along with great displays and disk drives; an Apple IIGS Woz Edition and a Macintosh IIci. I started learning Assembly as soon as I got a book on it for the IIGS soon after and then moved to writing Assembly and C for both the IIGS and the Mac IIci. Funnily enough, I never really wrote a lot of games. Instead, I wrote programs to create high resolution/color graphics using the tricks on the IIGS I learned from books with swapping palettes and writing trackers to make music. Eventually I started making demos on both machines just to see if I could replicate what I saw Pentium machines doing.
    Assembly didn't really seem that difficult back then, it helped that the architectures I learned for were simple. Times have changed, now it seems like people can't be bothered to learn even Python when they gain some interest in maybe learning to program.

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

      Great story!

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

      Today's problem and blessing is the internet and games. This is distracting and takes a lot of time, on the other side it can help you. And if you have a problem that you could solve by programming a tool, you first look for an existing solution on the Internet. As a result, there is a lack of motivation to program something yourself. This used to be easier when all computers were still offline and additional programs cost extra money. All you needed were parents or acquaintances who would buy you a compiler or assembler. If these two did not come with the computer.

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

    I learned assembly language the same way on the Commodore 64. I can still remember quite many of the opcode values by heart :)

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

    I remember doing assembly on a 6502. I was not an Apple II but a circuit board with a builtin keyboard, composite video, and audio cassette for external storage. It ad BASIC and a hex input prompt for assembly language. I had to write every program on paper in hex with the assembler code beside it. That was 1979 I was 15.

  • @penguin1714
    @penguin1714 5 лет назад +145

    In 40 years when all the programmers are using puzzle pieces, C++ will seem too hard. =(

    • @TheBypasser
      @TheBypasser 5 лет назад +29

      LOL C++ seems too hard already - just take a look how people ignore INLINEs and STATICs while abusing function calls and doing crazy shit like inter-register MEMCPYs ;)

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

      Looking at the young and vibrant Rust community seems to refute that sentiment.

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

      @@recklessroges I really love Rust, its like having C and Haskell had a baby which also inherited some C++ and Python genes. I can't wait to see what people will come up with using "procedural macros" and similar features.

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

      @GloriousTapeworm Although the most compilers have auto-inlining, the 'inline' directive still forces them to do so no matter what (even if the size-aimed optimization mode is active). And even whenever it has no effect it still improves the code's readability ;)
      Also if you are so "smart" please prove me wrong on the other two things (statics and memcpys that is) ;)

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

      @GloriousTapeworm F wrong you are. Just to make sure I just tested it in VC2010 compiler in x64 debug build set to full optimization (/Ox, just like in the actual release builds) by taking a look at the assembly listing, and even so the functions declared lacking the 'inline' directive are accessed via the CALL command, while those marked as 'inline' (even not '__forceinline', by the way) are actually recurrent throughout the code as a set of their respective commands. So, you are a proof of my comment about the lack of knowledge (and probably even never compiled a native code) ;) And, most likely, even never looked through your ASM listings believing in the all-mighty compiler doing it all for you (spoiler: it never does). (Though, I must admit, the 'inline' directive indeed has no effect over the 'stock'-configured debug builds, /Od and /RTC1 that is - but who cares about that stuff anyway as it never makes it out yet misguides the newbie coders).

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

    The PC computing revolution has so much to teach us. Thanks for the video, chai leaf.

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

    Nice! Got my start on AIM65, then Atari130XE, then Apple II. The Apple really got me going because of Merlin. Wrote my own monitor/assembler. It is named S/O/S SyMon III. Similar feel to Apple's approach.
    Thanks for taking the time to produce/post this. Keep the 6502 ART alive! :-D

  • @quad64bit
    @quad64bit 2 месяца назад

    Thanks for this- new to my Apple ][+ and this taught me a great deal!! For others on a plus: boot the dos 3.3 master, switch to integer basic with INT, then you can CALL-151, and then F666G to get the mini assembler ! prompt! Thanks for the tip on Merlin too- older versions work on the + in 40 col mode. The manual is a must!

  • @s.i.3702
    @s.i.3702 5 лет назад +2

    Amazing! You brought me back to secondary school when we learned programming on a 6502 board supplied with HEX keyboard and pinout on 2 registers to switch on\off LEDs + other cool stuff.

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

    Great video. Man, I could really have used this advice in about 1985. Really wanted to learn assembly etc, and I didn't motivate and I didn't learn it. THANKS

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

    This brought back memories. I wrote commercial software in 6502 and Z80 assembler in the 1980s. The 6502 was more challenging, due to the limited instruction set, but more satisfying: it forced you to be creative.

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

    Finally, a useful and amazing video gets recommended to me!

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

    Ahh, memories of writing code in Big Mac. My first was a screen printer for the MX-80, which turned out better images than most commercial programs (it did some crude bit-wise processing and used a 3.5 dot vertical scroll to give half dot resolution via interleave - much like the screen itself). Those were the days - get home on Friday night, and program until my head hit the keyboard (or I ran out of snacks).

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

      Hello, yes, Big Mac was also my BIG favourite. I disassembled and modified lots of stuff to my needs, like THE INSPECTOR....

  • @charles-y2z6c
    @charles-y2z6c 5 лет назад

    Excellent video, you piqued lots of bits in the back of my brain. I worked 6502 on Commodore PET and Apple II both in BASIC and machine/assembler
    In 79, 80,81 The machine code was so pure, simple and accessible. Back then no google, so tech bookstores , magazines like byte and user groups were the answer to your problems.

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

      Glad you liked it! And yes, the speed with which you could find answers to questions back then was a lot slower.

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

    We need more of this.

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

    I saw the title, waited to hear your voice, sounded like a professional, I hit subscribe.

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

      Awww, thanks!

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

      @@illegalsmirf You can judge a book from it's cover actually. I got a hint from the title and the way he professionally started the video, the casual way with which he dealt with such old system implies that he is a veteran. That's worth a subscribe.

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

      @@elmo8696 No need to reply to trolls; they're just trying to waste your time. Live well instead.

  • @cafeinst
    @cafeinst 6 месяцев назад

    I had an Apple II plus as a kid in 1980 but did not have good books or an instructor that could teach me what you’re doing. Because of this, I missed out on a lot of what I wanted to learn. Thanks for your videos.

  • @tengkuizdihar
    @tengkuizdihar 5 лет назад +89

    There's a lot of old people in the comment section. Which is nice.

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

      Who did you call the old people?

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

      Experienced programmers.

    • @charles-y2z6c
      @charles-y2z6c 5 лет назад +2

      Happy to be here. I can still out code, out think any youngster and I have wisdom now as well.

    •  4 года назад

      @Tengku: passive ageism.

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

    It's also quite an evolution over previous systems like the Altair where you had to flip binary switches on the front panel to enter those hex bytes.

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

    Thank you, RUclips algorithm, 2 years late. :P That brought back memories. Only 2 weeks ago I stumbled over my hand-commented disassembler output of the Apple disk controller (generally at C600). Plus the machine language course a student/tutor had sent me, a wide eyed kid, hand-written, week by week in the post. My favourite assembler was Merlin (EDIT: wrote this before I watched the video all the way to the end). Sadly so much was lost when I foolishly sold every single bit of my Apple kit, including books and floppies. Few things I regret more. :( I still have various address ranges committed to memory.... $100-stack, $300-general purpose, $400-screen #1 IIRC, weren't there two, just like: $2000 hires1 and $4000 hires2, $C000-various hardware mapping, e.g. keyboard, speaker with $Cx00 used for the addon slots. But I have a horrible memory for names. :D

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

      $0800 was - I mean IS - screen #2 but it's also the default location for BASIC programs. Applewin is a very good emulator is case of nostalgia. And Merlin (as well as many others) is available as a virtual disk for it...

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

    brings back a ton of memories. I never took the full jump into 6502 programming but learned a lot where I was able to "crack" a Phoenix clone on the Apple 2. It relied on the disk being in the drive so I found out what memory location was used to view the disk and I changed it to NOP which was "No Operation" and it actually worked lol.

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

    I like this real-world treatment of the subject. It is curious how we played math blaster and Oregon trail and never a word said about this more interesting material!

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

    Thanks for bringing back so many memories! The //e was the first computer I wrote code on.

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

    I took LISA Assembler back in H.S. in 82'. We learned by building the game Breakout. Fun times.. Great video. Brings back a lot of great memories..

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

    Wish I had seen this video back in 1981 ...

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

      I search every library in 1985 for books ...rode my bike to find them. Couldn't find anything!

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

    That's was the best way to learn what is a CPU and how it works. This was a sort of travel in the unknown.Thank you sir.

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

    I learned 6502 assembler on the C64 when macro assemblers were already common. It used the C64 fullscreen editor and I had a monitor program on a cartridge too, so that was already a step better than this Apple ][ setup here.

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

      Awesome! Did you ever make anything fun?

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

      Breakfast of Champions he’s only demonstrating the built-in mini assembler and one other assembler. There were plenty of other assemblers including macro assemblers available.

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

    Thanks for the great content! Pls make more like this

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

    I still have a KIM-1 in working condition. Don't use it very often but I learned 6502 assembly programming on it back in 1980. Now I program Arduinos and ESP8266+ESP32.Turning 60 years next March.

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

      That's awesome. Go you! Would love to see a video explaining the KIM-1. It was juuuuust before my time.

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

    oh dang... i worked for small company in the begining of the 80's and we had no compiler for 6502 whatsoever but we were pretty gifted with binary so wrote all our small tests and programs straight in hex into the Apples memory so we could get out stuff done... pretty damn fun time, I'll say !

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

    I'll stick with my BBC micro, It had a "fully featured" multi pass in-line assembler. You could freely mix basic and assembly language.

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

      Yes, the BBC Micro had a built in multi-pass assembler (in BASIC), but it lacked a monitor. That said, I used the awesome Ismec Monitor 2.01 ROM back in the day when breaking copy protection routines on the games I could lay my hands on.... ahem...

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

    The Apple products were great, I was in college (BSEE, 84) when the II+ was the main offering, still a full system was about the price of a small car! Easy to forget how much impact the Commodore offerings had by opening this career to so many new people. Fun to play with all of this now in emulation.

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

    Ugh this brings back bad memories. I was a Computer Science major and we had to learn Assembly language. Here's the problem. It was not Apple, it was VAX/VMS Assembly... and this was in the mid-90s, so they were obviously so way behind the times.

  • @theears995
    @theears995 6 лет назад +11

    This is fascinating!

  • @robj7481
    @robj7481 5 лет назад +14

    New Prince song... “Tonight I’m gonna program like it’s 1979” 🎸🥁

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

    Aaaaah! Fond memories!!! Thank you for reminding me my youth on a Commodore PET!

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

    this is very, very helpful. I would love for this dude to be my teacher

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

    i used to love assembly on these and the commodore plus 4. nice video i miss them days in some ways lol.

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

    Back in the day (mid-1980's) I programmed a "spectrum analyzer scanner" display on the Apple II. I constructed an 8-channel ADC interface (plugged in to an Apple II slot), which was connected to the outputs of a portable 8-channel LED-display spectrum analyzer. My code displayed vertical bars that exactly followed the LED display on the analyzer. I added peak-hold and a few other features. It was one of my first projects programming the 6502 via *opcodes*, not assembly. My other project was a talking blackjack game ("Welcome to blackjack") and it would announce each card dealt. I miss those days!

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

      Fascinating! If you still have your code you should make sure it's uploaded to archive.org's Apple ][ collection.

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

      Thanks for the suggestion but I was lucky to have barely remembered I did those projects, much less to go find the code stored away on one or more out of a dozens of 5.25" floppies scattered in storage. ;-)

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

    I know there's a lot of love for the 6502, but to this day my favourite CPU is the 6809. Writing assembly for it is a joy, although having to convert it to machine code and then poking it into memory using BASIC as a child was a tad tiresome on my trusty Dragon 32. All those hours spent typing it all in... Nowadays I can fire up Vim, type it all in and run the code straight through a 6809 assembler in a matter of minutes.
    It was a simpler time back then, when microcomputers were the new frontier. So many things had yet to be learnt on those early systems when they were released and anyone from a university professor to kid in their bedroom could make the next big software hit.

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

      The TRS-80 Color Computer (based around the 6809) remains one of my other favorite 8-bit machines.

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

    He hits that enter button with passion

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

    Wow, what a wonderful walk down memory lane! My math teacher had an Apple ][e in the back of the class room. He would let me tinker on that for hours! Once I discovered Monitor and with my trusty dusty Computes! Guide to 6502 Assembly Programming I was in heaven.

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

    This hand assembled monitor is where I spent most of my time on the Apple ][. Often this was to code my own programs but even more often it was to figure out how to break the copy protection schemes of the games I wanted to play. Understand that a game might typically cost $24.95 back then. A blank single sided double density floppy disk at Radio Shack was $3.50 (and you'd use a hole punch to make a notch on the other side to make it double sided for twice the capacity). My allowance each week was $5.00! The economics was pretty clear as you might imagine.
    But pretty soon learning how to hack the machine was more fun than most of the games so I learned to do "real" programming in that monitor in my free time on a school machine since I definitely could not afford my own computer until I got a job in high school and eventually bought a Compaq Deskpro and entered the world of PCs in 1985. But the Apple ][ and Steve Wozniak will always have a special place in my heart.

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

      Thanks for sharing your experiences! I did the hole-punch trick too.

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

      I.e. you stole the income from the game makers.

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

    Awesome video. I love the 6502 chip.

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

    This brings back a lot of memories. I spent tons of time hacking 6502 assembly with Big Mac, the precursor to Merlin, back in the day. Also ORCA/M later, but it was slower and more bulky than Big Mac, though more powerful.

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

    Great Refresher! I've not been in the Apple II assembler since High School.

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

      Thanks! What did you use it for back then?

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

      @@TeaLeavesProgramming Mainly trying to figure out how to program music since assembly was really the only way to do that on the apple IIe. However, we ended up writing a program that would play the highest pitched frequency in an infinite loop and loaded it up on every apple II in the computer lab right before the teacher showed up. The look on his face was unforgettable.

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

    I soldered my own 1 MHz Acorn Atom together (6502 assembly & BASIC). 2 KB RAM, of which 512 bytes freely usable. Good times.

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

      Awesome!

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

      Yep me too. That's where I learned assembly programming.

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

      photos.app.goo.gl/wsKvzgBSuKnpkzHNA Link to the Atom circuit diagram in case you want to make another ( I still have mine)

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

    How do you get the disk drive sound from an emulator?!

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

      Gerard Putter's Virual ][ does this by default.

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

      Thats An Emulator?
      I Thought He Used Actual Hardware

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

      @@indeepjable Pay attention. 0:37

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

      @@indeepjable The Amiga & Commodore Forever emulators do the same thing.

  • @ekv
    @ekv 6 лет назад +2

    Great video, more of this please! :)

  • @nixomose
    @nixomose 2 месяца назад

    I remember using a program that was called something like "visual 6502" or something like that, that was similar in concept to the program in the video, it was amazing, as it similarly animated the registers and memory access as it ran an assembly program. You wouldn't happen to know what it was called or have video of such a thing other than the one you show here? It was an amazing program and I'd love to relive that part of my childhood.

    • @TeaLeavesProgramming
      @TeaLeavesProgramming  2 месяца назад

      There are several programs like this (visual 6502 is one of them) but I think you're looking for this program which was on one of the M.E.C.C. disks: ruclips.net/video/aZvss4XnceU/видео.html&lc=UgxuNrP1qjNWlo4H-lx4AaABAg

    • @nixomose
      @nixomose 2 месяца назад

      @@TeaLeavesProgramming so yeah it was very similar to that, but I remember the screen being a lot more busy and packed solid with information. I remember it shows addresses (like the actual "$0300") sliding down from one box to another denoting the loading of an address to do an LDA from kind of thing. Such hazy memories, but it was the absolute coolest thing, if you know of any others, even just the names, I'd appreciate. I'll go google spelunking for a while. If nothing else thanks for bringing back the memories.

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

    Thanks for this vid. You took me right back to my 6502 assembly language days as a 12year old. Whenever I hear a new programmer talk about something tough to code it makes me laugh when I see today's tools and languages.

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

      I hate when someone brags about "how they wrote this Python script and it was so difficult", it really makes me depressed. Its cringe worthy to see a so called programmer/software dev who barely knows what a byte is.

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

    Great video! One thing though - the stuff on the right are instructions (mnemonics) not opcodes. The opcodes are the values on the left.

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

    Fantastic overview, thanks for making this!

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

    This brings back memories of working with Merlin Assembler back in the mid '80s. The assembler to use in the day. If memory serves, Glen Bredon developed it.

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

    4:45 I'm surprised the flashing letters and flashing cursor are not in sync. Pretty advanced for the time!

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

      The flashing letter speed is controlled by an onboard 555 timer hardware. The flashing cursor speed is just controlled by a software loop.

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

    Back in the 80's I had a nice macro assembler for the 6502. I had a lot of fun with it.

  • @aryanadiazcakasana4414
    @aryanadiazcakasana4414 5 лет назад +32

    ah the time when you dont have to face git conflict

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

    12:46 "So to write a program of any length, of any significant length, if you're not Woz, you really need ... a real assembler ..."
    Gee, I must have been Woz when I was a teenager.
    (I started by writing my programs on paper in assembly language and then manually converting them to their hexadecimal codes as I typed them into the monitor. Eventually I became good enough that I did not need to write out everything. I still used a pencil and paper to keep track of all my variable and routine addresses. I often kept routines in their own separate space in memory so that I could modify them freely without affecting other routines. I would later move the routines to be adjacent when I was finishing up the program. Being able to insert instructions without having to retype everything afterwards and adjust conditional branch displacements would have been really nice though!)
    If only I could be Woz today ...

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

    Wow, back in 1982 I was programming in Basic on an Apple IIe and assembly language as well (remember call -151?)

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

    Thanks for the video. Apple ][ was my first micro at a young age and all thru high school.

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

    I used to remember most 8088 op codes in my head and could code direct. Have even sat at Eprom programmers typing in code in Hex direct from the keypad on the programmer unit. No way I could do that now. As soon as I got access to decent compilers and debuggers I forgot it all. Segment and offset with internal 4-bit-shifting was cumbersome in x86 world. Remember a brilliant NEC debugger called AFD I think. Many years ago now.

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

    I just wished this had been built into the VIC-20. There was an expensive cartridge add-on to do it, VICMON.

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

      Yes. It would have still been incredibly tedious to hack in a whole program opcode by opcode.

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

      ​@@WinrichNaujoks Yes, but still beats POKEing in decimal numbers 0-255.

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

      I learned 6502 assembly on the VIC-20 by looking up opcodes in a magazine (transactor) and poking them in memory. I eventually got a disassembler written in BASIC from a magazine (not sure which), I modified it to add a primitive assembler. The first real assembler I used ran on GEOS on the C-64.

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

      I had no idea the VIC didn't have a monitor, but it does make sense given its market segment.
      Although...now I'm idly wondering how hard it would be to write your own simple monitor in BASIC via liberal use of PEEK and POKE.

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

      @@TeaLeavesProgramming That wouldn't have been too difficult, but on an unexpanded VIC, you would have used up all of you RAM (3.5kB) with your BASIC Mon.

  • @zb3667
    @zb3667 5 лет назад +55

    "Like you would look up a logarithm using a slide rule..." anyone watching this has probably never used a slide rule or seen one :)

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

      True! (I never used one in school either - that was before my time.)

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

      As with learning assembly to gain understanding in how a computer works, a slide rule was a great way to understand the order of magnitude of what you were calculating. To avoid what students do since the 1980-ies: punch in some figures on a calculator and copy the answer back to the paper in 12 decimals accuracy. No idea if the decimal point is in the right place or what accuracy means.

    • @N.A._McBee
      @N.A._McBee 5 лет назад

      Wrong, buddy! I've learnt to use them in school.

    • @baruchben-david4196
      @baruchben-david4196 5 лет назад

      I used one, though when calculators became affordable, I switched...
      6502 was my first processor... Good times.

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

      hahah, I'm only 22 and I've actually used one. ;)

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

    On the Commodore machines, you could use PEEK and POKE in the BASIC interpreter. Did the Apples have the same ability, or did you have to always do it from the monitor?

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

      Both Integer BASIC and Applesoft BASIC supported PEEK, POKE, and CALL. Those were not part of Dartmouth's original BASIC, but were in the proto-Microsoft's Altair BASIC in 1975; I'd expect most home computer BASICs to support them.

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

    Got a question about 8:38. What did he mean with the endianess of the processor? Since the apple I I is an 8 bit system, wouldn't that mean that all the words would just be one byte, so we'd never have to worry about the order they were stored in memory?

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

      Although the 6502 was an 8-bit CPU, it has a 16-bit address space, so you still have to worry about the endianness of the bytes. It's little-endian. Thus, if we want to represent memory location $1234 in 6502 assembly language, it will appear in our code as `34 12`.

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

    I work for an old insurance company. The old old mainframe code is still in use today, and it NEVER breaks.

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

    Brings back fond memories, though mine is of Z80 on a TS-1000 and later a TRS-80 Model III

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

    It started to study Assembly on my career and it's really difficult compared to other languages like C++ but I get the point why is teached and when learning with PICs, makes it really interesting.

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

    @Tea Leaves
    You said in 6:50 in the video that you could buy special paper that was specially prepared for assembly programming because you could write your assembler code on the left and your opcode on the right. Could you tell me the name of this paper or what it looks like? A link to a picture showing such a paper would be enough for me.

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

      They're generally referred to as "coding sheets". Here's an example from the Altair: vtda.org/docs/computing/MITS/MITS_Altair8800MachineAssemblyCodingSheet.pdf
      And you can see similar sheets discussed in this IBM 360 manual bitsavers.trailing-edge.com/pdf/ibm/360/training/SR29-0232-6_System360_Assembler_Language_Coding_Text_196910.pdf

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

      @@TeaLeavesProgramming Thank you very much for your answer.

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

    I'm learning about LC-3 right now, so this is an exciting video to me.

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

      Is LC-3 referring to the "little computer" programming language? Is this in a class, or are you learning on your own?

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

      @@TeaLeavesProgramming It's a requirement per the the computer science field, here. Also, I would like to further learn the LC-3 architecture, after this semester, so that I could better understand how things work in C++ and in other languages, such as pointers.

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

    you had a green screen and BASIC in 79? My Sygnetics 2650 (July 1978 Electronics Australia kit), used Baudot code and a 20mA current loop to a teletype, and before that the Mini-scamp had 8 toggles switches for the data bus and another 8 for the address bus the SC/MP CPU clocked along at a blinding 670Khz !! (4 clock cycles per instruction).

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

    In the 80s I loved to program assembly language in my family’s Apple ][ Plus. I didn’t program machine from the monitor, I used the Big Mac assembler.

  • @john-lenin
    @john-lenin 5 лет назад +4

    In 1979 I was using Pascal.

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

    Great video, I always wonder how people did assembly coding on this machines back in the day.

  • @jeffr.640
    @jeffr.640 5 лет назад +8

    those beep codes so nostalgic...

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

    Thanks so much for making this video!

  • @jeffr.640
    @jeffr.640 5 лет назад

    it reminds me of my college days! thanks sir for the upload!

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

    please give link to quick ''reference card listing'' @6:20 all of the opcodes of 6502

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

      www.6502.org/tutorials/6502opcodes.html

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

      lmgtfy.com/?q=6502+map+of+documented+opcodes&s=g

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

    At the * prompt type ... 800: A9 C8 20 ED FD A9 C5 20 ED FD A9 CC 20 ED FD A9 CC 20 ED FD A9 CF 20 ED FD 00
    Followed by ... 800G
    Your 'welcome. :)

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

    I did 6502 on the C64, it's my second favorite programming language.

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

    This...this is machine code... beautiful

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

    This guy mastered the remote learning vibe in 2018.

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

      I am 100% confused about whether this is a compliment or an insult!

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

    As someone who has used high level languages, assembly to me looks like what C# looks like to people who've never programmed. I'll have to give it a try!

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

    when i was doing my Btec in computer studies we covered machine code and LDA was the only thing i remembered. wish i had payed more attention to class

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

      I remember fondly the Btec adult students at Newcastle. Many of them struggled so much as they'd arguably been born a decade or more too early. I used to truant there (Newcastle Uni, polytech and College) to use their minicomputer terminals and reference libraries... I was always helping folks with their COBOL and ASM assignments. The BTEC folks were the best ; ) I got caught using BTxxx accounts on the system so often that the admins gave me my own account 'gary' and a library card and made me promise I'd stay in school and only use the facilities in the evenings... but then the school allowed me a day-release, mainly as a bargaining chip to keep me engaged : )
      I often wish I knew what happened to those BTec students I made friends with. It was an unusual time... being 14 and an undiagnosed autistic, I had no friends at school and doing unofficial study at Uni and the Polytechnic was the only time I ever really felt I belonged somewhere.
      Today it would probably seem a little inappropriate that all my friends were adults - but it was a magical time for me.
      I still sometimes wonder where they all ended up.

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

    The good old days. I used Merlin assembler to write machine code on the AppleII

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

      I'm sure people would be interested to hear about some of your projects - do you remember them?

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

    Assembler is actually pretty easy to understand. There is really only a few commands. Once you understand how to work with them it not that bad. Only thing that ever got me down about Assembler was the fact almost any type of program is a mile long and very hard to re-read. My 1st language was DevPack Pro on the Amiga computer. I used it to wright extension libraries for other languages. Namely AmosPro and C. I'd have to say the best part of Assembler is the speed and size. Also the fact you truly understand how a computer works. Then there is the fact that nothing is more powerful and as versatile as Assembler. Some languages now will let you call commands right from a library (aka a .dll file). Much like you can with VBScript. This was always the case with Assembler. In fact the way you set up them calls in VBScript is much like Assembler. The fact you could use Assembler to call codes from other libraries , code logic and create code libraries made it very powerful. At the very heart of everything you wright is an Assembler code. So the truth is we never stopped using it. It has just bloomed into what you use today.

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

    Just as a added there was no internet to get any help in programming machine code

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

      Yep. I literally ordered a book which took weeks to arrive, and were just printouts, and in the appendix was the BASIC code for an assembler, so that I could make real apps/games. It took several hours to type in that code and debug it before the assembler would run.

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

      I taught myself 6502 machine language from the "APPLE ][ REFERENCE MANUAL" that came with the computer. I made frequent use of "APPENDIX A THE 6502 INSTRUCTION SET" until I eventually memorized the opcodes just by repeated use. I never knew about the mini-assembler or any other assemblers for that matter. I learned many things from studying the dis-assembled code of other programs.

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

    So P is like eflags on an x86 processor or rflags on a x64 processor?

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

    Great Video!

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

    Thanks! How are the character display and mini assembler programmed in though? Like, did that microcontroller ship with all of that or did Apple historically program that portion?

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

    That was a trip down memory lane. The bad thing is i still remember some of it. Does that make me old? But i have to admit that i worked more on the 6510 Processor and the C64. I also did some Pascal but quite frankly i can't really remember any of it.Then i had a long break before i entered the time of IT again. I started on mainframes and UNIX machines, programmed in Cobol before the advent of the PC came. My first own PC was a 486 DX2 with Win3.11 and NT4, then came Linux.