Section 11.3
Review Questions

Approaches to Relocation

  1. The following CSC-1 program needs to be moved in memory. Relocate it, and its accompanying data, to location 3600.
               Mem addr           Contents of memory
               --------           ------------------
                  2400               LOD 2409
                  2401               ADD 2408
                  2402               SUB 2411
                  2403               ADD 2410
                  2404               STD 2406
                  2405               JZ  2400
                  2406               HLT
                  2407               NUM 17
                  2408               NUM 4
                  2409               NUM 0
                  2410               NUM 1032
                  2411               NUM 1
  1. Now do the same kind of relocation by rewriting operand addresses when all you see are numbers in memory!
               Mem address          Contents       Contents in binary
               -----------          ---------      ------------------
                  2400                2409          0000100101101001
                  2401               14696          0011100101101000
                  2402               18795          0100100101101011
                  2403               14698          0011100101101010
                  2404                6502          0001100101100110
                  2405               39264          1001100101100000
                  2406               63744          1111100100000000
                  2407                  17          0000000000010001
                  2408                   4          0000000000000100
                  2409                   0          0000000000000000
                  2410                1032          0000010000001000
                  2411                   1          0000000000000001
  1. The point of the preceding exercise was not to drive you mad! Can you guess what the point really was?
  1. Rewriting addresses in programs might be feasible if what conditions were met by the code? In other words, how would the instructions and data have to be structured so as to make this workable?
  1. Define what the stored program concept is.
  1. Who is usually credited with inventing (discovering?) the stored program concept?
  1. Distinguish between logical address and physical address.
  1. Match:
                   virtual address                         physical address
               
                   real address                            logical address
  1. Why is it important to have as fast an adder circuit as possible?
  1. How is relocation done today? (They don't rewrite programs.)
  1. What is a page of memory?