Story Details

  • The DOS 3.3 Sys.com Bug Hunt

    Posted: 2025-02-24 00:01:53

    The author meticulously debugged a mysterious issue where transferring Apple DOS 3.3 system files to a blank diskette sometimes resulted in a bootable disk, and sometimes a non-bootable one, despite seemingly identical procedures. Through painstaking analysis of the DOS 3.3 source code and assembly-level debugging, they discovered the culprit: a timing-sensitive bug within the SYS.COM program related to how it handled track zero formatting. Specifically, SYS.COM occasionally failed to wait for the drive head to settle after seeking to track zero before writing, resulting in corrupted data on the disk. This timing issue was sensitive to drive mechanics and environmental factors, explaining the intermittent nature of the problem. The author's fix involved adding a small delay within SYS.COM to ensure the drive head had stabilized before writing, resolving the frustrating bug and guaranteeing consistent creation of bootable disks.

    Summary of Comments ( 5 )
    https://news.ycombinator.com/item?id=43154451

    Several Hacker News commenters praised the author's clear and detailed write-up of the bug hunt, appreciating the methodical approach and the insights into early DOS development. Some shared their own experiences with similar bugs and debugging processes in other systems. One commenter pointed out the historical significance of relying on undocumented behavior, a common practice at the time due to limited documentation. Others discussed the challenges of working with older hardware and software, and the satisfaction of successfully solving such intricate problems. The overall sentiment reflects admiration for the detective work involved and nostalgia for the era of simpler, yet more opaque, computing.