Untitled
Untitled
Untitled
Module 1 - Problems
Give the target address generated for the following instruction, if:
(B)=006000, (PC) = 003000, (X) = 000090
i) 010030 ii) 0310C303 iii) 002600 iv) 03C300
2.
Generate the complete object program for the following SIC/XE assembly language
programs.
1. SUM START 0
FIRST LDX #0
LDA #0
+LDB #TABLE2
BASE TABLE2
LOOP ADD TABLE, X
ADD TABLE2, X
TIX COUNT
JLT LOOP
+STA TOTAL
RSUB
COUNT RESW 1
TABLE RESW 2000
TABLE2 RESW 2000
TOTAL RESW 1
END FIRST
Object Program:
H^SUM ^000000^002F03
T^000000^1D^050000^010000^69101790^1BA013^1BC000^2F200A^3B2FF4^0F102F00^4F0
000
E^000000
2.
Line 6 = +LDCH BUFFER, X
Loc Len Label Mnemonic Operand Obj code
105D Op(6) n i x b p e Disp(12 or 20)
105D 2 B410
105F 3 7721A6 0111 01 1 1 0 0 1 0 0001 1010 0110
1062 3 E32012 1110 00 1 1 0 0 1 0 0000 0001 0010
1065 3 332FFA 0011 00 1 1 0 0 1 0 1111 1111 1010
1068 4 53901078 0101 00 1 1 1 0 0 1 0000 0001 0000 0111 1000
106C 3 DF2008 1101 11 1 1 0 0 1 0 0000 0000 1000
106F 2 B850
1071 3 3B2FEE 0011 10 1 1 0 0 1 0 1111 1110 1110
1074 3 4F0000 0100 11 1 1 0 0 0 0 0000 0000 0000
1077 1 05
1078 400
1208 2
120A
Object Program:
H^WRREC ^00105D ^0001AD
T^00105D^1B^B410^7721A6^E32012^332FFA^53901078^DF2008^B850^3B2FEE^4F0000^0
5
E^00105D
3. Generate the object code and complete object program for the following SIC/XE assembly
language program, indicating the entries of appropriate data structures.
Use the opcodes given below for the mnemonics in the source program:
COPY START 0
CLEAR X
LDT #11
MOVECH LDCH STR1, X
STCH STR2, X
TIXR T
JLT MOVECH
STR1 BYTE X’5445535440535452494E47’
STR2 RESB 11
END COPY