3 ms·
> I think it was a lot more common for 8bit systems to allow for 16 bit addressing though. The 6502 and Z80 could use 16 bit addressing to access up to 64kb of
by andyjohnson0 4mo ago
> I think it was a lot more common for 8bit systems to allow for 16 bit addressing though.
The 6502 and Z80 could use 16 bit addressing to access up to 64kb of memory. The 6502 had various other addressing systems, including iirc 8 bits, but none of them were wider tha 16 bits.
- JdeBP 4mo agoPsst! Let's blow their minds and tell them about the MC68008. (-:
- hnlmorg 4mo agoOh yeah. I had loads of 6502 and Z80 systems (still do in fact). Can’t believe I forgot about that! Though in fairness, I do mostly now just use those systems to teach my kids BASIC
- markus_zhang 4mo agoJust curious how do you teach kids BASIC. I’m sure my 6 year old won’t sit tight.
- hnlmorg 4mo agoI usually start with game: guess the number. The computer generates a random number between 1 and 100. And you have to guess. When you’re too high, the computer says “too high” and likewise when you’re too low. It’s a great starter program because it teaches you strings (the output printed), integers, comparisons, conditionals, and iteration (you keep guessing until you get it right). And the whole thing only take around 20 lines (give or take). Then the kids plays a few games of that. And after the novelty of that game wears off, I tell them to customise it however they want. Eg different messages, different ranges to guess from, etc. It’s the same way I teach Python to primary school / kindergarten kids. The nice things about this is even if the kids don’t learn and remember the basic primitives, they still get a feel of “proper” coding in the same way that we did when we grew up. And they still get something they can play, even if the game itself is super basic (no pun intended). I’m not saying this will work with every child, though. All kids are different. But it’s been super successful both at home and in the schools I’ve helped out at.
- markus_zhang 4mo agoThanks! This is a good idea. I was thinking about typing games and such because he needs to learn words before doing anything useful, but guessing games are definitely fun, too. I can definitely write simple games using QBASIC (was preparing a Dospian on Rpi 4 as his 6 years old birthday gift). Do you have any blog, or any recommendation of books to read for such topics? Maybe I can find some "Programming for kids" book back from the 90s. I find teaching kids in general very hard, much harder than teaching myself because kids don't have the cognitive capacity as an adult.
- vunderba 4mo agoMy parents got me this QBASIC book when I was in elementary school and I remember it being pretty accessible even for very young readers. https://www.abebooks.com/Absolute-Beginners-Guide-Qbasic-Perry-Greg/32365693594/bd https://www.abebooks.com/Absolute-Beginners-Guide-Qbasic-Per... Also the Usborne series are classics and a lot of them have been made freely available: https://usborne.com/us/books/computer-and-coding-books https://usborne.com/us/books/computer-and-coding-books
- markus_zhang 4mo agoThank you! That's an expensive book. And looks like all QBASIC books are like that because they were rare to find anyway. Maybe I'll just leverage my programming experience and build something using online tutorials and a Dosbian box.
- vunderba 4mo agoHaha yeah that's a pretty stupid price. You can get it on eBay for $12 but you'd better bid fast because I'm sure it's going to be a very competitive auction. :) https://ebay.io/m/zzT1Xf https://ebay.io/m/zzT1Xf
- hnlmorg 4mo agoTo be honest I just picked moments when the kids were bored and wanted daddy time but weren’t buzzing around the house with excess energy to burn. It wasn’t something I specifically planned in advance for. Which meant though whole experience was less like homework for them. As I’m sure you know, sometimes kids just want to experience the stuff their parents do. And when they’re in that kind of mood it’s a lot easier to sit that at a computer than it would be normally.
- zabzonk 4mo agoWell, most of the addressing modes of the Z80 used a 16-bit register pair (i.e. 0 to 64K-1 bytes) to address, the 6502 used a somewhat stranger set of addressing modes, but once again you could address 0 to 64K-1 bytes.
- skissane 4mo ago> The 6502 and Z80 could use 16 bit addressing to access up to 64kb of memory. The 6502 had various other addressing systems, including iirc 8 bits, but none of them were wider tha 16 bits. Many 6502 and Z80 systems used bank switching to support more than 64KB of memory. That way you could have 128KB or more physical RAM in a machine with an only 16-bit address bus. MP/M–the multitasking/multiuser version of CP/M–had support for this as a standard feature, since it was hard to fit multiple processes/users into only 64KB; it was ported to the single-user/single-tasking version in CP/M 3.0 Essentially, this was doing virtual memory, not inside the CPU, but in one or more external chips. Actually, back in the 70s and 80s, it wasn't uncommon for a memory management unit (MMU) to be a separate chip (or even PCB) rather than an integrated part of the CPU–for many systems it was an optional add-on if you needed more memory, or wanted to run more advanced operating systems.