Presentation is loading. Please wait.

Presentation is loading. Please wait.

DAT2343 The Bootstrap Process © Alan T. Pinck / Algonquin College; 2003.

Similar presentations

Presentation on theme: "DAT2343 The Bootstrap Process © Alan T. Pinck / Algonquin College; 2003."— Presentation transcript:

1 DAT2343 The Bootstrap Process © Alan T. Pinck / Algonquin College; 2003

2 What is a Bootstrap? A bootstrap program is a program which is used to load other programs (usually the Operating System); it needs to be automatically available when a computer is started. A bootstrap program is typically embedded in a computer as codes in ROM.

3 Requirement for a Bootstrap Without a bootstrap program, every program would need to be manually loaded into memory one bit at a time before it could be run. A bootstrap is a “generic” program loader which allows different Operating Systems or programs to be loaded and run based on installed (usually disk-based) components.

4 ROM Considerations Unless the bootstrap is embedded in ROM, it would need to be manually loaded, bit-by- bit. However, a ROM bootstrap uses up memory address spaces which can not be used for other programs later (after the ROM bootstrap has no further useful purpose)

5 How a Bootstrap Loader Might Work input countOfWordsToLoad set ptr to lowestAddressForApplications while (--countOfWordsToLoad) >= 0 input to [ptr] location ptr++ endwhile jump to lowestAddressForApplications

6 Problems Implementing for LMC Difficult to simulate indirect addressing (the “input to [ptr] location” instruction. any modifiable value must be in RAM (although the bootstrap program must be in ROM)

7 Implementation in LM-Assembler (assuming ROM starts at 80) ORG 76 // in RAM // subr copied from ROM SRET DAT SSTO DAT SJMP DAT // modifiable variable COUNT DAT // start of ROM ORG 80 // in ROM BOOT IN STO COUNT LDA XSTO STO SSTO LDA XRET STO SRET WHIL LDA COUNT SUB ONE STO COUNT SKPZ JMP 00 // start of app IN CALL SSTO LDA SSTO ADD ONE STO SSTO JMP WHIL ONE DAT 001 XSTO STO 00 XRET JMP SRET

8 Effects of placing the Bootstrap ROM in high memory addresses When the LMC bootstrap code (from previous slide) is implemented using ROM starting at mailbox address 80, the “Reset” button function needs to be modified to reset the counter to 80 instead of 00. In the general computer model, a “power- on” must set the instruction pointer to the first bootstrap instruction in ROM.

9 Effects of Alternative Placement of Bootstrap ROM in Low Memory If the bootstrap loader where placed in low memory (at addresses starting at 00 for the LMC), then all other programs would need to be coded with the assumption of starting at some other, higher address. This happened in CP/M microcomputers (which preceded MS-DOS); all applications were assumed to start at address 0100 (hex).

10 End of Lecture

Download ppt "DAT2343 The Bootstrap Process © Alan T. Pinck / Algonquin College; 2003."

Similar presentations

Ads by Google