SP3.1 Basic Loader Function
SP3.1 Basic Loader Function
Tzong-Jye Liu
Department of Information Engineering and Computer Science
Feng Chia University
[email protected]
System Programming 2
Absolute loader
n No linking and relocation needed
n Records in object program perform
n Header record
n Check the Header record for program name,
starting address, and length (available
memory)
n Text record
n Bring the object program contained in the
Text record to the indicated address
n End record
n Transfer control to the address specified
in the End record
System Programming 3
System Programming 4
Loading an absolute program
Figure 3.1, pp. 125
No text record
System Programming 5
System Programming 7
System Programming 8
Algorithm for SIC/XE bootstrap loader
X ¬ 0x80 (the address of the next memory location to be loaded)
Loop until end of input
A ¬ GETC (and convert from ASCII character code to the
hexadecimal digit)
save the value in the high-order 4 bits of S
A ¬ GETC
combine the value to form one byte A ¬ (A+S)
(X) ¬ (A) (store one char.)
X ¬ X + 1
End of loop
System Programming 9
Base
X
System Programming 10
Bootstrap loader for SIC/XE
-- Figure 3.3, pp. 128
System Programming 11