You are on page 1of 8

School of Computing

Department of Computer Science and Engineering


R15 B.TECH
SUMMER 2020 - 21
Course code & Title: 1151CS105 / System Software
FACULTY NAME : D.JAGANATHAN
COURSE COORDINATOR : Dr.J.Visumathi Date : 09.10.2020
Slot No: S7

CO3 Illustrate how the object code is loaded into memory and linked with other object code K2
CO4 Summarize the macro definitions and its expansions K2
CO5 Explain features of modern editing /debugging tools. K2
Assignment – 2
Assignment Question
Group 1
CO K
VTU NO.
Level Level
1. 1. Explain how the below listed SIC based object file load into memory
using absolute loader.
H SUM 001000 178f
T 001000 018 04 2788 00 2788 18 9015 2C 2785 38 1006 0C 278B 4C
0000 000000
CO3 K2 vtu10017
E 001000
2. Consider the below listed ANSIC Macro vtu10095
CO4 K2
# define ABSDIFF (X,Y) ((X) > (Y) ? (X) – (Y) : (Y) – (X)) vtu10221
and the macro invocation statement
ABSDIFF(I+1,J-5)
What would be result in macro expansion statement if I=4 ,J=6.

Group 2
1. Consider the below listed Pass1 output (EXTERNAL SYMBOL TABLE)
Control Symbol Address Length
section
Progam A 4000 63 CO3 K2
LISTA 4040
ENDA 4054
Program B 4063 7F vtu11122
LISTB 40C3
vtu11123
ENDB 40D3
Program C 40E2 51 vtu11130
LISTC 4112
ENDC 4124
CO4 K2
a) Generate the Pass2 output above external symbol table
b) show the Relocation and liking Operation REF4 in PROGA ENDA-
LISTA+LISTC=
2. Explain with an example how macro processor allows the invocation of
macro with in macro
Group 3
1. Consider the following SIC/XE vtu11158
0000 PROGA START0 vtu11167
CO1 K2
EXTDEF DATA_1A, DATA_2A vtu11176
EXTDET DATA_1B, DATA_2B
0050 REF1 LDA DATA_1A-64
0090 DATA_1A EQU *
00C2 DATA_2A EQU *
00d0 REF2 WORD DATA_1B+DATA_2B-20
END REF1

0000 PROGB START0


EXTDEF DATA_1B, DATA_2B
EXTDET DATA_1A, DATA_2A
0030 REF1 LDA DATA_1A-64
0080 DATA_1B EQU *
00A5 DATA_2B EQU *
00C2 REF2 WORD DATA_1B+DATA_2B-20
END REF1
the opcode for LDA is 00 shows the object program generated by the
assembler for these two program .show how these two programs will
appear in memory after linking and loading assuming program starting
address is 5000
CO4 K2
2. Discuss in brief about the different data structures used by a macro
processor.
Group 4
1. Generate the object code for the following SIC/XE Program and load
the object file using absolute loader
SUM START 0000
FIRST LDX #0
- LDA #0
- +LDB #TABLE2
- BASE TABLE2
LOOP ADD TABLE, X
- BASE TABLE2
- ADD TABLE2, X
- TIX COUNT
- JLT LOOP CO3 K2 vtu11188
- +STA TOTAL vtu11191
- RSUB -
TABLE RESW 2000 vtu11198
TABLE2RESW 2000 vtu11211
COUNT RESW 1
TOTAL RESW 1
- END FIRST
2. A program contains a set of series of variables: CO4 K2
XA1, XA2, XA3,…
XB1, XB2, XB3,… :

The programmer wants to write a macro to process each series of


variables. How the programmer to write macro to specifies the series
of variables to be operated on (A, B, …).The macro processor
construct the symbols by concatenating X
Group 5
1. Consider the following instruction

55 101B LDA THREE 00102D CO3


K2
This program must be loaded at address 1000 in order to execute
properly. This address was specified at assembly time. The above vtu11216
statement is translated as 001021D, specifying that register A is vtu11233
to be loaded from memory address 102D.For loading, and vtu11236
executing the program at 2000 address using Reloadable loader vtu11237
we need to make some change in the address portion of the show
that using Modification Record.
K2
2. What is text editor? Discuss clearly the design of the functional CO5
components of a text editor?

Group 6

1. The assembler does not know the actual location where the program
will be loaded; it cannot make the necessary changes in the addresses CO3 K3
used by the program. The assembler can identify for the loader those parts
vtu11247
of the object program that need modification. Below object program that
vtu11254
contains the information necessary to perform this kind of modification is
called as reloadable program Draw the memory structure of program vtu11259
execution.

2. Discuss in detail about the various issues related to an interactive C05 K2


debugging system.
Group 7

1. Modify the algorithm in Pass 1 and Pass 2 Linker Loader to


implement CHANGE, DELETE and INCLUDE directives as described
in the Linker. If you need to place any restriction on these
commands, be sure to state what they are. What is the most
important difference between the following two sequences of CO3 K2
statements?

