Thursday, 12 November 2020

Computer Organization Lab Viva Questions with Answer


1.What is a Microprocessor?

Microprocessor is a CPU fabricated on a single chip, program-controlled device, which fetches the instructions from memory, decodes and executes the instructions.

2. What is Instruction Set?

 It is the set of the instructions that the Microprocessor can execute.

3. What is Bandwidth ?

 The number of bits processed by the processor in a single instruction.

4. What is Clock Speed ?

Clock speed is measured in the MHz and it determines that how many instructions a processor can processed. The speed of the microprocessor is measured in the MHz or GHz. 

5. What are the features of Intel 8086 ?

Features:

•              Released by Intel in 1978

•              Produced from 1978 to 1990s

•              A 16-bit microprocessor chip.

•              Max. CPU clock rate:5 MHz to 10 MHz

•              Instruction set:  x86-16

•              Package: 40 pin DIP

•              16-bit Arithmetic Logic Unit

•              16-bit data bus  (8088 has 8-bit data bus)

•              20-bit address bus - 220 = 1,048,576 = 1 meg

6. What is Logical Address:?

•         A memory address on the 8086 consists of two numbers, usually written in hexadecimal and separated by a colon, representing the segment and the offset. This combination of segment and offset is referred to as a logical address

•         Logical address=segment: offset

7. What is The Effective Address:

•         In general, memory accesses take the form of the following example:

•         Mov ax, [baseReg + indexReg + constant]

•         This example copies a word sized value into the register AX.

•         Combined, the three parameters in brackets determine what is called the effective address, which is simply the offset referenced by the instruction

8. What is Physical Address?

Physical memory address pointed by SEGMENT:OFFSET pair is calculated as:

Physical address = (<Segment Addr> * 10) + <Offset Addr>

9.What are the flags in 8086?

In 8086 Carry flag, Parity flag, Auxiliary carry flag, Zero flag, Overflow flag, Trace flag, Interrupt flag, Direction flag, and Sign flag.


10.Why crystal is a preferred clock source?

Because of high stability, large Q (Quality Factor) & the frequency that doesn’t drift with aging. Crystal is used as a clock source most of the times.

11.What is Tri-state logic?

Three Logic Levels are used and they are High, Low, High impedance state. The high and low are normal logic levels & high impedance state is electrical open circuit conditions. Tri-state logic has a third line called enable line.


12.What happens when HLT instruction is executed in processor?

The Micro Processor enters into Halt-State and the buses are tri-stated.


13.What is Program counter?

Program counter holds the address of either the first byte of the next instruction to be fetched for execution or the address of the next byte of a multi byte instruction, which has not been completely fetched. In both the cases it gets incremented automatically one by one as the instruction bytes get fetched. Also Program register keeps the address of the next instruction.

14.What is 1st / 2nd / 3rd / 4th generation processor?

The processor made of PMOS / NMOS / HMOS / HCMOS technology is called 1st / 2nd / 3rd / 4th generation processor, and it is made up of 4 / 8 / 16 / 32 bits.

15.How many bit combinations are there in a byte?

Byte contains 8 combinations of bits.

16.Have you studied buses? What types of Buses are there?

There are three types of buses.

Address bus: This is used to carry the Address to the memory to fetch either Instruction or Data.

Data bus : This is used to carry the Data from the memory.

Control bus : This is used to carry the Control signals like RD/WR, Select etc.

17.What is the Maximum clock frequency in 8086?

An 5 Mhz is the Maximum clock frequency in 8086.


18.What is meant by Maskable interrupts?

An interrupt that can be turned off by the programmer is known as Maskable interrupt.


19.What is Non-Maskable interrupts?

An interrupt which can be never be turned off (ie. disabled) is known as Non-Maskable interrupt


20.What are the different functional units in 8086?

Bus Interface Unit and Execution unit, are the two different functional units in 8086.


21.What are the various segment registers in 8086?

Code, Data, Stack, Extra Segment registers in 8086.


22.What does EU do?

Execution Unit receives program instruction codes and data from BIU, executes these instructions and store the result in general registers.


23.what is the principle of stack used in 8086?

FIFO (First In First Out) stack is used in 8086.In this type of Stack the first stored information is retrieved first.


24.What are the flags in 8086?

In 8086 Carry flag, Parity flag, Auxiliary carry flag, Zero flag, Overflow flag, Trace flag, Interrupt flag, Direction flag, and Sign flag.


