Nybbles and MouseBytes: Ep1: Assembler Basics

  Рет қаралды 10,638

Nybbles and Bytes

Nybbles and Bytes

Күн бұрын

Let's talk about the basics of 8502 assembler! We'll cover all the major parts of the CPU, and how the assembler language relates to them, as well as the various addressing modes, and even show how a CPU executes code!
Help me cover my costs on Patreon: / nybblesandbytes
Follow along and fill in your gaps with these manuals:
Assembly in One Step by RTK: dwheeler.com/6502/oneelkruns/...
Matt Godbolt's Blog on 6502 internals: xania.org/201405/jsbeeb-getti...
My 6502 Instruction Reference: nybblesandbytes.net/6502
Skilldrick's Easy6502: skilldrick.github.io/easy6502
Don't have a 128 to play on? Use an emulator like the VICE x128 emulator here: vice-emu.sourceforge.net
The music used in the video were songs by Jeremy Blake, specifically Let's Go Home. They're available free on KZbin.

Пікірлер: 126
@XTL_prime
@XTL_prime 5 жыл бұрын
2019 me is happy to see the information that 1989 me could never find and how that compares to the the stuff that 2009 me did finally learn (for 8051, mostly).
@CharGorilla
@CharGorilla 3 жыл бұрын
Well in 2020, I wish I could go back to 1989. Those carefree days, No Coronavirus, you could have a completely ridiculous haircut and nobody would bat an eyelid, cars had pop-up headlights and we had most of the building blocks of technology at our fingertips. I hate to say it, but no matter how bad-ass they make 1989 seem in Hollywood movies, it's certainly nothing compared to the uncertain world that we all live in today.
@damienretro4416
@damienretro4416 5 жыл бұрын
In the 1980s, assembly was a complete mystery to me. I think I was too young but I finally learned C64 assembler in 2016. It was very interesting and worthwhile and even helped my day job programming in C# and Javascript.
@NybblesandBytes
@NybblesandBytes 5 жыл бұрын
@Damien Retro This is *exactly* why I do this! Woot!
@Richardddoobies
@Richardddoobies 5 жыл бұрын
I tried to learn on a Commodore 64 when I was 15, but it was beyond me. Thanks to KZbin videos like this one, I started learning it a few months ago and it makes a lot more sense. I used to PRINT CHR$(65), but now I can LDA #$01 and STA $400.
@NybblesandBytes
@NybblesandBytes 5 жыл бұрын
YES! ^,^
@bytraper
@bytraper 3 жыл бұрын
Wow.. I would have been maybe 10-11 when I learned assembly for the c64. It was just a natural progression because I was trying to make demos like I'd seen in front of games and it didn't take long to realise basic was too slow. Then I moved onto hybrid programming where time dependant stuff I'd do in assembly and the more complex stuff was done in basic. But we lived in a remote area where I was quite isolated. Every Saturday we would travel into the city and I would visit the secondhand bookstores where I would buy any c64 assembly books I could get hold of as well as magazines like computes gazette. I enjoyed the Jim Butterfield books as well as anything published by compute! It only took about a year to become competent with assembly, but probably 2-3 years to learn the more intricacies of both the machine and the language. But really, you never stop discovering new things and methods.
@MindFlareRetro
@MindFlareRetro 5 жыл бұрын
Well done, June. I needed this type of explanation when I tried to jump into the world of Assembly back in the day but needed a good teacher, which I did not have, sadly. I am looking forward to upcoming videos in this series.
@jovanfilipovic
@jovanfilipovic Жыл бұрын
All this stuff brings back some good memories from my childhood. But i wish i could could know then of all this. It wouldnt be so painfully to self learn it....still cant believe that somebody actually cares for this knowledge nowdays. Geetings from Serbia. John
@ASHdemoREEL
@ASHdemoREEL 5 жыл бұрын
my nostalgic 80s youth thanks you for making these videos. thank you. *thank you. THANK YOU.*
@franciszek5831
@franciszek5831 5 жыл бұрын
The first step was done. Now we are waiting for the next, step by step, maybe I will finally understand how to add and subtract in assembler.
@NybblesandBytes
@NybblesandBytes 5 жыл бұрын
Coming soon! :D
@PhillHorrocks
@PhillHorrocks 5 жыл бұрын
This is absolutely brilliant! None of the books I've read explain assembly like this. Can't wait for the next episode!
@LadyNicola
@LadyNicola 3 жыл бұрын
I'm watching this in small chunks. Brain overload. 😁😁😁
@MallardGryph
@MallardGryph 5 жыл бұрын
Awesome explanation of the basics, the visualisations you do make relatively complex concepts extremely easy to understand. Best assembly tutorial on youtube, props! I totally get how the 6502 stack works now!
@NybblesandBytes
@NybblesandBytes 5 жыл бұрын
@Mallard Puddleduck Bear in mind that animation is slightly off. The stack pointer points to the topmost *unused* address. So when the JSR instruction is executed in that animation, it actually should be stored starting at the first address in that stack. As long as you get the general mechanics of it, it should be fine, though.
@huggyone7611
@huggyone7611 5 жыл бұрын
My dream was to have teachers like you ! LOL ! Thank you for this episode ;-)
@JWalterHawkes
@JWalterHawkes 5 жыл бұрын
Really clearly explained with great diagrams. I can tell a lot of time and effort went into this. Wonderful work. 👍👍
@weirdmindofesh
@weirdmindofesh 5 жыл бұрын
Assembly on the 6502 looks inviting compared to assembly for x86 which gets insane depending on which CPU you are using.
@gworfish
@gworfish 3 жыл бұрын
I feel silly now that I didn't learn this back when I was a kid and actually had a c128. Thanks so much for helping to get me caught up. However I think I'm going to need to watch that again. And maybe again. And...hmm, maybe I can just put it on a loop for a couple hours until it sinks in....
@videooblivion
@videooblivion 5 жыл бұрын
When I was learning 6502 ASM on my VIC-20 in the 80s, It took me a week to figure out indexed indirect/indirect indexed until -- BOOM -- it just clicked. Hey, BTW -- I love the music you pick for your videos!
@dantootill
@dantootill 5 жыл бұрын
Same here, although I have since forgotten what the difference is. Went back to an old cheat sheet that explains it in simple terms and struggled a bit to re-learn it, even though the author of that cheat sheet was me!
@NybblesandBytes
@NybblesandBytes 5 жыл бұрын
@dantootill @Joe Cassara the difference is the order in which the index register is added to the memory address before its looked up. I'm forgetting offhand which one is which, but the way you write it kinda explains it. Just think PEMDAS -- the parenthesis indicates which operation happens first.
@visionbegin
@visionbegin 5 жыл бұрын
Really nice introduction! Very enjoyable!
@XerShadowTail
@XerShadowTail 5 жыл бұрын
Really nice video! Hoping the best for your new series!
@goo3r
@goo3r 5 жыл бұрын
Really good video! Concise and clear.
@GeekaBoo
@GeekaBoo 5 жыл бұрын
Great first episode.. Looking forward to the next one! Keep it up!
@micheleporcu2287
@micheleporcu2287 5 жыл бұрын
Keep it up, this channel ROCKS !
@marcoverdesca2534
@marcoverdesca2534 5 жыл бұрын
this is the video (I probably should say the videos serie) i've been waiting for! great job!!!
@lucadrbiondi
@lucadrbiondi 5 жыл бұрын
Excellent work!
@RacerX-
@RacerX- 5 жыл бұрын
Nice vide. Easy to follow and very effective. I would love to see more of these. Keep up the good work.
@rga218
@rga218 5 жыл бұрын
Thank you for this video and for your other videos, all of which I am really enjoying and learning from.
@TRONMAGNUM2099
@TRONMAGNUM2099 5 жыл бұрын
Thank you so much, I already enjoyed your videos a ton. Now that I can understand them I'll like them even more!
@lasseodin
@lasseodin 5 жыл бұрын
Informative and excellent, as usal. Keep it up, June
@williammckeever4790
@williammckeever4790 5 жыл бұрын
Very well laid out tutorial but I can see a few people new to the 6502 family of processors probably scratching their heads at this point. Absolutely no fault of yours. That was a lot to cover in under 15 Min! I had the advantage of learning all this in the early 80's so it is very clear to me but it took a whole lot longer than 15 min back then! I'm sure as you progress with these tutorials things will start to click for everyone wanting to learn this. You make it easy with very clear descriptions and the visuals to go along with them. Great Beginning!
@leonardochiruzzi7642
@leonardochiruzzi7642 5 жыл бұрын
I hope that this series continues because i interesting it and i need it. Thanks and excellent as always.
@NybblesandBytes
@NybblesandBytes 5 жыл бұрын
Not planning on stopping with this! Much more to come. :D
@m.c.9008
@m.c.9008 4 жыл бұрын
Very Nice Videos about the great C128 !
@OTTB
@OTTB 5 жыл бұрын
Thank you clear and concise!!!
@CastToVoid
@CastToVoid 5 жыл бұрын
This is awesome!
@_Garm_
@_Garm_ 5 жыл бұрын
Great episode! thank you :D
@LeftoverBeefcake
@LeftoverBeefcake 5 жыл бұрын
I have a couple programmer's guides and reference manuals, and they don't make assembly half as clear as this video did. This is one bookmark I'll be referring to again and again. Thank you very much!
@tygrechingu2274
@tygrechingu2274 5 жыл бұрын
Thank you so much! I always wanted to learn assembly and this videa is a great intro.!
@m0nde
@m0nde 5 жыл бұрын
Fav'd, very well explained
@nicolaibrowinkel3473
@nicolaibrowinkel3473 9 ай бұрын
Very good explanations! thank you
@NybblesandBytes
@NybblesandBytes 9 ай бұрын
You're welcome!
@kraftwerk974
@kraftwerk974 4 жыл бұрын
6502 assembly is actually quite easy. The difficult part is to use it interfaced with other chips like the VIC or the SID. Once you understand how those work, then you're a champ.
@umutk5614
@umutk5614 5 жыл бұрын
Thank you for making this video, i didn't understand all but looking forward to the following videos.
@NybblesandBytes
@NybblesandBytes 5 жыл бұрын
What parts were unclear? I can help to address it in the next video, if you like.
@umutk5614
@umutk5614 5 жыл бұрын
@@NybblesandBytes I couldn't understand the stacking part 🙁
@NybblesandBytes
@NybblesandBytes 5 жыл бұрын
Umut K Thank you for the details! I'll see about revisiting that!
@umutk5614
@umutk5614 5 жыл бұрын
@@NybblesandBytes Thank you June, looking forward to it 🙂
@gofat
@gofat 5 жыл бұрын
I’m currently studying a diploma of software development. We don’t learn assembly language, but go through some of the concepts. I actually sort of understood what you were saying. Excellent video.
@NybblesandBytes
@NybblesandBytes 5 жыл бұрын
Gofat 70 Anything I can expand on that might help? The Discord server is great for discussing stuff. :D
@rkadowns
@rkadowns 8 ай бұрын
Thank you for this!
@NybblesandBytes
@NybblesandBytes 8 ай бұрын
Absolutely! Happy it was helpful. :D
@ShawnFarrell427
@ShawnFarrell427 4 жыл бұрын
great graphics in this video
@doktor6495
@doktor6495 5 жыл бұрын
Wooww, great!! So also me as a hardware guy can try to program software by that great explanation. See you, Doktor64!
@sundhaug92
@sundhaug92 5 жыл бұрын
"The BASICs of assembly language"
@elfenmagix8173
@elfenmagix8173 5 жыл бұрын
Great video. Just had a tiny mistake: when talking about Loading A from Zero Page, the text had LDA #$ instead of LDA $....
@NybblesandBytes
@NybblesandBytes 5 жыл бұрын
Yep. Cant edit the video to fix it, either. Fortunately there's much more detail to come.
@jefferystone1
@jefferystone1 4 жыл бұрын
Noticed that too - good catch Elfen
@FD-ze1xg
@FD-ze1xg 2 жыл бұрын
GREAT!!!
@kaapporaivio
@kaapporaivio 5 жыл бұрын
Nice video. Note that "assembler" is a program that translates "assembly" into machine code. It's like the difference between source code and compiler
@NybblesandBytes
@NybblesandBytes 5 жыл бұрын
@Kaappo Raivio I've heard the two used interchangably before when discussing it with other assembly language programmers. Guess it depends on your mindset. I have two "mental glyphs" for "assembler" and "assembler", just as I have two for "problem".
@kaapporaivio
@kaapporaivio 5 жыл бұрын
@@NybblesandBytes yeah, probably varies between circles. Small thing all in all, great video as I said!
@dantootill
@dantootill 5 жыл бұрын
Superbly presented, you've done an amazing job here. Will the next video be explaining the fundamentals of binary i.e. turning bits on and off, 8-bit vs. 16-bit integers and such? Many of the books I read years ago didn't cover this until so far into the book it rendered much of the preceding content meaningless in my opinion.
@NybblesandBytes
@NybblesandBytes 5 жыл бұрын
Once we get into the ALU instructions SBC and ADC and the logical bit shifting and testing operations, I'll cover this stuff in more detail. 2's and 1's compliment are tricky, but the exact mechanics of it aren't that necessary to know in practice.
@CharGorilla
@CharGorilla 3 жыл бұрын
Thanks for sharing your knowledge, you're a great teacher & instructor. I was never aware that the 8502 had memory indirect support. Do you know of a good C compiler, or macro assembler for the 8502 or the 6502, I'm sure they're out there. It's nice to see some tech nostalgia videos that differ from the more common videos about this era of computing, which usually focus on gaming rather than coding. Great Video.
@NybblesandBytes
@NybblesandBytes 3 жыл бұрын
Yes! Next video we're going to cover using Buddy (because I want to use an on device assembler), but just about any assembler built for the 6502 will work, as long as it produces PRGs. I recommend acme, buddy, and kickass.
@CharGorilla
@CharGorilla 3 жыл бұрын
@@NybblesandBytes Thanks for your reply. I really hope you continue this series... I've got an old C64 somewhere as well as some VHDL for the 8502 and others in the family made by MOS tech. I have a bit of a soft spot for MOS Technologies, and really wish that they had have been able to survive financially, and how their innovations and low cost / high performance strategy would have affected the tech sphere today. Especially with the advent of IoT, where we're I still use an 8051 to build low-cost sensors, relays and open collector arrays for this application.
@MiamiMillionaire
@MiamiMillionaire 5 жыл бұрын
👍
@ccronn
@ccronn 5 жыл бұрын
Hi June!
@AxelWerner
@AxelWerner 5 жыл бұрын
R u saying that byte 0 of the stack is never used? (FF)
@NybblesandBytes
@NybblesandBytes 5 жыл бұрын
No, that's actually an error in the animation -- I goofed up when drawing it out. =op
@drgusman
@drgusman 5 жыл бұрын
I'm very new to the Commodore world (Z80 and speccy was my childhood) and I got some C64C, will the explained here work on a C64C or it will only work on C128?
@NybblesandBytes
@NybblesandBytes 5 жыл бұрын
@geniwab Kinda. The 64 has a different memory map that you'll have to contend with, but aside from that, everything I'm discussing in the assembler basics video is applicable. What you don't have is a built-in monitor like the 128 does, so you'll have to find your own solution to that.
@drgusman
@drgusman 5 жыл бұрын
@@NybblesandBytes Thanks a lot for the info. About the monitor I already have the solution, as I had to repair these I have a cartridge with (besides diagnostic tools) a monitor with NMI button. So I think it's time to learn 6510/8502 assembler :D
@gower1973
@gower1973 5 жыл бұрын
You said you can’t do looping, but isn’t a JSR a type of looping, you can set up compare and branch instructions to jump to that subroutine however many times you need it which is in effect loop?
@NybblesandBytes
@NybblesandBytes 5 жыл бұрын
What I said was the language doesn't provide a looping construct like for, do, while, etc. I didn't say you couldn't loop -- just that you have to build a loop out of components like what you describe.
@fsphil
@fsphil 5 жыл бұрын
Is that a 16-bit immediate value at 9:35 ? ;-)
@NybblesandBytes
@NybblesandBytes 5 жыл бұрын
Hah! Nice catch! Yeah, I goofed up there. The # shouldnt be there at all.
@tworkman43
@tworkman43 5 жыл бұрын
the 8502 is a 6502 with doubled clock rate?
@NybblesandBytes
@NybblesandBytes 5 жыл бұрын
The 8502 is a 6502 with a different pinout and higher max clock rate, yes.
@furroy
@furroy 5 жыл бұрын
around 9:38 you show LDA #$AB when i think you meant LDA $AB ?
@NybblesandBytes
@NybblesandBytes 5 жыл бұрын
@furroy2 Yep. Oops. Need to add that to the errata.
@Storin_of_Kel
@Storin_of_Kel 4 жыл бұрын
Seriously? All these views, all these comments and still people are too lazy to like a video?
@NybblesandBytes
@NybblesandBytes 4 жыл бұрын
@Storin t'Kel I turn the visibility of likes/dislikes counters off.
@---Ben---
@---Ben--- 5 ай бұрын
This might be a dumb question but why is the stored program counter on the stack "13"? Shouldn't it be 1302? How does it know to go back to 1302?
@NybblesandBytes
@NybblesandBytes 5 ай бұрын
It actually pushes both the high and the low byte to the stack, but the PLA (almost-microcode) in the 6502 die includes behavior to increment the PC. Hopefully that answers your question?
@---Ben---
@---Ben--- 5 ай бұрын
@@NybblesandBytes I'm really out of my depth here: But in the video I see the number 13 and then the hex address of where it is on the stack. Is that a shorthand?
@adam1984pl
@adam1984pl 5 жыл бұрын
Is this different to Z80 assembler?
@NybblesandBytes
@NybblesandBytes 5 жыл бұрын
The terminology is the same, but the architecture is different.
@NybblesandBytes
@NybblesandBytes 5 жыл бұрын
The Z80 has four general purpose registers, a whole bunch of shadow registers, and a different memory model. It's an awesome chip, but not quite as simple as an 8502.
@X360HotSwap
@X360HotSwap 5 жыл бұрын
I got into modding the xbox 360 last year and I wish I learned this a long time ago
@lucaolivier2755
@lucaolivier2755 5 жыл бұрын
😂😂😂Yes God🤣🤣
@Wizardofgosz
@Wizardofgosz 4 жыл бұрын
What happened to the C128 series?
@NybblesandBytes
@NybblesandBytes 4 жыл бұрын
This is still the 128 series. Have to cover the basics first.
@Wizardofgosz
@Wizardofgosz 4 жыл бұрын
@@NybblesandBytes But... but... but... the name...
@NybblesandBytes
@NybblesandBytes 4 жыл бұрын
Richard Wielgosz Don't worry -- N&MB is an *additional* series to the main N&B series will be making a comeback.
@ShawnFarrell427
@ShawnFarrell427 4 жыл бұрын
you look great in this one...off topic again... :(
@NybblesandBytes
@NybblesandBytes 4 жыл бұрын
Thanks, but yeah, offtopic. :D
@15743_Hertz
@15743_Hertz 5 жыл бұрын
7:11 A9 is the hex code for LDA #$nn and A2 is the hex code for LDX #$nn. Good tutorial otherwise though!
@NybblesandBytes
@NybblesandBytes 5 жыл бұрын
Oops! Nice catch. :D
@15743_Hertz
@15743_Hertz 5 жыл бұрын
@@NybblesandBytes Yeah, it seems a bit nit-picky, but you have to be with machine language. My first 6502 programs were written in longhand, computing all the backward and forward branches and converting it to decimal for DATA and POKE statements in BASIC.
@NybblesandBytes
@NybblesandBytes 5 жыл бұрын
@@15743_Hertz Not really nit-picky -- it's a definite bug in the video! I never had that experience so the raw opcodes are all just numbers to me. I'm kinda skipping past it since I'm using the MONITOR, but it's still good to be correct. :D
@15743_Hertz
@15743_Hertz 5 жыл бұрын
@@NybblesandBytes Okay. Best of luck with the rest of the series! I'll be watching for them in the future.
@XtreeM_FaiL
@XtreeM_FaiL 4 жыл бұрын
"Simple human readable language" I've heard that before. Still a lie.
@NybblesandBytes
@NybblesandBytes 4 жыл бұрын
Better than machine code!
@csbruce
@csbruce 5 жыл бұрын
0:47 Technically, all compilers are for languages that just convert to numbers. Moreover, everything inside a computer is just numbers. 0:59 The most "bare metal" language would probably be using raw hexadecimal in a machine-language monitor. Using mnemonics in a monitor would be a abstraction above that, and using an assembler is another abstraction above that. Maybe you're using "Assembly" and "Machine Language" interchangeably, but the terms have distinct meanings. 1:07 All compilers turn human-readable language into machine-executable code. The distinction of Assembly from other Compilers is that the Assembly represents the machine-language instructions in a one-to-one fashion. 1:35 The 8502 instructions only take a maximum of one operand. 1:49 Operands can't really be registers. Instructions like "LSR A" really are just syntactic sugar for the Implied addressing mode. 7:32 I was unaware that the 8502 produces smoke with every register-value change. Odd that it doesn't have an exhaust pipe! 8:05 Presumably, the «BNE $1300» is meant to be «BNE $1304» to allow the loop to do something useful and to ever finish. 8:35 The oVerflow flag is used to detect arithmetic overflows of signed values in the 7th bit. The Carry flag detects overflows in the 8th bit. 9:33 The '#' refers to the Immediate addressing mode rather than Absolute or Zero-Page. 9:43 It's not really that tricky to use Zero Page in your own machine-language program. If your program will exit back to BASIC, you can save all of the zero-page locations that are used only by BASIC, on entry, to some temporary storage space, copy them back on exit, and use them freely inside your program. On the C64, locations $02 to $8F can be handled in this way. It looks like the same is true of the C128. You might be able to snag some additional locations depending on how much your program will make use of the Kernal. 10:54 The stack is also manipulated with the TSX and TXS instructions.
@NybblesandBytes
@NybblesandBytes 5 жыл бұрын
@Brutikus Red @Brutikus Red I can't really respond to all of this in a KZbin comment. If you'd like to bring these up with me, I'd be happy to discuss this better in a Discord chat or some other forum somewhere. Or better yet: if you want to help me get this correct in the future, please sign up as a Patron and you'll be able to proof the videos before they go public -- you obviously care about this topic quite a bit, and I'd love to get your input before these hit public view. :D The comment field for KZbin is particularly broken with the way it formats the fields nowadays, so individually responding to every point you raise in these comments is becoming difficult. I will address a couple of these, though: You are right, compilers also convert programming languages to machine language. What I'm saying in the intro isn't a statement to be taken in exclusion to the set of all programming languages, or to how CPUs work. It's assumed that I'm talking about assembly here, and depending on where you draw the line for "language", ML isn't technically a language at all -- it's a raw set of bits that toggles on and off specific complexes in the CPU to perform various operations. It's about as much of a "language" as ENIAC's "reprogramming" was where they completely reconfigured the system wire by wire using a diagnostic cart for every "program". If we're being perfectly correct regarding compilers, the frontend of a compiler does the initial parsing and conversion into the AST and IL, and the backend does the conversion to ML. Ultimately it is the code generator in the backend that converts IL to ML, and in many compilers that's a straight up assembler (I'm looking at you GCC -- LLVM does its own weird thing with tblgen and friends). What I'm saying here isn't entirely inaccurate, and for most beginners, this should suffice. As for the MONITOR being an abstraction, it is an assembler: it converts mnemonic instructions into ML with the A operation exactly the same way any other assembler does. It's just missing a bunch of features we usually associate with assemblers like file reading, symbols, macros, and memory block allocations. I also have a few bugs in the video that need to be fixed. I realized that after I posted the video. Unfortunately, YT videos are immutable once uploaded, so I can't update or fix them, sadly. I'll have to address these in a later video, I think. Thanks for keeping me honest, though! I do appreciate your comments.
@NybblesandBytes
@NybblesandBytes 5 жыл бұрын
@Brutikus Red Excellent point about the oVerflow flag -- I wasn't quite sure how to keep it simple. Your statement is much more accurate and understandable. I'll likely get into much more detail when we get to ADC and SBC in the later videos.
@NybblesandBytes
@NybblesandBytes 5 жыл бұрын
@Brutikus Red Also the thing I mean by "tricky" is literally that you have to save zero page addresses to another location and then restore them on returning to BASIC. That's not easy from a MONITOR, and it does take explicit setup in an assembler.
@NybblesandBytes
@NybblesandBytes 5 жыл бұрын
@Brutikus Red One last point: yes, you are technically correct that 8502 opcodes only take one operand. However, when you consider that absolute addresses are composed of two bytes, it depends on where you draw the line for the operand grouping: is an operand one byte, or two? Internally to the CPU, it involves a separate fetch for each byte, and each go into a separate internal register. Yes, registers aren't technically operands, either, and are part of the opcode, but from the perspective of assembler mnemonics, they are because they aren't part of the mnemonic.
@csbruce
@csbruce 5 жыл бұрын
@@NybblesandBytes: «sign up as a Patron» Worth considering. «depending on where you draw the line for "language", ML isn't technically a language at all» I would draw the line at a Formal Language, which is a sequence of symbols with constraints on the sequencing, which is an extremely broad concept. You could consider the "symbols" to be byte values. A general-purpose "programming language" would be a Formal Language that is Turing-Complete. So, raw machine code qualifies as a programming language. You can program in it more-or-less directly with a hexadecimal memory editor, or with POKE statements from BASIC. I'm reminded of xkcd.com/378/ . There are numerous programs written in machine code in the C128's ROMs. «reconfigured the system wire by wire using a diagnostic cart for every "program".» I'd have to know more about exactly how ENIAC's programs are represented to be sure that it ISN'T a programming language. Though in a practical sense, if you can represent a "program" in a removable plug-in module, then the "program" in that module must be represented in some kind of a "programming language". Is the microcode ROM inside the 8502 a "programming language"? Possibly. «As for the MONITOR being an abstraction, it is an assembler» Of sorts. I would call the 'A' command a one-line raw-value assembler. You could enter your machine-language programs with the MONITOR's hexadecimal memory editor as well, though that reduction of abstraction is painful. And so, too, is the loss of abstraction between a one-line assembler and what most people would call "Assembly Language": a text(ish)-file representation of machine language that uses labels and constants instead of raw addresses and values. This abstraction makes the code much more maintainable. «when you consider that absolute addresses are composed of two bytes» I would consider that to be one 16-bit operand instead of two 8-bit operands. It's used as a single coherent value and is represented in Assembly Language on the Address Bus as one 16-bit value.
@rivards1
@rivards1 5 жыл бұрын
do you keep saying 8502 when you mean 6502? Also, you need to slow it down. This is close to incomprehensible
@NybblesandBytes
@NybblesandBytes 5 жыл бұрын
The 6502 and the 8502 use the same instruction set, so their names are interchangeable. Only the pinouts and packaging are different.
@NybblesandBytes
@NybblesandBytes 5 жыл бұрын
And no, I mean 8502 -- the CPU we use on my channel is the one in the Commodore 128D, which is an 8502.
Nybbles and MouseBytes: Ep2: Memory to Register Transfer Instructions
15:07
Nybbles and Bytes
Рет қаралды 4,7 М.
Nybbles and MouseBytes: Ep5: Bit Shifting and Logic Instructions
16:23
Nybbles and Bytes
Рет қаралды 3,5 М.
Please be kind🙏
00:34
ISSEI / いっせい
Рет қаралды 191 МЛН
OMG🤪 #tiktok #shorts #potapova_blog
00:50
Potapova_blog
Рет қаралды 18 МЛН
ROCK PAPER SCISSOR! (55 MLN SUBS!) feat @PANDAGIRLOFFICIAL #shorts
00:31
Nybbles and MouseBytes: Ep6: Jump and Subroutine Instructions
11:31
Nybbles and Bytes
Рет қаралды 4,1 М.
Commodore 128D: Episode 10:  Smooth Scrolling Businesscard Shenanigans
9:38
Compilers, How They Work, And Writing Them From Scratch
23:53
Adam McDaniel
Рет қаралды 83 М.
27c3: Reverse Engineering the MOS 6502 CPU (en)
51:57
Christiaan008
Рет қаралды 433 М.
“Hello, world” from scratch on a 6502 - Part 1
27:25
Ben Eater
Рет қаралды 4,7 МЛН
How Machine Language Works
19:48
The 8-Bit Guy
Рет қаралды 942 М.
Commodore 64 Part 2: Intro to 6502 Machine Language
17:44
The [Fill in the Blank] Programmer
Рет қаралды 34 М.
N&B Live at VCFSW 2023
27:19
Nybbles and Bytes
Рет қаралды 10 М.
Secret Wireless charger 😱 #shorts
0:28
Mr DegrEE
Рет қаралды 2,5 МЛН
Simple maintenance. #leddisplay #ledscreen #ledwall #ledmodule #ledinstallation
0:19
LED Screen Factory-EagerLED
Рет қаралды 17 МЛН
cute mini iphone
0:34
승비니 Seungbini
Рет қаралды 6 МЛН
1$ vs 500$ ВИРТУАЛЬНАЯ РЕАЛЬНОСТЬ !
23:20
GoldenBurst
Рет қаралды 1,5 МЛН
GamePad İle Bisiklet Yönetmek #shorts
0:26
Osman Kabadayı
Рет қаралды 337 М.