LDA ALPHA
COMP #0
JEQ SKIP vtu11673
LDA #3
STA BETA vtu12084
SKIP………………… vtu12140
IF (ALPHA NE 0)
BETA SET 3
ENDIF
2. We all by now understand that editors are the program which is
used to create, edit and modify a document. A document may CO5 K2
include some images, files, text, equations, and diagrams as well.
But we will be limited to text editors only whose main elements are
character strings
Group 8
1. Assume that PROGA, PROGB and PROGC are the same as in the
program for Linking and Relocation, show how the object
programs would change (including TEXT and MODIFICATION
Records) if the following statements were added to each program:
REF9 WORD LISTC
REF10 WORD LISTB-3 vtu12141
REF11 WORD LISTA+LISTB vtu12239
REF12 WORD ENDC-LISTC-100 CO3 K2
vtu12306
REF13 WORD LISTA-LISTB-ENDA+ENDB CO4 K2
2. The value of macro-time variable is usually considered to be local
to a macro definition. That is a value assigned to a macro-time
variable can be used only within the same macro definition.
Sometimes, however, it might be useful to be able to communicate
the value of a macro time variable between two related macros.
How could this be accomplished?
Group 9
1 From the object program generate the program(Exclude Text record)

K2 vtu12350
CO3
vtu12351
vtu12437
vtu12745

2. In the program list out what are the unique labels are expended and
explain? CO4
K2

Group 10
1. How could a non-recursive macro pre-processor allow for the invocation of
macros within the macros? What would be the advantages and disadvantages of CO4 K2 vtu12747
such an approach? vtu12856
2. Discuss in detail about editors with block diagram. C05 K2 vtu12893
vtu13132
Group 11
1. Explain the object program with all records.

CO3
K2 vtu13137
vtu13185
vtu13209
vtu13235

2.
3. Expand the code.
CO4 K2

Group 12
1. Describe about each record type in MS-DOS LINKER

CO3 K2
vtu13341
vtu13618
vtu14182
vtu14196

2. State whether the program belongs to SIC or SIC/XE? Justify your


answer and explain the program.

CO4 K2
Group 13
1. State what is the relocation method is used? Extract the bit mask and
K2 vtu14202
CO3 vtu14210
vtu14211

explain.
CO5
2. What are the other parts of the system to which the debugger should be K2
related with?
Group 14
1. Write an object program for the above program with “D” record, ”R”
record and ”M record”

vtu14218
K2 vtu14232
CO3 vtu14240

 If the same macro is expanded multiple times at different places in the


CO4
program … K2
 There will be duplicate labels, which will be treated as errors by the
assembler.
2. In the above scenario what is the Problem of the label in the body of
macro? And give solution.
Group 15
1Discuss in detail about what loader option is used in below program.

CO3 K2

vtu14289
vtu14295
vtu14448
CO5 K2
2 Discuss about Interactive Debugging System
Group 16
1. In the above scenario in macro processor, definition of RDBUFF stored
CO4 K2
where? Justify your answer.

vtu14581
vtu14632

CO5 K2

2. Describe in detail about how Filtering phase is differed from editing.


Group 17
1. Expand the above code.
CO4 K2

vtu14651
vtu14653

CO5 K2
2. Explain the Editor structure with a neat diagram.
Group 18
1. Explain that you have been given the task of writing an “Loader” – vtu14694
that is , a piece of software that can take the image of a program that vtu14696
has been loaded and write out an object program could later be
loaded and executed. The computer system used a locating loader,
so the object program you produce must be loaded at a location in
memory that is different from which your unloaded took it. What
problems do you see that would preview you from accomplishing
this task? K2
2. Refer to the definition of RDBUFF that appears in linking and CO3
loading. Each of the following macro invocation statements contains
an error. Which of these errors would be detected by the macro
processor, and which would be detected by the assembler?
a. RDBUFF F3,BUF,RECL,ZZ
( illegal value specified for &EOR) CO3
b. REDBUFF F#,BUF,RECL,04,2048,01 K2
(Too many Arguments)
Group 19
1. Explain how the parameter of this request is the symbolic name of the
routine to be called. Instead of executing a JSUB instruction referring to an
external symbol, the program makes a load-and-call service request to OS.
Explain and sketch how the library files will be included
vtu14698
vtu14985
CO4 K2

CO3 K2

2. Explain that a relocatable SIC/XE program is to be loaded in three


different parts. One part contains the assembled instructions of the
program (LDA, JSUB, Etc.,). Another part contains the data variables using
in the program(which are defined by RESW, RESB, BYTE andWORD). The
third part contains data constants (which re defined by a new assembler
directive named CONST).
Group 20

1. Suppose that you have a one-pass assembler that produce object code
directly in memory, as described in the linking and loading. This
assembler was designed to assemble and run only one control section.
Now you want to change it so that it can assembled run a program that vtu11266
consist of several different control section. Describe the changes you vtu11344
would make to implement this new capability. You modified assembler CO3 K2 vtu11545
should still run in one pass, and should still produce object code in
memory, without using any other files.

2. Explain that a macro processor with logic similar to that Linking and
Relocation is to perform recursive macro expansion. The text points out CO4 K2
the need to save values of EXPANDING and ARGTAB when making a
recursive call to EXPAND. Depending upon how the algorithm is
implemented, what other values might it also be necessary to save?

Prepared by Course Coordinator H.O.D

You might also like