MENU

Fun & Interesting

#25: Z80 Assembly Language Tutorial (ZX Spectrum Game)

Spriteworx 12,040 3 years ago
Video Not Working? Fix It Now

The Z80 Assembly Language instructions of a Sinclair ZX Spectrum car racing game are examined in detail. We also explore the ZX Spectrum Display and Screen Attributes as well as learn how to use Assembly Language to read input from the keyboard and pass a value from Machine Code to BASIC. It's a wild ride so strap in and hang on! LINKS: Game Listing: https://chuntey.wordpress.com/2010/01/12/tutorial-zx-spectrum-machine-code-game-30-minutes/ Z80 Instructions: http://z80-heaven.wikidot.com/instructions-set Keyboard port numbers: http://www.breakintoprogram.co.uk/computers/zx-spectrum/keyboard Facebook Page (public): https://www.facebook.com/gaming/Spriteworx Patreon: https://patreon.com/Spriteworx Private facebook group for Patreon subscribers: https://facebook.com/groups/spriteworx Games & Digital Content (as it becomes available): https://spriteworx.itch.io/ ======================= Other videos: Bits, Bytes, Binary, Hex: https://youtu.be/fpnW1IRz99A Intro to Machine Code: https://youtu.be/BUeT38et870 8-Bit Computer Architecture: https://youtu.be/4FClTlrkl8w ZX Spin Emulator: https://youtu.be/Fszz40NTj2o Timestamps: 00:00 Intro 00:16 Welcome & topics 4:00 Copying the Assembly program listing 5:55 Running the program 7:00 Let's get started! 7:36 Opening the Debugger 11:40 Z-80 Heaven website 13:10 Interrupts 15:30 Program Counter register (PC) 17:17 The Stack 21:10 Stack Pointer register (SP) 21:25 Interlude #1 23:18 Logical instructions (AND, OR, XOR) 28:30 Flag register (F) 1:03:05 Reading the keyboard (IN command, Port numbers) 1:11:03 Interlude #2 1:12:30 BASIC Programming 1:14:45 ZX Spectrum Screen Display 1:16:26 ZX Spectrum Screen Attributes 1:19:30 Screen Attributes color byte values 1:27:38 USR to pass the value of BC register from Machine Code to BASIC 1:28:40 My BASIC program to print the instructions and score.

Comment