Professional Documents
Culture Documents
2012 Set A
2012 Set A
Module Code : E 65
Max. Marks : 50
General Instructions:
1. Answer all the questions.
Page 1 of 12
Question No.1 [ 1,1]
1.1 What are the advantages of an assembly language in comparison
with high-level languages?
The assembly language programs are compact, require less memory
small size OK ‘memory’ is necessary
OK
space, and are more efficient than high-level language ones.
effective OK One answer 0.3 mark
Two answers 0.6 mark
Three answers 1 mark
1.2 Identify the difference between the ASCII and the extended ASCII
codes.
The ASCII code is a 7-bit code with 128 combinations. On the
0.2 mark 0.2 mark
other hand, the extended ASCII code is an 8-bit code with
0.2 mark
256 combinations, which includes additional graphic symbols.
0.2 mark 0.2 mark
Figure 1
4.3 The instruction MOV M,B copies the contents of register B into the
memory location specified by the contents of HL registers. It is a 1-
byte instruction with two machine cycles and seven T-states.
Identify the second machine cycle and its control signal. 1 mark
The second machine cycle is Memory Write; the processor writes
the contents of register B into a selected memory, and the control
signal is ̅̅̅̅̅ ̅̅̅̅̅̅̅̅̅̅ OK WR, MEMW − 0.3 mark
WR. MEMW 1 mark
4.4 In Fig. 2, identify the address range of the memory chip. 1 mark
The memory map ranges from 0000H (= 0 0000000000000002)
to 7FFFH (= 0 1111111111111112). one mistake − 1 mark 1 mark
4.5 In Fig. 2, connect A15 to the negative NAND gate with an inverter,
and identify the address range of the memory chip. 1 mark
The memory map ranges from 8000H (= 1 0000000000000002)
to FFFFH (= 1 1111111111111112). one mistake − 1 mark 1 mark
4.6 In Fig. 2, eliminate the negative NAND gate and connect IO/M ̅ to
̅̅̅̅
CE of the memory chip directly. Identify the primary address range
and the mirror (foldback) address range of the memory chip.
Page 5 of 12
The primary memory map ranges one mistake − 0.5 mark
from 0000H (= 0 0000000000000002) 0.5 mark
to 7FFFH (= 0 1111111111111112). 0.5 mark
The mirror (foldback) memory map ranges
from 8000H (= 1 0000000000000002) 0.5 mark
to FFFFH (= 1 1111111111111112). 0.5 mark
Figure 2
Figure 3
Page 7 of 12
Question No.6 [ 2,2,2,3]
6.1 In Fig. 4, identify the primary port address and the foldback
(mirror) port address for the common-anode seven-segment LED
port (first digit). 00F1H, 00F9H ×
The primary port address is F1H (= 1111 0 0012). 1 mark
The foldback (mirror) port address is F9H (= 1111 1 0012). mark
1
6.2 In Fig. 4, identify the primary port address and the foldback
(mirror) port address for the common-anode seven-segment LED
port (second digit). 00F3H, 00FBH ×
The primary port address is F3H (= 1111 0 0112). 1 mark
The foldback (mirror) port address is FBH (= 1111 1 0112). 1 mark
6.3 In Fig. 4, identify the primary port address and the foldback
(mirror) port address for the common-anode seven-segment LED
port (third digit). 00F5H, 00FDH ×
The primary port address is F5H (= 1111 0 1012). 1 mark
The foldback (mirror) port address is FDH (= 1111 1 1012). mark
1
6.4 In Fig. 4, write assembly program to display the number “580” at
the common-anode seven-segment LED ports. Use the foldback
port address for all the common-anode seven-segment LED ports.
MVI A,92H ;Code for ‘5’ to Third Digit
OUT FDH ;Display at Third Digit OUT F9H OK
MVI A,80H ;Code for ‘8’ for Second Digit
OUT FBH ; ;Display at Second Digit
MVI A,C0H ;Code for ‘0’ for First Digit OUT FDH OK
OUT F9H ; ;Display at First Digit
HLT ;End of the program
3 mark
each 0.4 mark + 0.2 mark
one mistake − 0.4 mark
no H (Hexadecimal symbol) − 0.1 mark
(full mark consideration)
Page 8 of 12
Figure 4
Page 9 of 12
Appendix 8085 Instruction Summary
Page 10 of 12
Mnemonic Hex Mnemonic Hex Mnemonic Hex Mnemonic Hex
SUB E 93 INX H 23 ANA E A3 CMP L BD
SUB H 94 INX SP 33 ANA H A4 CMP M BE
SUB L 95 DCR A 3D ANA L A5 ADI byte C6
SUB M 96 DCR B 05 ANA M A6 ACI byte CE
SBB A 9F DCR C 0D XRA A AF SUI byte D6
SBB B 98 DCR D 15 XRA B A8 SBI byte DE
SBB C 99 DCR E 1D XRA C A9 ANI byte E6
SBB D 9A DCR H 25 XRA D AA XRI byte EE
SBB E 9B DCR L 2D XRA E AB ORI byte F6
SBB H 9C DCR M 35 XRA H AC CPI byte FE
SBB L 9D DCX B 0B XRA L AD JMP adr C3
SBB M 9E DCX D 1B XRA M AE JNZ adr C2
DAD B 09 DCX H 2B ORA A B7 JZ adr CA
DAD D 19 DCX SP 3B ORA B B0 JNC adr D2
DAD H 29 DAA 27 ORA C B1 JC adr DA
DAD SP 39 CMA 2F ORA D B2 JPO adr E2
INR A 3C STC 37 ORA E B3 JPE adr EA
INR B 04 CMC 3F ORA H B4 JP adr F2
INR C 0C RLC 07 ORA L B5 JM adr FA
INR D 14 RRC 0F ORA M B6 PCHL E9
INR E 1C RAL 17 CMP A BF CALL adr CD
INR H 24 RAR 1F CMP B B8 CNZ adr C4
INR L 2C ANA A A7 CMP C B9 CZ adr CC
INR M 34 ANA B A0 CMP D BA CNC adr D4
INX B 03 ANA C A1 CMP E BB CC adr DC
INX D 13 ANA D A2 CMP H BC CPO adr E4
Page 11 of 12
Mnemonic Hex Mnemonic Hex
CPE adr EC POP H E1
CP adr F4 POP PSW F1
CM adr FC XTHL E3
RET C9 SPHL F9
RNZ C0 OUT byte D3
RZ C8 IN byte DB
RNC D0 DI F3
RC D8 EI FB
RPO E0 NOP 00
RPE E8 HLT 76
RP F0 RIM 20
RM F8 SIM 30
RST 0 C7
RST 1 CF
RST 2 D7
RST 3 DF
RST 4 E7
RST 5 EF
RST 6 F7
RST 7 FF
PUSH B C5
PUSH D D5
PUSH H E5
PUSH PSW F5
POP B C1
POP D D1
Page 12 of 12