source code
Yes it's true, I really did write Ant Attack without an assembler - and here's the proof! AA consists of a few hundred (I guess - not all have survived) handwritten A4 sheets. This one is the code that paralyses an ant when you jump on it. I have added the stuff in blue to give an idea what's going on. Skip the next bit if you already know about 'puters! The centre column holds the meat of the program, the assembly language mnemonics, which are simply shortened names for the assembly language instructions. LDA for instance stands for "Load Accumulator". For each mnemonic there is an associated (machine) code written into the left-most column. This list of numbers are the actual instructions that drive the Z80, and they are represented here in hexadecimal notation (numbers to the base 16), though the Z80 will see them eventually as binary, lots of 0s and 1s. I could have used a text editor and a program called an assembler to do this - had never heard of 'em though! ;)

hexadecimal
decimal
binary
0
0
0000
1
1
0001
2
2
0010
etc...
8
8
1000
9
9
1001
A
10
1010
B
11
1011
C
12
1100
D
13
1101
E
14
1110
F
15
1111
CD028E
13435534
110011010000001010001110
Each hex digit represents exactly 4 binary bits - nice and easy to think about compared to the equivalent decimal, and takes up less space on the page than the equivalent binary.

Click "back" to return to where you came from...

You can play Ant Attack on the Ant Attack page!
 an Ant Attack homepage

sandywhite.co.uk
Copyright © Sandy White 2000