Page 195 - DCAP104_EXPOSURE_TO_COMPUTER_DISCPLINES
P. 195

Exposure to Computer Disciplines



                   Notes
                                 9.1.11.1 Embedded Programs
                                 Some computer programs are embedded into hardware. A stored-program computer requires an
                                 initial computer program stored in its read-only memory to boot. The boot process is to identify
                                 and initialize all aspects of the system, from processor registers to device controllers to memory
                                 contents. Following the initialization process, this initial computer program loads the operating
                                 system and sets the program counter to begin normal operations. Independent of the host
                                 computer, a hardware device might have embedded firmware to control its operation. Firmware
                                 is used when the computer program is rarely or never expected to change, or when the program
                                 must not be lost when the power is off.

                                          Figure 9.4: The Microcontroller on the Right of this USB Flash Drive is
                                                        Controlled with Embedded Firmware


















                                 9.1.11.2 Manual Programming

                                 Computer programs historically were manually input to the central processor via switches. An
                                 instruction was represented by a configuration of on/off settings. After setting the configuration, an
                                 execute button was pressed. This process was then repeated. Computer programs also historically
                                 were manually input via paper tape or punched cards. After the medium was loaded, the starting
                                 address was set via switches and the execute button pressed.

                                             Figure 9.5: Switches for Manual Input on a Data General Nova 3
















                                 9.1.11.3 Automatic Program Generation

                                 Generative programming is a style of computer programming that creates source code through
                                 generic classes, prototypes, templates, aspects, and code generators to improve programmer
                                 productivity. Source code is generated with programming tools such as a template processor
                                 or an integrated development environment. The simplest form of source code generator is a
                                 macro processor, such as the C preprocessor, which replaces patterns in source code according
                                 to relatively simple rules.


        188                               LOVELY PROFESSIONAL UNIVERSITY
   190   191   192   193   194   195   196   197   198   199   200