25.What is SIM and RIM instructions?

SIM is Set Interrupt Mask. Used to mask the hardware interrupts.

RIM is Read Interrupt Mask. Used to check whether the interrupt is Masked or not.


26.What are the different types of Addressing Modes?

A:- There are 12 different types of Addressing Modes.They are:-

<1> Immediate:-The Immediate data is a part of instruction, and appears in the form of successive bytes.


<2> Direct:-A 16-bit memory address(offset) is directly specified in the instruction as a part of it.


<3> Register:-Data is stored in a register and it is referred using the particular register (except IP).


<4> Register Indirect:-The address of the memory location which contains data or operand is determined in an indirect way.


<5> Indexed:-offset of the operand is stored in one of the index registers.


<6> Register Relative:-The data is available at an eefective address formed by adding an 8-bit or 16-bit displacement with the content of any one of the registers BX,BP,SI and DI in the default (either DS or ES) segment.


<7> Based Indexed:-The effective address of the data is formed,in this addressing mode,by adding content of a base register to the content of an index register.

<8> Relative Based Indexed:- The effective address is formed by adding an 8 or 16-bit displacement with the sum of contents of any one of the base registers and any one of the index registers,in the default segment.


<9> Intrasegment Direct Mode:-In this mode,the address to which the control is to bve transferred lies in the segment in which the control transfer instruction lies and appears directly in the instruction as an immediate displacement value.


<10> Intrasegment Indirect Mode:-In this mode,the displacement to which the control is to be transferred,is in the same segment in whgich the control transfer instruction lies,but it is passed to the instruction indirectly.

<11> Intersegment Direct:-In this mode,the address to which the control is to be transferred is in a different segment.

<12> Intersegment Indirect:-In this mode,the address to which the control is to be transferred lies in a different segment and it is passed to the instruction indirectly sequentially.


27.What are the General Data Registers & their uses?

A:- The Registers AX,BX,CX,DX are the general Purpose 16-bit registers.AX register as 16-bit accumulator.BX register is used as an offset Storage.CX register is used as default or implied counter.Dx register is used as an implicit operand or destination in case of a few instructions.

28.What are Segment Registers & their uses?

A:-There are 4 Segment Registers Code Segment(CS),Data Segment(DS),Extra Segment(ES) & Stack Segment(SS) registers.CS is used for addressing memory locationin code.DS is used to points the data.ES refers to a segment which is essentially in another data segment.SS is used fopr addressing stack segment of memory.


29.What are Flag registers?

A:-Divided into 2 parts:-Condition code or status flags and machine control flags.

S-Sign Flag:-Is to set when the result of any computation is negative.

Z-Zero Flag:-Is to set if the result of the computation or comparision performed by the previous instruction is zero.

C-Carry Flag:-Is set when there is carry out of MSB in case of addition or a borrow in case of subtraction.

T-Trap Flag:-Is set,the processor enters the single step execution mode.

I-Interrupt Flag:-Is set,the maskable interrupts are recognised by the CPU.

D-Direction Flag:-Is set for autoincrementing or autodecrementing mode in string manipulation instructions.

AC-Auxiliary Carry Flag:-Is set if there is a carry from the lowest nibble during addition or borrow for the lowest nibble.

O-Overflow Flag:-Is setif the result of a signed operation is large enough to be accommodated in a destination register.


30.What does the 8086 Architecture contain?

A:-The complete architecture of 8086 can be divided into 2types :-Bus Interface Unit(BIU) & Execution Unit.

The BIU contains the circuit for physical address calculations and a precoding instruction byte queue & it makes the bus signals available for external interfacing of the devices.

The EU contains the register set of 8086 except segment registers and IP.It has a 16-bit ALU,able to perform arithmetic and Logic operations.

31) What are Data Copy/Transfer Instructions?

A:- Mov

Push

Pop

Xchg

In

Out

Xlat

Lea

Lds/Les

Lahf

Sahf

Pushf

Popf


32. What are Machine Control Instructions?

A:- Nop

Hlt

Wait

Lock


33) What are Flag Manipulation Instructions?

A:- Cld

Std

Cli

Sti


34) What are String Instructions?

A:- Rep

MovSB/MovSW

  Cmps

  Scas

  Lods

Stos

35.What is an Interrupt?

Def:-   Interrupt is an external signal that causes a microprocessor to jump to a specific subroutine.

An interrupt operation suspends execution of a program so that the system can take special action.The interrupt routine executes and normally returns control to the interrupted procedure, which then resumes execution.BIOS handles Int 00H-1FH, whereas DOS handles INT 20H-3FH.

36. What is an Opcode?

A:-The part of the instruction that specifies the operation to be performed is called the Operation code or Op code.


37.What is an Operand?

A:-The data on which the operation is to be performed is called as an Operand.


38.Explain the difference between a JMP and CALL instruction?

A:-A JMP instruction permantely changes the program counter.

A CALL instruction leaves information on the stack so that the original program execution sequence can be resumed.


39.What is meant by Polling?

A:- Polling or device Polling is a process which idenfies the device that has interrupted the microprocessor.

40.What is an Instruction?

A:-An instruction is a binary pattern enetered through an input device to command the microprocessor to perform that specific function.

41.What is Assembler?

A:-The assembler translates the assembly language program text which is given as input to the assembler to their binary equivalents known as object code.

The time required to translate the assembly code to object code is called access time.The assembler checks for syntax errors&displays them before giving the object code.


42.Define Pipelining?

A:-In 8086,to speedup the execution program,the instructions fetching and execution of instructions are overlapped each other.this is known as Pipelining.


43.What is the use of HLDA?

A:-HLDA is the acknowledgment signal for HOLD. It indicates whether the HOLD signal is received or not.

HOLD and HLDA are used as the control signals for DMA operations.


44. Explain about "LEA"?

A:-LEA(Load Effective Address) is used for initializing a register with an offset address.

A common use for LEA is to intialize an offset in BX, DI or SI for indexing an address in memory.

An equivalent operation to LEA is MOV with the OFFSET operator, which generates slightly shorter machine code.


45. Difference between "Shift" and "Rotate".

A:-Shift and Rotate commands are used to convert a number to another form where some bits are shifted or rotated.

A rotate instruction is a closed loop instruction.That is,the data moved out at one end is put back in at the other end.

The shift instruction loses the data that is moved out of the last bit locations.

Basic difference between shift and rotate is shift command makes "fall of " bits at the end of the register.

Where rotate command makes "wrap around" at the end of the register.


46.Difference between JMP and JNC?

A:-JMP is Unconditional Branch.

JNC is Conditional Branch.


47.List the String Manipulation Commands?

A:-REP=Repeat.

MOVS=Move Byte/Word

CMPS=Compare Byte/Word

SCAS=Scan Byte/Word

LODS=Load byte/Wd to AL/AX

STOS=Stor Byte/Wd from AL/A

 


48.What is the main use of ready pin?

A:-READY is used by the microprocessor to check whether a peripheral is ready to accept or transfer data.

A peripheral may be a LCD display or analog to digital converter or any other.

These peripherals are connected to microprocessor using the READY pin.

If READY is high then the periphery is ready for data transfer. If not the microprocessor waits until READY goes high.


49.Explain about Direction Flag?

A:-This is used by string manipulation instructions.

If this flag bit is 0 , the string is processed beginning from the lowest to the highest address,i.e.,.Autoincrement mode.

Otherwise,the string is processed from the highest towards the lowest address,i.e.,.Autodecrementing mode.


50.What are the basic units of a microprocessor ?

The basic units or blocks of a microprocessor are ALU, an array of registers and control unit.


 



Wednesday, 1 April 2020

One Course,One class can change everything if you are interested ..........

Good morning all,

"Even the greatest was once a beginner. Don't be afraid to take that first step even if things seem difficult in the beginning. That's only the initial impression. The important thing is not to retreat, you have to master yourself"

I am writing this post to share some of the useful MOOC's sites which will really offer the best self directed learning platform for the students and professionals from various branches.

I am going to share the 25 MOOS's links where most of the courses will provide Free Certificates upon course completion and few sites even will provide Diploma degrees as well, so I wish everyone to go through the below links and get the maximum benefit from these courses. Which are really useful for your career development and enrich your technical skills.


CISCO- https://www.netacad.com/
Linkedin - https://www.linkedin.com/learning/    
Googledigitalgarage- https://learndigital.withgoogle.com/digitalgarage
Canvas- https://www.mooc-list.com/initiative/canvas-network
Oxford Home Study -https://www.oxfordhomestudy.com/free-online-courses-with-certificates
Microsoft Learn- https://docs.microsoft.com/en-us/learn/
Coursera- https://www.coursera.org/courses?query=free
Bitdegree- https://www.bitdegree.org/free-certifications-online
Pluralsight- https://www.pluralsight.com/
Facebook Blueprint- https://www.facebookblueprint.com/student/catalog
Edx - https://www.edx.org/
Coursera- https://www.coursera.org/
Saylor.org- https://www.saylor.org/
Udacity - https://in.udacity.com/
Udemy - https://www.udemy.com/
Shaw Academy- https://www.shawacademy.com/
Skillsahre - https://www.skillshare.com/
Harvard University - https://online-learning.harvard.edu/
Futurelearn - https://www.futurelearn.com/
Future Learn - https://www.futurelearn.com/
Tuts Plus - https://tutsplus.com/
Open Culture - http://www.openculture.com
Khanacademy - https://www.khanacademy.org/
Alison - https://alison.com/
Open Learn - http://www.open.edu/openlearn/



I hope these links are useful for the students those who wants to jump-start their career in the industry.

Sandeep Ravikanti
Assistant Professor,
CSE,MCET.

Wednesday, 18 March 2020

LED DISPLAY INTERFACE



Aim:
To display 8086 number in a four seven segment Common Anode LED display.
Hardware and Software Required:
8086 kit, LED Display Unit
Hardware Description:
Seven segment displays are important display units in Electronics and widely used to display numbers from 0 to 9. It can also display some character alphabets like A,B,C,H,F,E etc


There are two types of 7 segment displays: Common Anode and Common Cathode:
Common Anode: In this all the Negative terminals (cathode) of all the 8 LEDs are connected together (see diagram below), named as COM. And all the positive terminals are left alone.
Common Cathode: In this all the positive terminals (Anodes) of all the 8 LEDs are connected together, named as COM. And all the negative thermals are left alone.




A table has been given below for all the numbers while using Common Anode 7 segment.
Digit to Display
h g f e d c b a
Hex code
0
11000000
C0
1
11111001
F9
2
10100100
A4
3
10110000
B0
4
10011001
99
5
10010010
92
6
10000010
82
7
11111000
F8
8
10000000
80
9
10010000
90

Code:

                         OUTPUT 2500AD
                         ORG 2000H
         
                         MOV DX,FFE6H            ;Configure all 8255 ports
                         MOV AL,80H              ;as output.
                         OUT DX,AL

         LOOP4:  MOV SI,2100H            ;Initialise pointer
          
         LOOP3:  MOV CH,04H              ;4 charecters/group
         LOOP2:  MOV BL,08H              ;8 segments/charecter

                        MOV AL,[SI]             ;get the display code
                        INC SI                  ;Increment pointer
         LOOP1: ROL AL,1                ;get 1 data bit
                MOV DX,FFE2H
                OUT DX,AL               ;o/p bit to portb
                MOV AH,AL
                MOV AL,01H              ;o/p clock to
                MOV DX,FFE4H            ;shift register
                OUT DX,AL
                DEC AL
                OUT DX,AL
                MOV AL,AH
                DEC BL                  ;all bits over?
                JNZ LOOP1               ;no,continue
                DEC CH                  ;all charecters over?
                JNZ LOOP2               ;no,continue                              
                CALL DELAY
                                        ;all groups over?
                ;JNZ LOOP3               ;no,continue
                JMP SHORT LOOP4

DELAY:          MOV CX,0FFFFH
XX:                 DEC CX        
                              JNZ XX
                RET

;Display code table

                ORG 2100H
        STRING:  DB 080H,0C0H,080H,080H
              
                END



Traffic Light Interface





Program
2.TRAFFIC  LIGHTS

; TRAFFIC LIGHT CONTROLLER INTERFACE
; The interface is connected over J4 of of trainer
; Traffic system moves from one state to other after a fixed delay
; This program starts at 2000H location






   OUTPUT  2500AD

        ORG     2000H
START:  MOV     AL,80H                 ; Initialisation of 8255 Mode 0
        MOV     DX,0FFE6H
        OUT     DX,AL                  ; All ports as o/p ports
AGAIN:  MOV     SI,2038H               ; Table of port values
NEXTST: MOV     AL,[SI]
        MOV     DX,0FFE0H
        OUT     DX,AL                  ; PortA value
        INC     SI
        ADD     DX,2
        MOV     AL,[SI]
        OUT     DX,AL                  ; PortB value
        INC     SI
        ADD     DX,2
        MOV     AL,[SI]
        OUT     DX,AL                  ; PortC value
        INC     SI
        CALL    DELAY                  ; Calling Delay routine
        CMP     SI,2044H               ; Checking for the end of the data values
        JNZ     NEXTST
        JMP     AGAIN
DELAY:  MOV     CX,0FFH                ; Delay routine
DLY5:   PUSH    CX
        MOV     CX,03FFH
DLY10:  NOP
        LOOP    DLY10
        POP     CX
        LOOP    DLY5
        RET



        ORG     2038H
        PORTVALUES:     DB      88H,83H,F2H               
                                      DB      38H,88H,F4H             
                                      DB      83H,88H,F8H              
                                      DB      88H,38H,F1H                
                                      DB      00H             
                     

STEPPER MOTOR INTERFACING




Program:


                OUTPUT 2500AD
                ORG 2000H
                MOV AX,0000H            
                 MOV AL,80H                
                MOV DX,0FFE6H          
                OUT DX,AL
                MOV  AL,88H            
                MOV  DX,0FFE0H  
LOOP:      OUT DX,AL
                  CALL  DELAY
                               
                  RCR  AL,1
                  JMP SHORT LOOP
DELAY:    MOV  CX,1500H           
SS:           LOOP SS
                RET
                END

Computer Organization Lab Manual Programs-Cycle:1



PROGRAM 1: 8 BIT ADDITION

ADDRESS

OPCODE

LABEL

MNEMONIC

OPERANDS

3000


MOV
CX,0000
3001




3002




3003


MOV
SI,2100
3004





3005




3006


MOV
AL,[SI]
3007





3008


INC
SI
3009


MOV
BL,[SI]
300A




300B


ADD
AL,BL
300C




300D


JNC
3010
300E




300F


INC
CX
3010


INC
SI
3011


MOV
[SI],AL
3012




3013


INC
SI
3014


MOV
[SI],CX
3015




3016


INT
03


PROGRAM 2: 8 BIT SUBTRACTION

ADDRESS

OPCODE

LABEL

MNEMONIC

OPERANDS

3000


MOV
CX,0000
3001




3002




3003


MOV
SI,2100
3004





3005




3006


MOV
AL,[SI]
3007





3008


INC
SI
3009


MOV
BL,[SI]
300A




300B


SUB
AL,BL
300C




300D


JNC
3010
300E




300F


INC
CX
3010


INC
SI
3011


MOV
[SI],AL
3012




3013


INC
SI
3014


MOV
[SI],CX
3015




3016


INT
03


PROGRAM 3: 8 BIT  MULTIPLICATION

ADDRESS

OPCODE

LABEL

MNEMONIC

OPERANDS

3000


MOV
SI,2100
3001




3002




3003


MOV
AL,[SI]
3004





3005


INC
SI
3006


MOV
BL,[SI]
3007





3008


MUL
BL
3009


INC
SI
300A


MOV
[SI],AL
300B




300C


INT
03











PROGRAM 4: 8 BIT   DIVISION

ADDRESS

OPCODE

LABEL

MNEMONIC

OPERANDS

3000


MOV
SI,2060
3001




3002




3003


MOV
AL,[SI]
3004





3005


INC
SI
3006


MOV
BL,[SI]
3007





3008


DIV
BL
3009


INC
SI
300A


MOV
[SI],AL
300B




300C


INT
03











PROGRAM 5:  16 BIT AIRTHEMATIC OPERATIONS

ADDRESS

OPCODE

LABEL

MNEMONIC

OPERANDS

3000


MOV
CX,0000
3001




3002




3003


MOV
SI,2030
3004





3005




3006


MOV
AX,[SI]
3007





3008


ADD
SI,0002
3009




300A




300B




300C


MOV
BX,[SI]
300D




300E


ADD
AX,BX
300F




3010


JNC
3013
3011




3012


INC
CX
3013


ADD
SI,0002
3014




3015




3016




3017


MOV
[SI],AX
3018




3019


ADD
SI,0002
301A




301B




301C




301D


MOV
[SI],CX
301E




301F


INT
03





PROGRAM 6:  16 BIT SUBTRACTION

ADDRESS

OPCODE

LABEL

MNEMONIC

OPERANDS

3000


MOV
CX,0000
3001




3002




3003


MOV
SI,3030
3004





3005




3006


MOV
AX,[SI]
3007





3008


ADD
SI,0002
3009




300A




300B




300C


MOV
BX,[SI]
300D




