Assembly language vs. machine code — 6502 part 3
The next video in the 6502 series is here!
In this video, I use an assembler (vasm) to write programs in assembly language rather than manually writing out the hex opcodes for each instruction. I also cover some of the other benefits of using assembly language and demonstrate writing a program.
I plan to release this video in a day or so. As always I really appreciate any feedback or catching any errors that I can incorporate before the final release. And as always, thanks for supporting these videos!
-Ben
Comments (11)
Great work Ben, ASM was common when I grew up in the 80s, but nobody near me could show me around how it worked. All your videos combined make clear how this magic works.
Awesome video as always!
Ben, superb, couldnt wait to see this one..... hacking a retro assembler into my VS Code workspace now... It was good to see the final rotating LED's, any chance you can wet our appetite for whats next in this project at the end fo the Video? (Unless of course you havent got that far yet, in which case, ignore me :-))
If you're doing any sort of 6502 work, check out Retro Assembler. Really simple Visual Studio Code integration. I've been using it for Apple 2 programming, but it's all setup for easy S/NES, C64, etc. (https://enginedesigns.net/retroassembler/)
I was just about to go down the route of getting Sublime support but this looks much better.
Has anyone tried the new instructions that the Western Digital 6502s have? (Break Always, Stop... etc) The assembler that i've been using ( http://www.6502asm.com/beta/index.html ) does not.
I think I have a problem... I'm addicted to Eatering :-/ ...these vids can't come out often enough for me :-) The only improvement that occurs to me is to perhaps generalize the idea of symbolic constants (EQUates) from just labels. Keep up the great work, Ben!
Ben, perhaps I did not pay attention but it was for me not too clear that the ROM was located at $8000. So when at the end the .org $8000 came by at the top I was a bit puzzled for 5 minutes.
This was presented in part 2 around the 3min mark. And then again around the 26min mark when the IO was wired up into the lower half of memory.
Assuming there is gcc toolchain support for 6502, it would be easy enough to create a linker script, setup the stack, and jump into C. It's definitely the route for getting libc and friends up and running. Dare I say, maybe even a modified version of some rtos or Linux?!?! lol .. the sky is the limit now.
That is what I had thought, but I could not find 6502 support for gcc (quite unexpected) there does not seem to be any real c compilers for 6502...that I could find
