6502 Assembly Language

I remember, in 1986, writing a paint program for the C64 in BASIC for my GCE ‘O’ Level Computer Studies. I inserted a line of assembly language to clear the screen when you wanted to delete the screen contents. This would basically write zeros into all the memory locations of the screen buffer much quicker than basic would.

The line of code was actually pure machine code as from what I can remember the C64 BASIC could not parse assembler code. So I had to write my assembler code in a compiler and then write the hex code down and write it into the BASIC program.

6502 Assembly language was actually fairly simple compared to x86 assembler code. Also the 8-bit machines were small enough that you could actually write software in assembly language without going mad. Remember, this machine had a total of 64 kilobytes of ram. In comparison, a modern empty work document would probably have double that if not more. Modern machines are so vast and varied in their architecture that assembly language is only really used now for specialist hardware such as graphics cards or embedded electronics.

There is something fascinating about assembly language and especially the tools used to edit assembler code. These tools allow you to see directly into the CPU and understand the actual processes taking place inside the machine. With modern computers there are a lot of layers of abstraction which obscure what is happening at the CPU level.

Another one of my todo lists is do some old skool C64 programming if I ever get the chance. Incidentally, if you are wondering about the header graphic it is a frame from the Terminator featuring 6502 Assembler code from an Apple II. The T1000 apparently ran on an 8-bit CPU from the future :D.