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.
+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.
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.
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.
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.
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."
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
@@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.
@@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.
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
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!
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.
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.
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.
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 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.
@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) ;)
@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).
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
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!
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.
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
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.
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).
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.
@@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.
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.
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
$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...
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.
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!
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.
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.
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.
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 !
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...
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.
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.
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!
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. ;-)
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.
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.
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.
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.
@@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.
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.
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
@@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.
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.
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.
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.
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 ...
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.
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.
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.
@@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.
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.
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?
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.
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?
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`.
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.
@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.
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
@@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.
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).
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!
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.
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.
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.
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.
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?
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.
Are all IT related people getting this recommended or is it just me?
Nope, not just you lol
Every one is lol
All IT related people. Targeting individuals with recommendations would be unethical.
Lol
Yeah
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.
I was on the Atmos and a Spectrum. They taught me more maths than i learnt at school.
+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.
Lovely story - thank you for sharing!
Brilliant!
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.
In 2059 : video : Programming like it's 2019 :)
Everything would be Javascript and Python!
"So what you're gonna wanna do is go to stack overflow..."
I don't want to program like it's 2019 though :(
@ You'll probably just be thinking of a program and some other program will write it...
We'll all be dead by 2059 if we keep programming like it is 2019
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.
There are a lot of emulators, books and documentation out there. Just search !!!
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
@@peterberger3518 fun stuff
Great memories
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.
no reason you cant get yourself an apple 2 today
How did anyone make any kind of graphics like this?
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."
I'd laugh, but this joke is behind at least seven layers of abstractions
@@peterpanther8627 *claps profusely*
I liked drawing 6502 programs with pencil and printer paper. The arrowed lines showing loops and jumps turned them into artwork.
My goodness! How great if I could have attendend such a lesson in 1980.
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
@@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.
@@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.
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
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!
Now I want to go look up this undocumented opcodes...
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.
Great story!
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.
I learned assembly language the same way on the Commodore 64. I can still remember quite many of the opcode values by heart :)
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.
Sounds like maybe a KIM-1 kit?
In 40 years when all the programmers are using puzzle pieces, C++ will seem too hard. =(
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 ;)
Looking at the young and vibrant Rust community seems to refute that sentiment.
@@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.
@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) ;)
@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).
The PC computing revolution has so much to teach us. Thanks for the video, chai leaf.
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
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!
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.
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
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.
Finally, a useful and amazing video gets recommended to me!
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).
Hello, yes, Big Mac was also my BIG favourite. I disassembled and modified lots of stuff to my needs, like THE INSPECTOR....
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.
Glad you liked it! And yes, the speed with which you could find answers to questions back then was a lot slower.
We need more of this.
I saw the title, waited to hear your voice, sounded like a professional, I hit subscribe.
Awww, thanks!
@@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.
@@elmo8696 No need to reply to trolls; they're just trying to waste your time. Live well instead.
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.
Thank you for watching!
There's a lot of old people in the comment section. Which is nice.
Who did you call the old people?
Experienced programmers.
Happy to be here. I can still out code, out think any youngster and I have wisdom now as well.
@Tengku: passive ageism.
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.
Yes, quite.
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
$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...
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.
A lot of people got their start that way!
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!
no
Thanks for bringing back so many memories! The //e was the first computer I wrote code on.
Same! Glad I could bring a smile to your face.
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..
Glad you liked it!
Wish I had seen this video back in 1981 ...
I search every library in 1985 for books ...rode my bike to find them. Couldn't find anything!
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.
Thank you for watching!
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.
Awesome! Did you ever make anything fun?
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.
Thanks for the great content! Pls make more like this
I hope to!
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.
That's awesome. Go you! Would love to see a video explaining the KIM-1. It was juuuuust before my time.
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 !
Impressive!
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.
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...
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.
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.
This is fascinating!
New Prince song... “Tonight I’m gonna program like it’s 1979” 🎸🥁
Aaaaah! Fond memories!!! Thank you for reminding me my youth on a Commodore PET!
Glad you enjoyed the video!
this is very, very helpful. I would love for this dude to be my teacher
Awww shucks, thanks.
@@TeaLeavesProgramming you are very welcome
i used to love assembly on these and the commodore plus 4. nice video i miss them days in some ways lol.
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!
Fascinating! If you still have your code you should make sure it's uploaded to archive.org's Apple ][ collection.
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. ;-)
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.
The TRS-80 Color Computer (based around the 6809) remains one of my other favorite 8-bit machines.
He hits that enter button with passion
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.
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.
Thanks for sharing your experiences! I did the hole-punch trick too.
I.e. you stole the income from the game makers.
Awesome video. I love the 6502 chip.
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.
I never used ORCA/M, but I know the people who did swore by it.
Great Refresher! I've not been in the Apple II assembler since High School.
Thanks! What did you use it for back then?
@@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.
I soldered my own 1 MHz Acorn Atom together (6502 assembly & BASIC). 2 KB RAM, of which 512 bytes freely usable. Good times.
Awesome!
Yep me too. That's where I learned assembly programming.
photos.app.goo.gl/wsKvzgBSuKnpkzHNA Link to the Atom circuit diagram in case you want to make another ( I still have mine)
How do you get the disk drive sound from an emulator?!
Gerard Putter's Virual ][ does this by default.
Thats An Emulator?
I Thought He Used Actual Hardware
@@indeepjable Pay attention. 0:37
@@indeepjable The Amiga & Commodore Forever emulators do the same thing.
Great video, more of this please! :)
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.
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
@@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.
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.
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.
Great video! One thing though - the stuff on the right are instructions (mnemonics) not opcodes. The opcodes are the values on the left.
100% correct. Thanks for the correction.
Fantastic overview, thanks for making this!
Glad you enjoyed it!
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.
The cool name definitely helps.
4:45 I'm surprised the flashing letters and flashing cursor are not in sync. Pretty advanced for the time!
The flashing letter speed is controlled by an onboard 555 timer hardware. The flashing cursor speed is just controlled by a software loop.
Back in the 80's I had a nice macro assembler for the 6502. I had a lot of fun with it.
Do you remember which one it was?
@@TeaLeavesProgramming No, I'm sorry.
ah the time when you dont have to face git conflict
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 ...
Hi, Woz!
Wow, back in 1982 I was programming in Basic on an Apple IIe and assembly language as well (remember call -151?)
Thanks for the video. Apple ][ was my first micro at a young age and all thru high school.
Good memories, I hope!
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.
I just wished this had been built into the VIC-20. There was an expensive cartridge add-on to do it, VICMON.
Yes. It would have still been incredibly tedious to hack in a whole program opcode by opcode.
@@WinrichNaujoks Yes, but still beats POKEing in decimal numbers 0-255.
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.
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.
@@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.
"Like you would look up a logarithm using a slide rule..." anyone watching this has probably never used a slide rule or seen one :)
True! (I never used one in school either - that was before my time.)
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.
Wrong, buddy! I've learnt to use them in school.
I used one, though when calculators became affordable, I switched...
6502 was my first processor... Good times.
hahah, I'm only 22 and I've actually used one. ;)
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?
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.
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?
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`.
I work for an old insurance company. The old old mainframe code is still in use today, and it NEVER breaks.
Brings back fond memories, though mine is of Z80 on a TS-1000 and later a TRS-80 Model III
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.
Thanks for the comment!
@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.
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
@@TeaLeavesProgramming Thank you very much for your answer.
I'm learning about LC-3 right now, so this is an exciting video to me.
Is LC-3 referring to the "little computer" programming language? Is this in a class, or are you learning on your own?
@@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.
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).
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.
In 1979 I was using Pascal.
Great video, I always wonder how people did assembly coding on this machines back in the day.
Glad you liked it!
those beep codes so nostalgic...
Thanks so much for making this video!
You are so welcome!
it reminds me of my college days! thanks sir for the upload!
please give link to quick ''reference card listing'' @6:20 all of the opcodes of 6502
www.6502.org/tutorials/6502opcodes.html
lmgtfy.com/?q=6502+map+of+documented+opcodes&s=g
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. :)
"HELLO"
Nicely done!
I did 6502 on the C64, it's my second favorite programming language.
And what's your favorite?
@@TeaLeavesProgramming brainfuck
This...this is machine code... beautiful
This guy mastered the remote learning vibe in 2018.
I am 100% confused about whether this is a compliment or an insult!
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!
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
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.
The good old days. I used Merlin assembler to write machine code on the AppleII
I'm sure people would be interested to hear about some of your projects - do you remember them?
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.
Thanks for the input!
Just as a added there was no internet to get any help in programming machine code
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.
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.
So P is like eflags on an x86 processor or rflags on a x64 processor?
Great Video!
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?
All of that shipped as part of the ROM already in the computer.
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.
Thank you for sharing those memories!