Fixing a Bug in Rodnay Zaks Programming the 6502 @8_Bit
Fixing a Bug in Rodnay Zaks Programming the 6502  @8_Bit
Uploaded October 2020 | Updated November 2026, 1 week ago
Rodnay Zaks' "Programming the 6502" is a classic, but it's also got a bug! We take a deep look at the Block Transfer Routine on pages 204-208, find the bug, and then demonstrate and (nearly, see notes below) fix it in Turbo Macro Pro on the C64.

Programming the 6502: archive.org/details/Programming_the_6502

UPDATE! The source in file BLKCPY8 (shown in the video) has a bug, discovered by RETRO Innovations. BLKCPY9 (included in the .d64 linked below) has the fix suggested by csbruce. Also on the .d64, viewer jjeeeekk came up with a faster-running fix which is file BLKCPY11 on the .d64, and also checkout elandje's version which is BLKCPY10.

Block Transfer .d64: 8BitShowAndTell.com/prg/tmpzaks.d64

Become a patron: patreon.com/8BitShowAndTell
One-time donation: paypal.me/8BitShowAndTell

Ending credits is an unreleased song by Bedford Level Experiment, lyrics by Robin's son. Check out other songs here: bedfordlevelexperiment.bandcamp.com

Index:
0:00 Z80, 6502, and Rodnay Zaks
1:07 Programming the 6502 editions
2:40 A Block Transfer Routine p. 204
4:50 Reading time!
7:46 Looking at the printed source code
14:46 The kind of clever bit - which is the bug!
17:07 Indexed indirect?
23:14 FINALLY THE C64!
24:19 Loading Turbo Macro Pro
27:33 Running the program
30:14 Demonstrating the bug
32:15 Some cleanup
34:35 A fix (of a fix)!
38:08 A couple tests
40:30 Thanks to my patrons
Fixing a Bug in Rodnay Zaks Programming the 6502Hardware Computer Flash Cards - Quiz Game by Edu-Cards4-Bit Video Games: Tron, Scramble, Lupin, and Caveman by TomyBest Ever VIC-20 Cart? Penultimate+2Commodore Breadbin Case Variations: C64, VIC-20, C1633 Year-Old Commodore 64 Easter Egg Hidden In A Printer InterfaceViewing the 2024 Solar Eclipse with Commodore 64s 1984 Sky Travel8-Bit Show And Tell: Year One RecapWhat is Game 31? Recreating Satoru Iwatas First InspirationWAITing for BASIC on the Commodore 64Optimizing Line Count in TI BASIC: Type-in Fun with the TI-99/4AOne-Line Bouncing Ball: Commodore 64 BASIC
8-Bit Show And Tell |

Fixing a Bug in Rodnay Zaks' "Programming the 6502"

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER