Allsolution Paper IISETATOTAL42 ST
Allsolution Paper IISETATOTAL42 ST
SLIP NO 1
Q1)a) Program is stored from memory location C000H to C002H.
Copy the contents of these memory locations on paper and disassemble the program
using op-code sheet.
Q1)b
b) Enters the program on the microprocessor kit.
Q1)c) Execution of program
Registers A B C D E F I H L SP PC
After 18 01 00 C0 06 54 0F C0 03 FFEB F013
Execution
Address Result
C003H 22H
C004H 24H
C005H 26H
Flags After Execution & Interpret’s its meaning is
Q1)b
b) Enters the program on the microprocessor kit.
Q1)c) Execution of program
Registers A B C D E F I H L SP PC
After 22 01 00 00 00 14 0F C0 02 FFEB F00E
Execution
Result Data After Execution
Address Result
C002H 22H
Q1)b
b) Enters the program on the microprocessor kit.
Q1)c) Execution of program
Registers A B C D E F I H L SP PC
After 88 01 00 00 00 B4 0F C0 00 FFEB F010
Execution
Result Data After Execution
Address Result
C002H 88H
Address DATA
DATA ( Before Execution ) C000H F3H
C001H B2H
C002H C6H
C003H 89H
C004H 72H
C005H 90H
C006H 35H
C007H 67H
Address Result
RESULT Data After Execution D002H 04H
D003H 01H
Address DATA
DATA ( Before Execution ) C000H 03H
C001H 02H
C002H 05H
Q1)b) Enters the program on the microprocessor kit.
Q1)c) Execution of program
Registers A B C D E F I H L SP PC
After 03 BF FF 00 00 54 0F C0 06 FFEB F011
Execution
Address Result
Result Data After Execution C003H 05H
C004H 02H
C005H 03H
Address Result
Result Data After Execution C000H FFH
C001H FEH
C002H FDH
C003H A1H
C004H A2H
C005H A3H
Address Result
RESULT : Data After Execution H FFH
L FFH
HL FFFFH
Flags After Execution & Interpret’s its meaning is
After Execution = F = 55 = 01010101
1) CY = 1 Result is 9-bit .
2) P = 1 Result is Even.
3) AC = 1 Carry is given from bit 3 to bit 4.
4) Z = 1 Result is zero.
5) S = 0 Result is Positive.
Q2) Record Book
Q3) Term Work
Q4) Oral (Viva Vice )
EXPERIMENT :10 SLIP NO 17
Q1)a) A block of data is stored in MLs from C000H TO C004H. Writes a program to finds the
number if odd as well as even numbers in the given block. Stores the results immediately
after the end of the block.
Memory Opcodes Label Mnemonic Operand Comment/Remark
Address
F000 21,00,CO LXI H,C000H Initialize HL address as C000H
F003 0E,05 MVI C,05H Set block counter
F005 16,00 MVI D,00H Clear D regi & set as odd counter
F007 1E,00 MVI E,00H Clear E regi & set as even counter
F009 7E BACK MOV A, M Moves memory to ACC
F00A 0F RRC Rotate determine which determines the number is
odd or even
F00B D2,12,F0 JNC NEXT If CY=0 when execution of RRC instruction then
increments even counter byte otherwise increments
odd byte
F00E 14 INR D Increments D content if CY=1 when RRC instruction
execution
F00F C3,16,F0 JMP GO Jumps unconditionally to label GO & executes
instruction INX H
F012 1C NEXT INR E Increments E counter if CY=0 when execution of
instruction RRC instruction
F013 C3,16,F0 JMP GO Jumps unconditionally
F016 23 GO INX H Increments HL address
F017 0D DCR C Decrements block counter
F018 C2,09,F0 JNZ BACK If block counter # 0 i.e. C#0 then goto label BACK &
executes instruction MOV A,M
F01B 72 MOV M,D Moves content in memory from D
F01C 23 INX H Increments HL address
F01D 73 MOV M, E Moves content in memory from E
F01E CF RST 1 S/W interrupting
Address DATA
C000H 05H
DATA ( Before Execution )
C001H 02H
C002H 07H
C003H 09H
C004H B7H
Q1)b) Enters the program on the microprocessor kit.
Q1)c) Execution of program
Registers A B C D E F I H L SP PC
After DB 01 00 04 01 55 0F C0 06 FFEB F01F
Execution
Address Result
RESULT : Data After Execution C005H 04H
C006H 01H
Address DATA
DATA ( Before Execution )
C000H 03H
C001H 02H
C002H 04H
C003H 06H
C004H 08H
Q1)b) Enters the program on the microprocessor kit.
Q1)c) Execution of program
Registers A B C D E F I H L SP PC
After 00 01 00 01 04 55 0F C0 06 FFEB F022
Execution
RESULT : Data After Execution Address Result
C005H 01H
C006H 04H
Flags After Execution & Interpret’s its meaning is
After Execution = F = 55 = 01010101
6) CY = 1 Result is 9-bit .
7) P = 1 Result is Even.
8) AC = 1 Carry is given from bit 3 to bit 4.
9) Z = 1 Result is zero.
10) S = 0 Result is Positive.
Q2) Record Book
Q3) Term Work
Q4) Oral (Viva Vice )
EXPERIMENT :10 SLIP NO 17
Q1)a) A block of data is stored in MLs from C000H TO C004H. Writes a program to finds the
number if odd as well as even numbers in the given block. Stores the results immediately
after the end of the block.
Memory Opcodes Label Mnem Operand Comment/Remark
Address onic
D000 0E, 05 MVI C,05H ; Move Immediate data 05H into C regi.
D002 21, 00, CO LXI H,C000H ; Initialize HL
D005 16, 00 MVI D,00H ; Move immediate data to regi C & clear.
D007 1E, 00 MVI E,00H ; Move immediate data to regi E & clear.
D009 CD, 10, D0 CALL CHECK ; Subroutine Call
D00C 72 MOV M,D ;Copy D to HL
D00D 23 INX H ; Increment HL address by 1.
D00E 73 MOV M,E ; Copy E to HL.
D00F CF RST 1 ; Stop processing.
SUBROUTINE ( CHECK )
D010 7E CHECK MOV A,M ; copy HL to A.
D011 0F RRC ; Rotate right without carry.
D012 D2, 19, D0 JNC NEXT ; Jump to label NEXT if cy=0.
D015 14 INR D ; Increment D by 1.
D016 C3,1A, D0 JMP GO ; Unconditional jump to label GO.
D019 1C NEXT INR E ; Increment content of E by 1.
D01A 23 GO INX H ; Increment HL address by 1.
D01B 0D DCR C ; Decrement content of C regi. by 1.
D01C C2,10, D0 JNZ CHECK ; Jump to label CHECK if z=0
D01F C9 RET ; Return from subroutine.
DATA ( Before Execution )
Address DATA
C000H 01H
C001H 02H
C002H 03H
C003H 04H
C004H 05H
Q1)b) Enters the program on the microprocessor kit.
Q1)c) Execution of program
Registers A B C D E F I H L SP PC
After 82 01 00 03 02 55 0F C0 06 FFEB D010
Execution
RESULT : Data After Execution Address Result
C005H 03H
C006H 02H
Address DATA
DATA ( Before Execution )
C000H ABH
C001H BCH
C002H CBH
C003H BAH
Q1)b) Enters the program on the microprocessor kit.
Q1)c) Execution of program
Registers A B C D E F I H L SP PC
After 00 01 00 00 00 54 0F D0 00 FFEB F024
Execution
Address DATA
DATA ( Before Execution )
C000H CBH
C001H A9H
Result
C002H 9AH
C003H BCH
Q1)b) Enters the program on the microprocessor kit.
Q1)c) Execution of program
Registers A B C D E F I H L SP PC
After BC 01 00 C0 02 54 0F D0 00 FFEB F027
Execution