|
I had the later 6510 to start with... Which is different but not on the instruction level...
"If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization." ― Gerald Weinberg
|
|
|
|
|
Commodore 64 here. Still have the Programmer's Reference Guide. I was too poor to afford the ASM cartridge, so I did all the assembly/ml programming via poke statements in Commodore Basic.
Good times. I still have a large love for ASM.
-Sean
----
Fire Nuts
|
|
|
|
|
His channel is awesome. Since the NES used the 6502 chip too, this channel covers some 6502 ASM as it pertains to NES development, as well.
Jeremy Falcon
|
|
|
|
|
Yeah, definitely. He has an amazing set of skills that I think are actually quite difficult to obtain.
and, his videos are really informative and entertaining and well edited too.
|
|
|
|
|
Happy days... I was already using Cobol, Fortran and Basic then (1979/80) but bought myself a UK101 kit, which used the 6502. Frustrated by the slowness of Basic, I bought myself a "Learn 6502 assembler" book and dived in. The UK101 ROM included a very simple "monitor" which allowed you to type in machine instructions address-by-address, and display blocks of memory in hex. However you could also call assembler code from Basic, so when experimenting with 6502 the trick was to write a "loader" in Basic and then you could simply save and load your code to/from cassette tape.
I lived 5 doors away from a fledgling home computer shop (it was just his front room initially, he later moved and it became a pretty well-known source for computer stuff in the UK in the 80s). But it meant I had a ready (and cheap) supply of hardware, so plenty of extensions on the UK101 - doubling CPU speed, quadrupling cassette i/o, doubling screen resolution, doubling memory... and later adding a soundcard.
|
|
|
|
|
I remember something like 'Commodore VC 64' which had a variant of that cpu
|
|
|
|
|
Finally got a minute to watch through the video. Side note, the trick about using the bit shifts to multiply and divide by two, is also why older video cards wanted texture dimensions to be in powers of two. So much in fact, they had their own acronym for it: POT. On older cards, using non-POT textures would slow things dddooooooooowwwwwnnnn.
Jeremy Falcon
|
|
|
|
|
6502 was (Still is) one of my favourite ever CPU's, in fact I have such a deep love for it that I have modelled various elements of it using "Digital" the successor to "Logisim" written by H.Neehman and available on Github.
GitHub - hneemann/Digital: A digital logic designer and circuit simulator.
My First CPU was actually a Z80 back in around 1979, but I rapidly got bored with that, and within a couple of years had moved on to the Acorn Electron, then eventually the BBC Micro Model B (I'm in the UK btw)
I loved the 6502, it was a joy to program. Memory Mapped I/O was the way to go, none of this taking control of the bus nonsense that the Z80 had, it was what would be classed now as a RISC processor, unlike the 6809 which had a register and instruction for every purpose.
The 6502 was light enough that you didn't get overwhelmed, but powerful enough that it could do some fantastic tricks.
Many of my friends followed the route of just using computers to pay games, so they went the Z80 route and stayed with the Sinclair computers, many of them eventually moving on to the 16 bit 68000 CPU's via the Atari ST and Amiga 500 platforms.
Myself I stayed with the 6502 on a physical machine right up to the early 90's, and even though I had a PC by that point in time, and had been doing some work with them due to college/uni etc I never forgot my BBC Model B micro.
Eventually I managed to afford an Acorn Archimedes A5000 with it's 25Mhz ARM3 CPU, a CPU which I felt was the true spiritual successor to the 6502, it had a very similar programming model, just the right number of registers and functionality, and the combined instruction layout (IE: being able to branch and loop without using separate branch & loop instructions) just felt right.
People worship the ARM CPU Architecture today, it's everywhere and inside everything, it would never have happened if it wasn't for the 6502.
Consider too, that the 6502 is an old 8-bit CPU that is still manufactured today. The western design corp, still manufactures brand new 6502 silicon, that can clock up to 32Mhz (Faster than my original ARM3 successor to it) and hobbyists are STILL making their own NEW home computers.
If you look on places like PCB Way and JLC you can find NEW board designs enabling you to build a modern BBC Model B micro, and all of the silicon and parts required to do so are still available should you wish to do so.
Myself, over the years I've released a lot of my old 6502 machine code on places like "*. forums" and Github, I'm also still credited as one of the very few people who actually made the BBC Micro (and it's 6502) produce a rolling multi part tech demo.
BBC Model B Dreamscape Demo (Colour Version) - YouTube
Something that many folks didn't see until the Amiga & Atari ST computers finally hit the scene with their 16 bit's CPU's
6502 will ALWAYS, ALWAYS have a place in my heart, and is a large part responsible for the developer/technologist that I am today.
|
|
|
|
|
Really great and interesting story. I watched the video. Very nice / amazing demo.
Thanks for sharing.
|
|
|
|
|
My name's in the credits of Kermit (file transfer program) for the BBC Micro, which was one of 2 programs I worked on in 6502 assembler.
The other was an enhanced terminal emulator running on the BBC micro which mostly worked as a VT52 clone but had enhancement to display graphics.
|
|
|
|
|
Z80 for me, please.
"In testa che avete, Signor di Ceprano?"
-- Rigoletto
|
|
|
|
|
I always hated that thing. It powered my Apple IIC and when I tried to code for it, I never found a CALL instruction. Being an Intel/Zilog guy, the JSR/RTS pair never clicked - Duh! The design placed video memory smack in the middle of the 64k RAM space, and I never could figure out how to get around that and back again. I dumped that machine and bought a real computer - an Epson QX-16 with 256k RAM!
Will Rogers never met me.
|
|
|
|
|
I never really learnt the 6502 when it was current, which is a shame. My school bought a nascom 1 in 1978 and I learnt Z80 on that, having dabbled in 8080 on a friend's ETI Triton. I still have a bit of an interest in looking at 6502, having helped a different friend years later with some 6809 code.
|
|
|
|
|
No 6502 for me. But I do have a book which covers it as well as a few others from that era. Saved from being scrapped.
|
|
|
|
|
For reasons I have to hand implement a parser for JSON numbers that can operate over a stream parsing part of the number with each fetch. It's kind of difficult, so I fired up my Visual FA C# project and fed it this code
var number = FA.Parse(@"(0|-?([1-9][0-9]*))((\.[0-9]+[Ee]\-?[1-9][0-9]*)?|\.[0-9]+)");
var dgo = new FADotGraphOptions();
dgo.HideAcceptSymbolIds = true;
number = number.ToMinimizedDfa();
number.RenderToFile(@"..\..\..\number.jpg",dgo);
which gave me this which I can use to guide my hand rolled implementation:
DFA state diagram[^]
Bam! Now it makes it easy to write what is pretty complicated code by following this graph.
The code that I need to write to be clear, must be able to parse a very long number. For example 3.14159265358979462643 and parse it using say, 8 bytes of memory for the capture, so it can parse 8 characters at a time. Real world those figures would be larger, but the principle is the same.
If you have an easier way, put it in the replies. I'd love to hear them, honestly. Otherwise I'm sticking with my regex solution because I can't think of a more direct route from A to B.
Edit: Aaand my regex was wrong (not quite JSON spec) so I since fixed it but haven't updated this post to reflect the changes. Still, it was easy to change.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
modified 27-Mar-24 7:45am.
|
|
|
|
|
I'm with you - I use regex a lot if I can...
"If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization." ― Gerald Weinberg
|
|
|
|
|
Is indeed astounding about the brain which first conceived the regex. And the first coder who implemented it.
Ordinary users like me make mistakes in formulating regular expressions; just imagine how rock solid must be the code which does the parsing.
|
|
|
|
|
Parsing it is a lot easier than it seems. The thing about a regular language is it's very ... regular. The code is predictable to write, which makes things much smoother.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
|
I find their railway diagram to be much harder to follow than my state diagram.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
Ha! That's proof positive that you didn't play enough with model trains when you were little.
Mircea
|
|
|
|
|
I hate regexp.
Mostly because I only have a need for it once every decade and I forget about it.
CI/CD = Continuous Impediment/Continuous Despair
|
|
|
|
|
I like your Visual FA project.
You don't want to allow -0.xxx ?
|
|
|
|
|
That regex is in error, and I've since updated it, but not the post.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
I only hate it because I can't understand it. I have yet to find the tutorial that explains it in a way I can understand it.
There are no solutions, only trade-offs. - Thomas Sowell
A day can really slip by when you're deliberately avoiding what you're supposed to do. - Calvin (Bill Watterson, Calvin & Hobbes)
|
|
|
|