Page 1 of 1

First Steps in Z80 Assembly Language Darryl Sloan

Posted: Fri Oct 16, 2020 12:39 pm
by PeterJ
Some of you may have watched the YouTube series from Darryl on getting started with z80 machine code by building a connect4 game. Anyway, he has released a getting started PDF guide which is available here:

http://ped.7gods.org/z80.pdf

The original video series is here:

https://www.youtube.com/watch?v=1gHlMpO8gqw

https://www.youtube.com/watch?v=O2gw36OyX3g

https://www.youtube.com/watch?v=PEQuCtGUe-c

https://www.youtube.com/watch?v=uWqdk-1_NIg

Re: First Steps in Z80 Assembly Language Darryl Sloan

Posted: Fri Oct 16, 2020 5:12 pm
by TMD2003
This may be worth an entire warehouse full of corned beef sandwiches. I will investigate!

Re: First Steps in Z80 Assembly Language Darryl Sloan

Posted: Sun Oct 18, 2020 11:36 am
by PeterJ
I've read through the guide from Darryl and for any of our members who need a precursor to the Johnathan Cauldwell book it's thoroughly recommended.

Re: First Steps in Z80 Assembly Language Darryl Sloan

Posted: Wed Sep 21, 2022 6:13 pm
by PeterJ
If you are working your way through the above book, I have noticed a couple of typos. I have let Darryl know, so hopefully he will update the PDF.

The first one is in section eight:

Image

Should read 'you can’t add numbers directly, e.g. ADD HL, 1000 is not permissible'

Edited by PJ - 22/05/2023

Re: First Steps in Z80 Assembly Language Darryl Sloan

Posted: Fri Oct 07, 2022 12:35 pm
by PeterJ
Whilst on holiday I found the other two little bugs in the text that I forgot to make a note of when I first found them.

In Chapter 4 (Jumps and Loops), the text should read 'B starts off as 16 on the first pass'

Image

Also in the same chapter, the text describing the stack is incorrect. It should read 'as long as you pop the data back in to reverse order you pushed'

Image

Don't let these little bugs put you off, it's still a fantastic read and prepared me for the JC book.

Re: First Steps in Z80 Assembly Language Darryl Sloan

Posted: Fri Oct 07, 2022 7:24 pm
by Bedazzle
PeterJ wrote: Fri Oct 16, 2020 12:39 pm Some of you may have watched the YouTube series from Darryl on getting started with z80 machine code by building a connect4 game. Anyway, he has released a getting started PDF guide
Wow, quite long!

And... This is two-byte! Of course. one byte is command while second is data...

Re: First Steps in Z80 Assembly Language Darryl Sloan

Posted: Fri Oct 07, 2022 7:58 pm
by stupidget
Do you need to know anything about coding before reading or is it ok for absolute novices?

Re: First Steps in Z80 Assembly Language Darryl Sloan

Posted: Fri Oct 07, 2022 8:00 pm
by PeterJ
@Bedazzle, it's explained quite well in the paragraph following the example:.
Note that we don’t have separate machine code numbers for “LD”, “A”, and the comma. The
entire instruction LD A, n is a single machine code number (62), known as an opcode. Whatever
we decide to put in n is known as the operand. Z80 instructions are powerful but simple in structure,
designed to take up as little memory as possible. They either consist of a single opcode, or a single
opcode followed by a single operand.

Re: First Steps in Z80 Assembly Language Darryl Sloan

Posted: Fri Oct 07, 2022 8:00 pm
by PeterJ
stupidget wrote: Fri Oct 07, 2022 7:58 pm Do you need to know anything about coding before reading or is it ok for absolute novices?
Complete beginners.

Re: First Steps in Z80 Assembly Language Darryl Sloan

Posted: Fri Oct 07, 2022 10:54 pm
by Stefan
To add some flavour to an opcode is one byte, see https://8bitnotes.com/2017/05/ld-instructions/ which shows how the ld opcode is built up from logical bit patterns.