I’m slowly adding pages to this site, working on a BASIC primer. I’ve got some Z80 Spectrum code that I’ve been fiddling with for the last week or so that illustrates the following:
- How the screen memory is arranged on the Spectrum, and why it makes sense.
- How to read the keyboard directly using ports.
- How to use the stack operands (PUSH and POP) to copy memory quicker than LDIR.
- How to set up an Interrupt (IM 2) to run a routine on the vertical blank.
I’m in the process of commenting this and will be adding this to the site shortly. The plan is to blog the development of a simple game from beginning to end in Z80 Assembly Language for the Spectrum.
Why am I doing this? Well, partly because my generation will probably be the last that will have had to do this; the advent of C++ and fast microprocessors has more or less consigned low level programming to the history books.
I say more or less… There is still a requirement for low level programming and valuable lessons can be learned from developing an application to run in a memory footprint that is smaller than this blog post.