300E


SUB
AX,BX
300F




3010


JNC
3013
3011




3012


INC
CX
3013


ADD
SI,0002
3014




3015




3016




3017


MOV
[SI],AX
3018




3019


ADD
SI,0002
301A




301B




301C




301D


MOV
[SI],CX
301E




301F


INT
03



PROGRAM 7:  16 BIT MULTIPLICATION

ADDRESS

OPCODE

LABEL

MNEMONIC

OPERANDS

3000


MOV
DX,0000
3001




3002




3003


MOV
SI,3050
3004





3005




3006


MOV
AX,[SI]
3007





3008


ADD
SI,0002
3009




300A




300B




300C


MOV
BX,[SI]
300D




300E


MUL
BX
300F


ADD
SI,0002
3010




3011




3012




3013


MOV
[SI],AX
3014




3015


ADD
SI,0002
3016




3017




3018




3019


MOV
[SI],DX
301A




301B


INT
03








PROGRAM 8:  16 BIT DIVISION

ADDRESS

OPCODE

LABEL

MNEMONIC

OPERANDS

3000


MOV
DX,0000
3001




3002




3003


MOV
SI,3050
3004





3005




3006


MOV
AX,[SI]
3007





3008


ADD
SI,0002
3009




300A




300B




300C


MOV
BX,[SI]
300D




300E


DIV
BX
300F


ADD
SI,0002
3010




3011




3012




3013


MOV
[SI],AX
3014




3015


ADD
SI,0002
3016




3017




3018




3019


MOV
[SI],DX
301A




301B


INT
03










PROGRAM 9: FACTORIAL

ADDRESS

OPCODE

LABEL

MNEMONIC

OPERANDS

5000



MOV

SI,3000
5001




5002




5003


MOV
AX,[SI]
5004




5005



MOV

BX,AX
5006




5007


DEC
BX
5008


JZ
500E
5009




500A


MUL
BX
500B




500C


JMP
5007
500D




500E


INC
SI
500F


MOV
[SI],AX
5010




5011


INT
03







PROGRAM 10: LARGEST NUMBER

ADDRESS

OPCODE

LABEL

MNEMONIC

OPERANDS

6000


MOV
SI,2100
6001




6002




6003


MOV
CX,0004
6004




6005




6006


MOV
AL,[SI]
6007




6008


INC
SI
6009


MOV
BL,[SI]
600A




600B


CMP
AL,BL
600C




600D


JNC
6011
600E




600F


MOV
AL,BL
6010




6011


DEC
CX
6012


JNZ
6008
6013




6014


INT
03



PROGRAM 11: SMALLEST NUMBER

ADDRESS

OPCODE

LABEL

MNEMONIC

OPERANDS

6000


MOV
SI,2100
6001




6002




6003


MOV
CX,0004
6004




6005




6006


MOV
AL,[SI]
6007




6008


INC
SI
6009


MOV
BL,[SI]
600A




600B


CMP
AL,BL
600C




600D


JC
6011
600E




600F


MOV
AL,BL
6010




6011


DEC
CX
6012


JNZ
6008
6013




6014


INT
03



PROGRAM 12:  8 BIT MULTIBYTE

ADDRESS

OPCODE

LABEL

MNEMONIC

OPERANDS

6000


MOV
SI,2350
6001




6002




6003


MOV
DI,2750
6004




6005




6006


MOV
BP,3000
6007




6008




6009


MOV
CL,0005
600A




600B

UP
MOV
AL,[SI]
600C




600D


MOV
BL,[DI]
600E




600F


ADD
AL,BL
6010




6011


MOV
[BP],AL
6012




6013




6014


INC
SI
6015


INC
DI
6016


INC
BP
6017


LOOP
UP
6018




6019


INT
03

PROGRAM 13:  LINEAR SEARCH

ADDRESS

OPCODE

LABEL

MNEMONIC

OPERANDS

3000


MOV
DX,0000
3001




3002




3003


MOV
SI,2100
3004





3005




3006


MOV
CX,0003
3007





3008




3009


MOV
AL,[SI]
300A




300B

L3
INC
SI
300C


MOV
BL,[SI]
300D




300E


CMP
AL,BL
300F




3010


JNE
L1
3011




3012


MOV
DX,0FFFF
3013




3014




3015


JMP
L2
3016




3017

L1
DEC
CX
3018


JNZ
L3
3019




301A

L2
INT
03