Title: SP Mid-Term Exam
1SP Mid-Term Exam
2Q1. Consider the memory contents shown in the
following figure.What would be loaded to
register A with the instruction 022030
(hexidecimal)? (10)
3Answer
4Q2. Briefly answer the following questions (40)
- 1. Why does Beck's "System Software" textbook
design a hypothetical computer SIC to present the
concepts in his book? - Ans
- illustrate the most commonly encountered
hardware features and concepts, while avoiding
most of the idiosyncrasies. (p.4)
5- 2. What are the maximum memory size of SIC and
SIC/XE, respectively? - Ans
- 215/220 bytes(p.5/p.7)
- 3.How many addressing modes do SIC and SIC/XE
support, respectively? - Ans
- 2/18 (p.6/p.499)
6- 4.How many instructions are there in the SIC/XE
instruction set? - Ans
- 59 (p.496498)
- 5.How does SIC determine whether the result of a
TD instruction is successful? - Ans
- CC (condition code) LT means the device is
ready (p.7)
7- 6. What are the two general purpose registers in
SIC/XE? - Ans
- S,T (p.7)
- 7. What is the size of F register?
- Ans
- 48bits (p.7)
8- 8. Why does the assembler need to handle the
source files in two passes? - Ans
- Pass1 assign addresses to all symbol
- Pass2 generate object code in order to solve
- the problem of forward reference
9Q3. Translate (by hand) the following assembly
program to SIC object code. (The output format
will look like Figure 2.3, which contains H
record, T record, and E record.) (10)
10(No Transcript)
11Answer
- HSTRCPY00100000002B
- T0010000F04102550900F54901A2C1028381003
- T00100F0B5445535420535453494E47
- T0010250600000000000B
- E001000
12Q4. Translate (by hand) the following assembly
program to SIC/XE object code.
13(No Transcript)
14Answer
- HSTRCP2001000000027
- T0010001175000B05000053A00857A010B8503B2FF5
- T0010110B5445535420535452494E47
- E001000
15Q5. Disassemble (convert object code back into
assembly language) the following SIC/XE program.
(10)
- HQUIZ 000000000019
- T000000130100031320100500006F10001690010F900013
- E000000
16Answer
- QUIZ START 0
- FIRST LDA 3
- STX THREE
- LDX 0
- LDS THREE
- ADDR A,X
- STA RESULT,X
- RESULT RESW 1
- THREE RESW 1
- END FIRST
0000 0003 0006 0009 000D 000F 0013 0016
010003 132010 050000 6F100016 9001 0F900013
17Q6. Simulate (by hand) the execution of the above
program and let the breakpoint by 000013. What
would be the value of register X when (pc)
000013? (10)
REGISTER
A3 X3
18Q7. Simulate (by hand) the execution of the
object code below. Let the breakpoint be 001011.
What is the value of register A when (PC)
001011? (10)
- HGAUSS 001000000017
- T0010000C01000169200B1B4003232008
- T00100C0B6F40009C40000002000064
- E001000
19Answer
20(No Transcript)
21(1100)100/25050 A13BA