He graduated with a Master of Science in Mathematics from Stevens Institute of Technology in 1975. Aside from writing books about Windows programming he has contributed to various magazines about computers.
He had an interest in electronic music and in 1977 started building electronic music instruments out of CMOS chips. In 1979, Petzold started building a computer-controlled digital electronic music synthesizer based on the Zilog Z80microprocessor.[3] This experience of digital circuitry and assembly language programming formed the basis of his book Code: The Hidden Language of Computer Hardware and Software.
Petzold purchased a two-diskette IBM PC in 1984 for $5,000.[3] This debt encouraged him to use the PC to earn some revenue so he wrote an article about ANSI.SYS and the PROMPT command. This was submitted to PC Magazine for which they paid $800. This was the beginning of Petzold's career as a paid writer.
In 1984, PC Magazine decided to do a review of printers. They asked all current New York contributors to help with the review. Petzold showed the staff some small assembly-language programs he had written. Soon he was busy writing little 300-500 byte .COM file utilities for PC Magazine.
Petzold was soon getting so much freelance work from PC Magazine that he was able to quit his job.
Microsoft then decided that Microsoft Systems Journal would cover both DOS and Windows programming. Jonathan Lazarus, who contracted with Microsoft, recruited Petzold to write some articles.[3] Petzold wrote the article A Step-by-Step Guide to Building Your First Windows Application" for MSJ, Vol.1, No. 2 (December 1986) which he believes was the first article about Windows programming to appear in a magazine.[3]
Petzold told some people at a Microsoft-related function that he really enjoyed writing this type of article. This news was relayed to Microsoft Press editor-in-chief Susan Lammers. This resulted in Petzold being contracted to write the first edition of Programming Windows from January until August 1987.