Cover of Code by Charles Petzold - Business and Economics Book

From "Code"

Author: Charles Petzold
Publisher: Microsoft Press
Year: 2000
Category: Computers

🎧 Free Preview Complete

You've listened to your free 10-minute preview.
Sign up free to continue listening to the full summary.

🎧 Listen to Summary

Free 10-min Preview
0:00
Speed:
10:00 free remaining
Chapter 22: The Operating System
Key Insight 1 from this chapter

Manual Computer Initialization and Software Entry

Key Insight

A newly assembled computer, despite having a microprocessor, RAM, keyboard, video display, and disk drive, initially presents a screen of random ASCII characters upon power-up. This occurs because semiconductor memory loses its contents when power is off and starts in an unpredictable state, leading the microprocessor (e.g., Intel 8080, which begins execution at address 0000h) to execute random bytes as machine code. To introduce the first software, a control panel is necessary. This panel facilitates stopping the microprocessor with a Reset switch, taking over bus signals with a Takeover switch, and using A0-A15 switches to specify a 16-bit memory address. Data bytes are then set via D0-D7 switches and written to memory by toggling a Write switch.

Displaying program output on the video display through this method is not straightforward. For instance, directly writing a hexadecimal value like 4Bh to video memory would render 'K' because 4Bh is the ASCII code for 'K'. To display '4B', two separate ASCII codes must be written: 34h for '4' and 42h for 'B'. This necessitates converting each nibble of an 8-bit result into its corresponding hexadecimal ASCII digit. Example 8080 assembly subroutines are provided for this: 'NibbleToAscii' converts a nibble to its ASCII equivalent (adding 30h for 0-9, or 37h for A-F), and 'ByteToAscii' calls this routine twice to convert an 8-bit byte into two ASCII digits.

This process of manually converting assembly language to machine code and keying it into memory byte by byte, known as 'hand assembling', is extremely laborious, error-prone, and inefficient. The control panel is identified as an 'absolute worst form of input and output ever devised'. This highlights the critical need for a more sophisticated and user-friendly interaction method to transition the computer from a purely theoretical construction to a practical, productive tool, making the replacement of this manual input system an immediate priority.

📚 Continue Your Learning Journey — No Payment Required

Access the complete Code summary with audio narration, key takeaways, and actionable insights from Charles Petzold.