Super 25 Mic Q&A v2v-1
Super 25 Mic Q&A v2v-1
1
YOUTUBE : SUBSCRIBE NOW INSTA : FOLLOW NOW
Download V2V APP on Playstore for more FREE STUDY MATERIAL
Contact No : 9326050669 / 9326881428
V2V EdTech LLP | MIC (CO/IT/AIML) (22415) | Super 25 Q&A
P-Parity Flag This flag is set to 1 if the lower byte of the result contains even number of 1’s
otherwise it is reset.
AC-Auxiliary Carry Flag This is set if a carry is generated out of the lower nibble, (i.e. From
2
YOUTUBE : SUBSCRIBE NOW INSTA : FOLLOW NOW
Download V2V APP on Playstore for more FREE STUDY MATERIAL
Contact No : 9326050669 / 9326881428
V2V EdTech LLP | MIC (CO/IT/AIML) (22415) | Super 25 Q&A
Control Flags
T-Trap Flag If this flag is set ,the processor enters the single step execution mode.
I-Interrupt Flag it is used to mask(disable) or unmask(enable)the INTR interrupt. When this
flag is set,8086 recognizes interrupt INTR. When it is reset INTR is masked.
D-Direction Flag It selects either increment or decrement mode for DI &/or SI register during
string instructions.
• AL 1111 1100
• BL 0000 0011
---------------------
• AL0000 0000 (AND AL,BL)
2) OR – Logical OR
Syntax :OR destination, source
Operation
Destination OR source
Example :
• OR AL,BL
• AL 1111 1100
• BL 0000 0011
• AL1111 1111
Example
NOT BL
BL = 0000 0011
4
YOUTUBE : SUBSCRIBE NOW INSTA : FOLLOW NOW
Download V2V APP on Playstore for more FREE STUDY MATERIAL
Contact No : 9326050669 / 9326881428
V2V EdTech LLP | MIC (CO/IT/AIML) (22415) | Super 25 Q&A
:CF=0,OF=0,PF,SF,ZF
This instruction exclusive, OR’s each bit in a source byte or word with the same number bit
in a destination byte or word.
Example(optional) XOR AL,BL
• AL 1111 1100
• BL 0000 0011
Example: (Any 1)
TEST AL, BL ; AND byte in BL with byte in AL, no result, Update PF, SF, ZF.
Debugger
a) Debugger is a program that allows the execution of program in single step mode under
the control of the user.
The errors in program can be located and corrected using a debugger. Example; TD.
5
YOUTUBE : SUBSCRIBE NOW INSTA : FOLLOW NOW
Download V2V APP on Playstore for more FREE STUDY MATERIAL
Contact No : 9326050669 / 9326881428
V2V EdTech LLP | MIC (CO/IT/AIML) (22415) | Super 25 Q&A
Procedures are used for large Procedures are used for small
group of instructions to be group of instructions to be
repeated repeated.
Directives PROC & ENDP are MACRO and ENDM are used
used for defining procedure. for defining MACRO
Procedure_name -------
ENDP ENDM
6
YOUTUBE : SUBSCRIBE NOW INSTA : FOLLOW NOW
Download V2V APP on Playstore for more FREE STUDY MATERIAL
Contact No : 9326050669 / 9326881428
V2V EdTech LLP | MIC (CO/IT/AIML) (22415) | Super 25 Q&A
4. EQU -
The EQU directive is used to give name to some value or symbol. Each time the
assembler finds the given names in the program, it will replace the name with the
value or a symbol. The value can be in the range 0 through 65535 and it can be
another Equate declared anywhere above or below.
THIS WORD
THIS DWORD
7
YOUTUBE : SUBSCRIBE NOW INSTA : FOLLOW NOW
Download V2V APP on Playstore for more FREE STUDY MATERIAL
Contact No : 9326050669 / 9326881428
V2V EdTech LLP | MIC (CO/IT/AIML) (22415) | Super 25 Q&A
A variable – declared with a DB, DW, or DD directive – has an address and has
space reserved at that address for it in the .COM file. But an Equate does not have
an address or space reserved for it in the .COM file.
Example:
A – Byte EQU THIS BYTE
DB 10
DD 4294967295
Buffed_ ptr EQU $ ; actually points to the next byte after the; 1024th byte in
buffer.
5. SEGMENT:
It is used to indicate the start of a logical segment. It is the name given to the
segment. Example: the code segment is used to indicate to the assembler the start
of logical segment.
6. PROC: (PROCEDURE)
It is used to identify the start of a procedure. It follows a name we give the
procedure.
After the procedure the term NEAR and FAR is used to specify the procedure
Example: SMART-DIVIDE PROC FAR identifies the start of procedure named
SMART-DIVIDE and tells the assembler that the procedure is far.
8
YOUTUBE : SUBSCRIBE NOW INSTA : FOLLOW NOW
Download V2V APP on Playstore for more FREE STUDY MATERIAL
Contact No : 9326050669 / 9326881428
V2V EdTech LLP | MIC (CO/IT/AIML) (22415) | Super 25 Q&A
5. Write classification of instruction set of 8086. Explain any one type out of
them.
Ans:
classification of instruction set of 8086
1) Arithmetic Instructions:
These instructions are used to perform arithmetic operations like addition,
subtraction, multiplication, division, etc.
ADD:
The add instruction adds the contents of the source operand to the destination
operand.
Eg. ADD AX, 0100H
ADD AX, BX
ADD AX, [SI]
ADD AX, [5000H]
ADD [5000H], 0100H
ADD 0100H
SUB: Subtract
The subtract instruction subtracts the source operand from the destination
9
YOUTUBE : SUBSCRIBE NOW INSTA : FOLLOW NOW
Download V2V APP on Playstore for more FREE STUDY MATERIAL
Contact No : 9326050669 / 9326881428
V2V EdTech LLP | MIC (CO/IT/AIML) (22415) | Super 25 Q&A
operand
and the result is left in the destination operand.
Eg. SUB AX, 0100H
SUB AX, BX
SUB AX, [5000H]
SUB [5000H], 0100H
INC: Increment
This instruction increases the contents of the specified Register or memory
location
by 1. Immediate data cannot be operand of this instruction.
Eg. INC AX
INC [BX] INC [5000H]
DEC: Decrement
The decrement instruction subtracts 1 from the contents of the specified register
or
memory location.
Eg. DEC AX
DEC [5000H]
NEG: Negate
The negate instruction forms 2’s complement of the specified destination in the
instruction. The destination can be a register or a memory location. This
instruction can
be implemented by inverting each bit and adding 1 to it.
Eg. NEG AL
AL = 0011 0101 35H Replace number in AL with its 2’s complement
AL = 1100 1011 = CBH
CMP: Compare
10
YOUTUBE : SUBSCRIBE NOW INSTA : FOLLOW NOW
Download V2V APP on Playstore for more FREE STUDY MATERIAL
Contact No : 9326050669 / 9326881428
V2V EdTech LLP | MIC (CO/IT/AIML) (22415) | Super 25 Q&A
11
YOUTUBE : SUBSCRIBE NOW INSTA : FOLLOW NOW
Download V2V APP on Playstore for more FREE STUDY MATERIAL
Contact No : 9326050669 / 9326881428
V2V EdTech LLP | MIC (CO/IT/AIML) (22415) | Super 25 Q&A
STC:
It sets the carry flag to 1.
CLC:
It clears the carry flag to 0.
CMC:
It complements the carry flag.
STD:
It sets the direction flag to 1.
If it is set, string bytes are accessed from higher memory address to lower
memory address.
CLD:
It clears the direction flag to 0.
If it is reset, the string bytes are accessed from lower memory address to higher
memory address.
12
YOUTUBE : SUBSCRIBE NOW INSTA : FOLLOW NOW
Download V2V APP on Playstore for more FREE STUDY MATERIAL
Contact No : 9326050669 / 9326881428
V2V EdTech LLP | MIC (CO/IT/AIML) (22415) | Super 25 Q&A
6. Explain memory segmentation in 8086 and list its advantages. (any two)
Ans:
Memory Segmentation:
13
YOUTUBE : SUBSCRIBE NOW INSTA : FOLLOW NOW
Download V2V APP on Playstore for more FREE STUDY MATERIAL
Contact No : 9326050669 / 9326881428
V2V EdTech LLP | MIC (CO/IT/AIML) (22415) | Super 25 Q&A
Advantages of Segmentation:
The size of address bus of 8086 is 20 and is able to address 1 Mbytes ( ) of physical
memory.
The compete 1 Mbytes memory can be divided into 16 segments, each of 64
Kbytes size.
It allows memory addressing capability to be 1 MB.
It gives separate space for Data, Code, Stack and Additional Data segment as
Extra segment size.
The addresses of the segment may be assigned as 0000H to F000H
respectively.
The offset values are from 00000H to FFFFFH
Segmentation is used to increase the execution speed of computer system so that processor
can able to fetch and execute the data from memory easily and fast.
14
YOUTUBE : SUBSCRIBE NOW INSTA : FOLLOW NOW
Download V2V APP on Playstore for more FREE STUDY MATERIAL
Contact No : 9326050669 / 9326881428
V2V EdTech LLP | MIC (CO/IT/AIML) (22415) | Super 25 Q&A
7. With the neat sketches demonstrate the use of re-entrant and recursive
procedure.
Ans:
Reentrant Procedure:
A reentrant procedure is one in which a single copy of the program code can be shared by
multiple users during the same period of time. Re-entrance has two key aspects: The
program code cannot modify itself and the local data for each user must be stored
separately.
Recursive procedures:
An active procedure that is invoked from within itself or from within another
active procedure is a recursive procedure. Such an invocation is
called recursion. A procedure that is invoked recursively must have the
RECURSIVE attribute specified in the PROCEDURE statement.
15
YOUTUBE : SUBSCRIBE NOW INSTA : FOLLOW NOW
Download V2V APP on Playstore for more FREE STUDY MATERIAL
Contact No : 9326050669 / 9326881428
V2V EdTech LLP | MIC (CO/IT/AIML) (22415) | Super 25 Q&A
16
YOUTUBE : SUBSCRIBE NOW INSTA : FOLLOW NOW
Download V2V APP on Playstore for more FREE STUDY MATERIAL
Contact No : 9326050669 / 9326881428
V2V EdTech LLP | MIC (CO/IT/AIML) (22415) | Super 25 Q&A
17
YOUTUBE : SUBSCRIBE NOW INSTA : FOLLOW NOW
Download V2V APP on Playstore for more FREE STUDY MATERIAL
Contact No : 9326050669 / 9326881428
V2V EdTech LLP | MIC (CO/IT/AIML) (22415) | Super 25 Q&A
1 1 None
OR
If the trap flag is set, the 8086 will automatically do a type-1 interrupt after each instruction
executes. When the 8086 does a type-1 interrupt, it pushes the flag register on the stack.
OR
The instructions to set the trap flag are:
PUSHF ; Push flags on stack
18
YOUTUBE : SUBSCRIBE NOW INSTA : FOLLOW NOW
Download V2V APP on Playstore for more FREE STUDY MATERIAL
Contact No : 9326050669 / 9326881428
V2V EdTech LLP | MIC (CO/IT/AIML) (22415) | Super 25 Q&A
[Link] any four instructions from the Bit manipulation instructions of 8086 &
List assembly language programming tools.
Ans:
Bit Manipulation Instructions
These instructions are used to perform operations where data bits are involved,
i.e. operations like logical, shift, etc.
Following is the list of instructions under this group − Instructions to perform
logical operation
NOT − Used to invert each bit of a byte or word.
AND − Used for adding each bit in a byte/word with the corresponding bit in another
byte/word.
OR − Used to multiply each bit in a byte/word with the corresponding bit in another
byte/word.
XOR − Used to perform Exclusive-OR operation over each bit in a byte/word with the
corresponding bit in another byte/word.
Assembly language programming tools:
1. Editors
2. Assembler
3. Linker
4. Debugger.
19
YOUTUBE : SUBSCRIBE NOW INSTA : FOLLOW NOW
Download V2V APP on Playstore for more FREE STUDY MATERIAL
Contact No : 9326050669 / 9326881428
V2V EdTech LLP | MIC (CO/IT/AIML) (22415) | Super 25 Q&A
CLD
REP MOVSB
The above section of a program will cause the following string operation
ES: [DI] ← DS: [SI] SI ← SI + I
DI ← DI + I CX ← CX – 1
to be executed 23H times (as CX = 23H) in auto incrementing mode (as DF is cleared).
REPZ/REPE (Repeat while zero/Repeat while equal)
20
YOUTUBE : SUBSCRIBE NOW INSTA : FOLLOW NOW
Download V2V APP on Playstore for more FREE STUDY MATERIAL
Contact No : 9326050669 / 9326881428
V2V EdTech LLP | MIC (CO/IT/AIML) (22415) | Super 25 Q&A
[Link] the function of READY & INTR pin of 8086 & State the use of and CMC
instructions of 8086.
Ans:
Ready:
It is used as acknowledgement from slower I/O device or memory.
It is Active high signal, when high; it indicates that the peripheral device is ready to transfer
data.
INTR
This is a level triggered interrupt request input, checked during last clock cycle of each
instruction to determine the availability of request. If any interrupt request is occurred, the
processor enters the interrupt acknowledge cycle.
CMC – This instruction is used to Complement Carry Flag.
This instruction exchanges the contents of a register with the contents of another register or
memory location.
Example:
XCHG AX, BX ; Exchange the word in AX with word in BX.
21
YOUTUBE : SUBSCRIBE NOW INSTA : FOLLOW NOW
Download V2V APP on Playstore for more FREE STUDY MATERIAL
Contact No : 9326050669 / 9326881428
V2V EdTech LLP | MIC (CO/IT/AIML) (22415) | Super 25 Q&A
22
YOUTUBE : SUBSCRIBE NOW INSTA : FOLLOW NOW
Download V2V APP on Playstore for more FREE STUDY MATERIAL
Contact No : 9326050669 / 9326881428
V2V EdTech LLP | MIC (CO/IT/AIML) (22415) | Super 25 Q&A
EQU (EQUATE)
23
YOUTUBE : SUBSCRIBE NOW INSTA : FOLLOW NOW
Download V2V APP on Playstore for more FREE STUDY MATERIAL
Contact No : 9326050669 / 9326881428
V2V EdTech LLP | MIC (CO/IT/AIML) (22415) | Super 25 Q&A
EQU is used to give a name to some value or symbol. Each time the assembler finds the given
name in the program, it replaces the name with the value or symbol you equated with that
name.
Example
Data SEGMENT Num1 EQU 50H
Num2 EQU 66H
Data ENDS
Numeric value 50H and 66H are assigned to Num1 and Num2.
ASSUME
ASSUME tells the assembler what names have been chosen for Code, Data Extra and Stack
segments. Informs the assembler that the register CS is to be initialized with the address allotted
by the loader to the label CODE and DS is similarly initialized with the address of label DATA.
OFFSET
OFFSET is an operator, which tells the assembler to determine the offset or displacement of a
named data item (variable), a procedure from the start of the segment, which contains it.
Example MOV BX;
OFFSET PRICES;
It will determine the offset of the variable PRICES from the start of the segment in which
PRICES is defined and will load this value into BX.
SEGMENT
The SEGMENT directive is used to indicate the start of a logical segment. Preceding the
SEGMENT directive is the name you want to give the segment.
For example, the statement CODE SEGMENT indicates to the assembler the start of a logical
segment called CODE. The SEGMENT and ENDS directive are used to “bracket” a logical
segment containing code of data
24
YOUTUBE : SUBSCRIBE NOW INSTA : FOLLOW NOW
Download V2V APP on Playstore for more FREE STUDY MATERIAL
Contact No : 9326050669 / 9326881428
V2V EdTech LLP | MIC (CO/IT/AIML) (22415) | Super 25 Q&A
Example
LEA SI, Source LEA DI, destination
CLD
MOV CX, 04H REP MOVSB
25
YOUTUBE : SUBSCRIBE NOW INSTA : FOLLOW NOW
Download V2V APP on Playstore for more FREE STUDY MATERIAL
Contact No : 9326050669 / 9326881428
V2V EdTech LLP | MIC (CO/IT/AIML) (22415) | Super 25 Q&A
Example
LEA SI, Source LEA DI, destination
CLD
MOV CX, 100 REPE CMPSB
Example
LEA DI, destination MOV Al, 0DH
MOV CX, 80H CLD
REPNE SCASB
5] LODS/LODSB/LODSW:
26
YOUTUBE : SUBSCRIBE NOW INSTA : FOLLOW NOW
Download V2V APP on Playstore for more FREE STUDY MATERIAL
Contact No : 9326050669 / 9326881428
V2V EdTech LLP | MIC (CO/IT/AIML) (22415) | Super 25 Q&A
Load String byte into AL or Load String word into AX. Syntax:
LODS/LODSB/LODSW
Operation: AL/AX < ------ DS: [SI]
IT copies a byte or word from string pointed by SI in data segment into AL or [Link]
may contain the counter and DF may be either 0 or 1
Example
LEA SI, destination CLD
LODSB
27
YOUTUBE : SUBSCRIBE NOW INSTA : FOLLOW NOW
Download V2V APP on Playstore for more FREE STUDY MATERIAL
Contact No : 9326050669 / 9326881428
V2V EdTech LLP | MIC (CO/IT/AIML) (22415) | Super 25 Q&A
28
YOUTUBE : SUBSCRIBE NOW INSTA : FOLLOW NOW
Download V2V APP on Playstore for more FREE STUDY MATERIAL
Contact No : 9326050669 / 9326881428
V2V EdTech LLP | MIC (CO/IT/AIML) (22415) | Super 25 Q&A
8. ES – Extra Segment – additional base address for memory variables in extra segment.
9. BP – Base Pointer – contains an assumed offset from the SS register.
10. SP – Stack Pointer – Contains the offset of the top of the stack.
11. SI – Source Index – Used in string movement instructions. The source string is pointed
to by the SI register.
12. DI – Destination Index – acts as the destination for string movement instructions
13. IP – Instruction Pointer – contains the offset of the next instruction to be executed.
14. Flag Register – individual bit positions within register show status of CPU or results
of arithmetic operations.
Every step in the algorithm is converted into program statement using correct and
efficient instructions or group of instructions.
31
YOUTUBE : SUBSCRIBE NOW INSTA : FOLLOW NOW
Download V2V APP on Playstore for more FREE STUDY MATERIAL
Contact No : 9326050669 / 9326881428
V2V EdTech LLP | MIC (CO/IT/AIML) (22415) | Super 25 Q&A
1. JZ/JE Label
Transfer execution control to address ‘Label’, if ZF=1.
2. JNZ/JNE Label
Transfer execution control to address ‘Label’, if ZF=0
3. JS Label
Transfer execution control to address ‘Label’, if SF=1.
4. JNS Label
Transfer execution control to address ‘Label’, if SF=0.
5. JO Label
Transfer execution control to address ‘Label’, if OF=1.
6. JNO Label
Transfer execution control to address ‘Label’, if OF=0.
7. JNP Label
Transfer execution control to address ‘Label’, if PF=0.
8. JP Label
Transfer execution control to address ‘Label’, if PF=1.
9. JB Label
Transfer execution control to address ‘Label’, if CF=1.
10. JNB Label
Transfer execution control to address ‘Label’, if CF=0.
11. JCXZ Label
Transfer execution control to address ‘Label’, if CX=0
Conditional LOOP Instructions.
12. LOOP Label :
Decrease CX, jump to label if CX not zero.
32
YOUTUBE : SUBSCRIBE NOW INSTA : FOLLOW NOW
Download V2V APP on Playstore for more FREE STUDY MATERIAL
Contact No : 9326050669 / 9326881428
V2V EdTech LLP | MIC (CO/IT/AIML) (22415) | Super 25 Q&A
Decrease CX, jump to label if CX not zero and Not Equal (ZF = 0).
33
YOUTUBE : SUBSCRIBE NOW INSTA : FOLLOW NOW
Download V2V APP on Playstore for more FREE STUDY MATERIAL
Contact No : 9326050669 / 9326881428
V2V EdTech LLP | MIC (CO/IT/AIML) (22415) | Super 25 Q&A
5. Indexed: In this addressing mode offset of the operand is stored in one of the
index register. DS and ES are the default segments for index registers SI and DI
respectively
34
YOUTUBE : SUBSCRIBE NOW INSTA : FOLLOW NOW
Download V2V APP on Playstore for more FREE STUDY MATERIAL
Contact No : 9326050669 / 9326881428
V2V EdTech LLP | MIC (CO/IT/AIML) (22415) | Super 25 Q&A
7. Based Indexed: In this addressing mode the effective address of the data is
formed by adding the content of a base register (any one of BX or BP) to the
content of an index register (any one of SI or DI). The default segment register
may be ES or DS.
35
YOUTUBE : SUBSCRIBE NOW INSTA : FOLLOW NOW
Download V2V APP on Playstore for more FREE STUDY MATERIAL
Contact No : 9326050669 / 9326881428
V2V EdTech LLP | MIC (CO/IT/AIML) (22415) | Super 25 Q&A
VIMP PROGRAMS
1. Write ALP for addition of two 8 bit numbers. Assume suitable data.
Ans:
.Model small
.Data
NUM DB 12H
.Code
START:
MOV AX, @DATA
MOV DS,AX
MOV AL, NUM
MOV AH,13H
ADD AL,AH
MOV AH, 4CH
INT 21H
ENDS
END
36
YOUTUBE : SUBSCRIBE NOW INSTA : FOLLOW NOW
Download V2V APP on Playstore for more FREE STUDY MATERIAL
Contact No : 9326050669 / 9326881428
V2V EdTech LLP | MIC (CO/IT/AIML) (22415) | Super 25 Q&A
DATA SEGMENT
ARRAY DW F423H,6523H,B658H,7612H, 2300H,1559H
COUNT DW 06H
POS_COUNT DB ?
NEG_COUNT DB ?
DATA ENDS
END START
37
YOUTUBE : SUBSCRIBE NOW INSTA : FOLLOW NOW
Download V2V APP on Playstore for more FREE STUDY MATERIAL
Contact No : 9326050669 / 9326881428
V2V EdTech LLP | MIC (CO/IT/AIML) (22415) | Super 25 Q&A
LOOP UP
CODE ENDS
DATA SEGMENT
DATABLOCK DB 45H,02H,88H,29H,05H,45H,78H,
95H,62H,30H
RESULT_LSB DB 0
RESULT_MSB DB 0
DATA ENDS
END
38
YOUTUBE : SUBSCRIBE NOW INSTA : FOLLOW NOW
Download V2V APP on Playstore for more FREE STUDY MATERIAL
Contact No : 9326050669 / 9326881428
V2V EdTech LLP | MIC (CO/IT/AIML) (22415) | Super 25 Q&A
CODE SEGMENT
ASSUME CS:CODE,DS:DATA
START: MOV AX,DATA
MOV DS,AX
MOV DX,0000H
MOV CX,COUNT
MOV SI, OFFSET ARRAY1
NEXT: MOV AX,[SI]
ROR AX,01H
JC ODD_1
INC DL
JMP COUNT_IT
ODD_1 : INC DH
COUNT_IT: INC SI
INC SI
LOOP NEXT
MOV ODD_COUNT,DH
MOV EVENCNT,DL
MOV AH,4CH
INT 21H
CODE ENDS
DATA SEGMENT
ARRAY1 DW F423H, 6523H, B658H, 7612H, 9875H,
2300H, 1559H, 1000H, 4357H, 2981H
COUNT DW 0AH
ODD_COUNT DB ?
EVENCNT DB ?
DATA ENDS
END START
39
YOUTUBE : SUBSCRIBE NOW INSTA : FOLLOW NOW
Download V2V APP on Playstore for more FREE STUDY MATERIAL
Contact No : 9326050669 / 9326881428
V2V EdTech LLP | MIC (CO/IT/AIML) (22415) | Super 25 Q&A
DATA SEGMENT
NUM1 DB 10H
NUM2 DB 20H
NUM3 DB 30H
NUM4 DB 40H
RESULT DB?
DATA ENDS
40
YOUTUBE : SUBSCRIBE NOW INSTA : FOLLOW NOW
Download V2V APP on Playstore for more FREE STUDY MATERIAL
Contact No : 9326050669 / 9326881428
V2V EdTech LLP | MIC (CO/IT/AIML) (22415) | Super 25 Q&A
CODE SEGMENT
ASSUME CS: CODE,DS:DATA
START:MOV AX,DATA
MOV DS,AX
MOV AL,NUM1
MOV BL,NUM2
CALL SUM
MOV CL,AL
MOV AL, NUM3
MOV BL,NUM4
CALL SUM
MUL CL
MOV RESULT,AX
MOV AH,4CH
INT 21H
CODE ENDS
END
DATA SEGMENT
NO1 DB 05H
NO2 DB 04H
MULTIPLE DW ?
DATA ENDS
41
YOUTUBE : SUBSCRIBE NOW INSTA : FOLLOW NOW
Download V2V APP on Playstore for more FREE STUDY MATERIAL
Contact No : 9326050669 / 9326881428
V2V EdTech LLP | MIC (CO/IT/AIML) (22415) | Super 25 Q&A
CODE SEGMENT
ASSUME CS: CODE,DS:DATA
START:MOV AX,DATA
MOV DS,AX
PRODUCT NO1,NO2
MOV MULTIPLE, AX
MOV AH,4CH
INT 21H
CODE ENDS
END
42
YOUTUBE : SUBSCRIBE NOW INSTA : FOLLOW NOW
Download V2V APP on Playstore for more FREE STUDY MATERIAL
Contact No : 9326050669 / 9326881428
V2V EdTech LLP | MIC (CO/IT/AIML) (22415) | Super 25 Q&A
CODE ENDS
END START
INT 21H
CODE ENDS
43
YOUTUBE : SUBSCRIBE NOW INSTA : FOLLOW NOW
Download V2V APP on Playstore for more FREE STUDY MATERIAL
Contact No : 9326050669 / 9326881428
V2V EdTech LLP | MIC (CO/IT/AIML) (22415) | Super 25 Q&A
MOV al,a
MUL al
MOV bl,al
MOV al,b
MUL al
ADD al,bl
ENDM
.DATA
x DB 02H
y DB 03H
p DB DUP()
.CODE
START:
MOV ax,data
MOV ds,ax
PROG x, y
MOV p,al
MOV ah,4Ch
44
YOUTUBE : SUBSCRIBE NOW INSTA : FOLLOW NOW
Download V2V APP on Playstore for more FREE STUDY MATERIAL
Contact No : 9326050669 / 9326881428
V2V EdTech LLP | MIC (CO/IT/AIML) (22415) | Super 25 Q&A
Int 21H
END
CODE SEGMENT
START:
ASSUME CS:CODE,DS:DATA
MOV DX,DATA
MOV DS,DX
MOV CX,04H
MOV SI ,OFFSET
ARRAY MOV AL,[SI]
UP: INC SI
CMP AL,[SI]
JNC NEXT
MOV AL,[SI]
NEXT: DEC CX
JNZ UP
MOV LARGEST,AL
MOV AX,4C00H
INT 21H
CODE ENDS
END START
LOOP UP
MOV AH,4CH
INT 21H
MOV AL,[SI]
ADD RESULT, AL
JNC NEXT
INC CARRY
NEXT: RET
SUM ENDP
CODE ENDS
END START
LEA DI,REV
ADD DI,0FH
UP:MOV AL,[SI]
MOV [DI],AL
INC SI
DEC DI
LOOP UP
MOV AH,4CH
INT 21H
CODE ENDS
END START
Flowchart:
48
YOUTUBE : SUBSCRIBE NOW INSTA : FOLLOW NOW
Download V2V APP on Playstore for more FREE STUDY MATERIAL
Contact No : 9326050669 / 9326881428
V2V EdTech LLP | MIC (CO/IT/AIML) (22415) | Super 25 Q&A
49
YOUTUBE : SUBSCRIBE NOW INSTA : FOLLOW NOW
Download V2V APP on Playstore for more FREE STUDY MATERIAL
Contact No : 9326050669 / 9326881428
V2V EdTech LLP | MIC (CO/IT/AIML) (22415) | Super 25 Q&A
XCHG AL,[SI+1]
XCHG AL,[SI]
DOWN:ADD SI,1
LOOP STEP
DEC BL
JNZ STEP1
MOV AH,4CH
INT 21H
CODE ENDS
END START
50
YOUTUBE : SUBSCRIBE NOW INSTA : FOLLOW NOW
Download V2V APP on Playstore for more FREE STUDY MATERIAL
Contact No : 9326050669 / 9326881428