MP Lab-2017-With Output
MP Lab-2017-With Output
KARUNGAL
LABORATORY MANUAL
Class:VI Semester
NAME :
ROLL NO :
YEAR/SEM :
3 Sorting
4 Searching
5 String Manipulation
6 Matrix operations
10 A/D Interface
ARITHMETIC OPERATIONS
Expt. No:
Date :
AIM:
THEORY:
The ADD instruction requires either the addend or the augend to be in a register, unless the
source operand is immediate since the addressing modes permitted for the source and destination are
register-register, memory-register, register -memory, register-immediate, and finally memory
immediate. Using the add instruction, 16 bit addition is performed. The next arithmetic primitive is
SUB which is used to perform subtraction. It permits the same modes of addressing as ADD.
Unlike most of the 8 bit processors which do not have an arithmetic multiply instruction, 16
bit processors from 8086 upward provide both signed and unsigned multiply in their instruction sets
to overcome the loss of efficiency in performing repeated addition. The MUL instruction can have
both 16 and 8 bit operands and the multiplicand is AX or AL, accordingly the result for a byte multiply
is a 16 bit number in AX while that for a word multiply is a 32 bit number, the lower word of which
is in AX and the higher word in DX.
Using the DIV instruction of 8086, both division of a double word by a word and a word by
a byte can be performed. For the first case, the lower order word of the dividend is in AX and the
higher order word is in DX. The quotient is in AX and remainder in DX. For the second case, the
dividend is in AL, the quotient is in AL and the remainder in AH.
1. PROGRAM FOR ADDITION
Memory
Opcode Mnemonics Comments
address
1000
Load the data into 16 bit register
1001
MOV AX, [1100] AX from the memory location
1002
1100
1003
1004 Subtract accumulator content with
1005 the data in the memory location
SUB AX,[1102]
1006 1102.The result will be stored in
1007 the accumulator AX
1008
1009 Store the data byte from AX in to
MOV[1200],AX
100A the memory location 1200
100B
100C HLT Terminate the program
FLOW CHART FOR ADDITION
START
GET OPERANDS
DIVIDE
ADD
STORE RESULT
STOP
START
GET OPERANDS
SUBTRACT
DIVIDE
STORE RESULT
STOP
START
GET OPERANDS
MULTIPLY
DIVIDE
STORE RESULT
STOP
START
GET OPERANDS
DIVIDE
STORE RESULT
STOP
RESULT:
Thus the assembly language program for 16-bit addition, subtraction, multiplication and
division was executed using 8086 and the output was verified.
8086 LOGICAL OPERATIONS
Expt. No.:
Date:
AIM:
To write an assembly language program to perform an AND, OR, XOR and NOT
APPARATUS REQUIRED:
PROCEDURE:
1. Enter the Mnemonics starting from the RAM address1000 by using (A command).
2. Enter the two input data in the location 1100 and 1102 using (SB command)
3. Execute the program with the command (GO starting address).
4. Check the corresponding result in the location 1200 and 1201
5. Change the data in the location 1100and 1102 and verify the result
FLOW CHART FOR AND OPERATION
START
GET OPERANDS
AND OPERATION
DIVIDE
STORE RESULT
STOP
START
GET OPERANDS
OR OPERATION
DIVIDE
STORE RESULT
STOP
START
GET OPERANDS
NOT OPERATION
DIVIDE
STORE RESULT
STOP
START
GET OPERANDS
XOR OPERATION
DIVIDE
STORE RESULT
STOP
RESULT:
Thus the assembly language program for 16-bit Logical operations was executed using 8086.
SORTING
Expt. No.:
Date:
AIM:
To write an Assembly Language Program to sort numbers in ascending and descending order
using 8086.
APPARATUS REQUIRED:
PROCEDURE:
START
DX <- 0005
DX <- DX-1
CX <- DX
SI <- 1200
AL <- 1200
[SI+02] <- AX
[SI] <- BL
SI <-SI+1
LOOP 100B
DX <- DX-1
NO
IF
ZF=0
YES
STOP
PROGRAM FOR SORTING IN ASCENDING ORDER
Memory
Opcode Label Mnemonics Comments
Address
1000
1001 Initialize array size
MOV DX,0005
1002
1003
1004 DEC DX Decrement DX
1005
N1 MOV CX, DX Move the content of DX to CX
1006
1007
Initialize memory location to get
1008
MOV SI, 1200 data
1009
100A
100B Get the first data in AL
N2 MOV AL,[SI]
100C
100D Compare data in AL with the
100E CMP [SI+01] second data
100F
1010
JNC N3 Jump at no carry
1011
1012
Store the smallest data
1013 MOV BL,[SI+01]
1014
1015
1016 MOV[SI+01], AL Move the content of AL SI+01
1017
1018 Store data in memory location
MOV [SI],BL
1019
Go to next memory location
101A N3 INC SI
101B
LOOP N2 Loop
101C
Decrement the count
101D DEC DX
101E
JNZ NI Jump if non zero
101F
1020 HLT Terminate the program
OUTPUT : (Ascending order)
1200 12
1201 09
1202 07
1203 17
1204 13
START
DX <- 0005
DX <- DX-1
CX <- DX
SI <- 1200
AL <- 1200
[SI+02] <- AX
[SI] <- BL
SI <-SI+1
LOOP 100B
DX <- DX-1
NO
IF
ZF=0
YES
STOP
PROGRAM FOR SORTING IN DESCENDING ORDER
Memory
Opcodes Label Mnemonics Comments
Address
1000
1001 Initialize array size
MOV DX,0005
1002
1003
1004 DEC DX Decrement DX
1005 Move the content of DX
N1 MOV CX, DX
1006 to CX
1007
Initialize memory
1008
MOV SI, 1200 location to get data
1009
100A
100B Get the first data in AL
N2 MOV AL,[SI]
100C
100D Compare data in AL
100E CMP [SI+01] with the second data
100F
1010
JC N3 Jump at no carry
1011
1012
Store the largest data
1013 MOV BL,[SI+01]
1014
1015
Move the content of AL
1016 MOV [SI+01],AL
SI+01
1017
Store data in memory
1018
MOV [SI],BL location
1019
Go to next memory
101A N3 INC SI location
101B
LOOP N2 Loop
101C
Decrement the count
101D DEC DX
101E
JNZ NI Jump if non zero
101F
1020 HLT Terminate the program
OUTPUT (Descending order)
1200 12
1201 09
1202 07
1203 17
1204 13
RESULT:
Thus the Assembly Language Program for sorting numbers in Ascending and Descending
order was executed using 8086 and the output was verified.
SEARCHING
Expt. No.:
Date:
AIM:
To write an Assembly Language Program for searching smallest and biggest numbers using 8086.
APPARATUS REQUIRED:
3. KEY BOARD 1
PROCEDURE:
START
MOVE COUNT TO CX
BX [1200]
AX 0000
Compare BX with AX
NO
IF
CF=0
YES
AX B(X)
BX BX+1
LOOP
1300 AX
STOP
FLOW CHART FOR SEARCHING THE SMALLEST NUMBER
START
MOVE COUNT TO CX
BX [1200]
AX 0000
Compare BX with AX
NO
IF
CF=1
YES
AX B(X)
BX BX+1
LOOP
1300 AX
STOP
PROGRAM FOR SEARCHING THE BIGGEST NUMBER
Memory
Opcodes Label Mnemonics Comments
Address
1000
1001 Move the content of 0004
MOV CX,0004
1002 to CX
1003
1004
1005 Move the content of 1200
MOV BX,1200
1006 to BX
1007
1008
Move the content of 0000
1009 MOV AL,0000
to AL
100A
100B
LABEL CMP AL,[BX] Compare AL and BX
100C
100D
JNB LOOP Jump if no carry
100E
100F Move the content of BX
MOV AL,[BX]
1010 to AL
1011 LOOP INC BX Increment BX by 1
1012
LOOP LABEL Loop
1013
1014
1015 Move the content of AL
MOV [1300],AL
1016 to 1300
1017
1018 HLT Terminate the program
Memory
Opcodes Label Mnemonics Comments
Address
1000
1001 Move the content of 0004
MOV CX,0004
1002 to CX
1003
1004
1005 Move the content of 1200
MOV BX,1200
1006 to BX
1007
1008
Move the content of
1009
MOV AX,0FFF 0FFF to AX, Initialize the
100A
accumulator
100B
100C
LABEL CMP AL,[BX] Compare AL and BX
100D
100E
JB LOOP Jump if carry
100F
1010 Move the content of BX
MOV AX,[BX]
1011 to AL
1012 LOOP INC BX Increment BX by 1
1013
LOOP LABEL Loop
1014
1015
1016 Move the content of AL
MOV [4000],AX
1017 to 1300
1018
1019 HLT Terminate the program
RESULT:
Thus the Assembly Language Program for performing searching the biggest and smallest
numbers was executed using 8086 and the output was verified.
STRING MANIPULATION
Expt. No.:
Date :
AIM:
To write assembly language program for string manipulation using 8086.
APPARATUS REQUIRED
Memory
Opcode Mnemonics Comments
Address
1000
1004
1005
MOV DI,2100 Initialize starting address
1006
1007
1008
1009
MOV CX, 00FF Initialize array size
100A
100B
100E
LOOP MOVE Execute loop
100F
PROCEDURE:
OUTPUT
Input Address Input Data
2000 05
2001 11
2002 12
2003 32
2004 03
Memory
Opcode Mnemonics Comments
Address
1000
1001
MOV CX,0100 Move 0100 to SI
1002
1003
1004
1005
MOV DI,1100 Move 1100 to DI
1006
1007
1008
1009
MOV AX, 0034 Move 0034 to AX
100A
100B
100E
LOOP L Execute loop
100F
PROCEDURE:
1100 34
Memory
Label Opcode Mnemonics Comments
Address
1000
1001
MOV SI,1200 Move 1200 to SI
1002
1003
1004
1005
MOVDX,FFFF Move FFFF to DX
1006
1007
1008
100A
100C
MOV AL,[SI] Move content of SI to AL
100D
1011
JNZ LOOP Jump if not Zero
1012
1013
1016
OUTPUT
Input Address Input Data
1200 15
1201 23
1202 54
1203 25
1204 45
1100 05
FLOW CHART FOR MOV SB
START
ARRAY
START ADDRESS
END ADDRESS
CX=LENGTH
SI START DI END
DR = O[clear]
MOVE 1 BYTE
MOVE SUB
DECREMENT CX
NO
CX =
0
YES
STOP
START
1200 <- SI
FFFF <- DX
FF <- AX
DX <- DX+1
AL <-[SI]
Compare AL & AH
NO
IF ZF =
0
YES
STOP
RESULT:
Thus the assembly language program for performing string manipulation was
executed using 8086.
MATRIX OPERATIONS
Expt.No.:
Date:
AIM:
To write an assembly language program for addition of two matrix by using 8086.
APPARATUS REQUIRED:
PROCEDURE:
6. Enter the Mnemonics starting from the RAM address1000 by using (A command).
7. Enter the two input data in
8. Execute the program
9. Check the corresponding result
10. Change the data and verify the result
FLOWCHART:
PROGRAM:
RESULT:
Thus the assembly language program for the addition of two matrix was executed
successfully using 8086.
PERIPHERALS AND INTERFACING EXPERIMENTS
TRAFFIC LIGHT CONTROL
Expt.No.:
Date:
AIM:
To write an assembly language program for 'traffic light control' system using 8086
microprocessor.
APPARATUS REQUIRED:
PROGRAM:
Program for the TLC using 8086/88 LED mnemonics
ORG 1000H
CNTRL EQU 26H
PORT A EQU 20H
PORT B EQU 22H
PORT C EQU 24H
RESULT:
Thus the assembly language program for Traffic Light Control System was executed using
8086 microprocessor.
STEPPER MOTOR CONTROL
AIM:
To write an Assembly Language Program to run the Stepper Motor at different speed using
8086.
APPARATUS REQUIRED
PROCEDURE:
1.Enter the program for location 1000
2.Connect the stepper motor to 8086 processor
3.Stepper motor will rotate in clockwise direction
4.Vary the speed by loading the value in DX register
5.Vary the direction of motor by changing the contents of look up table
PROGRAM:
OUTPUT:
stepper motor runs successfully
RESULT:
Thus the assembly language program to run stepper motor was executed successfully using
8086 Microprocessor.
KEYBOARD AND DISPLAY INTERFACE
Expt. No:
Date:
AIM:
To write a assembly language program to display 'A' in the first digit of the display using
8086-8279 keyboard and display interfacing.
APPARATUS REQUIRED:
THEORY:
The Intel 8279 is responsible for debouncing of the keys, coding of the keypad matrix and
refreshing of the display elements in a Microprocessor based development system. Its main features
are:
1) Simultaneous Keyboard and Display operation.
1. Input modes such as Scanned Keyboard Mode, Scanned Sensor Mode and Strobed Input Entry
Mode.
2) Output modes such as 8 or 16 character multiplexed displays, right entry or left entry display
formats.
3) Clock Prescaler.
4) Programmable Scan Timing.
5) 2 Key lockout or N-key Roll-over with contact debounce.
6) Auto Increment facility for easy programming.
PROGRAM:
Memory
Opcode Label Mnemonics Comments
Address
1000
1001 MOV AL,00 Set Mode and Display
1002
1003 Send through output port
OUT C2,AL
1004
1005
Store the control word to clear display
1006 MOV AL,CC
1007
1008 Send through output port
OUT C2,AL
1009
100A
Store the control word to write display
100B MOV AL,90
100C
100D Send through output port
OUT C2,AL
100E
100F
Store the control word to display A
1010 MOV AL,88
1011
1012 Send through output port
OUT C0,AL
1013
1014 Store the control word to blank rest of
1015 MOV AL,FF display
1016
1017
1018
MOV CX,0005 Store the data to CX register
1019
101A
101B Send through output port
NEXT OUT C0,AL
101C
101D Loop until all the data’s have been taken
LOOP NEXT
101E
101F HLT Terminate the program
PROCEDURE:
OUTPUT:
‘A’DIAPLAYED
RESULT:
Thus the assembly language program to display the character 'A' was executed and output was
verified.
ADC INTERFACING
Expt.No.:
Date:
AIM:
To write an Assembly Language Program to convert analog signal into digital value using an
ADC interfacing.
APPARATUS REQUIRED:
Sl.No Required Components specification Quantity
1. MICROPROCESSOR MICRO 86/88 KIT 1
2. POWER CHORD +5V SUPLLY 1
3. KEY BOARD 1
4. ADC 0809 1
THEORY:
Microprocessors are Digital logic devices that can process only digital signals that are in
binary form logic levels (either 0 or 1 or 0 volts or 5 volts), But most industrial applications involve
physical variables such as temperature, pressure etc, which are continuously (varying voltage) when
converted to analog signal by transducers & signal condition, unlike digital signals having either a
low or high state. In most cases we want to control these signals electronically. This automatic control
can be achieved using a microprocessor. But microprocessor can understand only digital language.
So there should be some translater who can translate these analog signals to a digital form which the
Microprocessor considers formal. This is the place where an Analog to Digital Converter (ADC)
comes into the picture. Thus an Analog to Digital Converter is an electronic circuit that converts the
analog or continuous signal to digital or discrete.
PROCEDURE:
1. Enter the program from the location 1000
2. Connect the ADC interface kit to 8086 processor
3. Verify the analog input using trimpot and give SOC by pressing SOC switch
4. See the corresponding digital value in the LED display
PROGRAM :
Start
stop
OUTPUT:
DIGITAL OUTPUT HEXA EQUIVALENT DECIMAL
01010110 56 86
RESULT:
Thus the analog signal was converted to digital value using 8086-ADC interfacing.
INTERFACING DAC WITH 8086
EX NO :
DATE :
AIM :
To generate saw tooth wave , square wave and triangular wave at DAC output.
APPARATUS REQUIRED:
THEORY:
Since DAC 0800 is an 8 bit DAC and the output voltage variation is between –5v and
+5v. The output voltage varies in steps of 10/256 = 0.04 (approximately). The digital data
input and the corresponding output voltages are presented in the table. The basic idea
behind the generation of waveforms is the continuous generation of analog output of DAC.
With 00 (Hex) as input to DAC2 the analog output is –5v. Similarly with FF H as input, the
output is +5v. Outputting digital data 00 and FF at regular intervals, to DAC2, results in a
square wave of amplitude 5v.Output digital data from 00 to FF in constant steps of 01 to
DAC2. Repeat this sequence again and again. As a result a saw-tooth wave will be
generated at DAC2 output. Output digital data from 00 to FF in constant steps of 01 to
DAC2.Output digital data from FF to 00 in constant steps of 01 to DAC2. Repeat this
sequence again and again. As a result a triangular wave will be generated at DAC2 output.
PROCEDURE:
OUTPUT :
Wave Amplitude (V) Time (ms)
Saw Tooth 2 2
Square Wave 2 3
Triangular Wave 2 3
MODEL GRAPH:
2.Square Wave
3.Triangular Wave
RESULT:
Thus the saw tooth wave, square wave and triangular wave generated using DAC
and output was verified.
PROGRAMABLE INTERRUPT CONTROLLER-8259
EX NO :
DATE :
AIM:
To write an assembly language program to interface 8259 programable interrupt controller
with 8086.
APPARATUS REQUIRED:
THEORY:
The 8259 is a programmable Interrupt Controller that can resolve eight levels of interrupt
priorities in a variety of modes. It can vector an interrupt anywhere in the memory map. It is also
capable of masking each interrupt request individually and read the status of pending interrupts, in-
service interrupts and masked interrupts. The 8259 can be expanded to 64 priority levels by cascading
network.
Initialization command words (ICW s): Before the normal operation can begin , each 8259 in the
system must be initialized using 2 to 4 bytes of ICW s.
Operation command words (OCW s): These are the command words which command the 8259 to
operate in various interrupt modes.
PROCEDURE:
- The program is entered in user RAM locations. On pressing IR0 , the CPU jumps to location
5000H. 8259 will not accept any more interrupt at IR0 since AEOI is not set.
- After it is set , the CPU goes back to main program after performing service addition
subroutine.
- The result addition can be viewed at 4500H location.
PROGRAM:
Memory
Opcodes mnemonics Comments
address
1000
MOV AL,17 Move 17 to accumulator
1001
1002
OUT C0,AL Move contents of AL to C0
1003
1004 Move 15 to accumulator
MOV AL,08
1005 Initialize ICW 2
1006
OUT C2,AL Move contents of AL to C2
1007
1008 Move 00 to accumulator
MOV AL,01
1009 Initialize ICW 4
100A
OUT C2,AL Move contents of AL to C2
100B
100C
MOV AL,FE Move fe to accumulator
100D
100E
OUT C2,AL Move contents of AL to C2
100F
1010 STI Terminate the program
1011
SJMP HERE Subroutine
1012
Interrupt Vector
0020 00
0021 12
0022 00
0023 00
D7 D6 D5 D4 D3 D2 D1 D0
0 0 1 0 0 0 0 0
RESULT:
Thus the result of addition subroutine was performed at memory location 4500 and the output
was verified using 8259 interfacing.
8253 INTERFACING
EX NO :
DATE :
AIM :
APPARATUS REQUIRED
Qty
SL.no Required Components specification
PROGRAM :
OUTPUT:
WAVE AMPLITUDE TIME
SQUARE WAVE 3 4
RESULT:
Thus the programmable Timer interface with 8086 and operation is verified.
8051 ARITHMETIC OPERATION
EX NO:
DATE :
AIM:
To perform Arithmetic operation such as addition,subtraction,multiplication & division
using 8051 micro controller.
APPARATUS REQUIRED
THEORY:
As there is only one 16-bit Register in 89C51, 16-bit addition is performed by using
ADDC instruction twice, i.e. adding LSD first and MSD next.
Using the accumulator, subtraction is performed and the result is stored. Immediate
addressing is employed. The subtraction instruction writes the result in the accumulator
The 8051 has a MUL instruction unlike many other 8-bit processors. MUL instruction
multiplies the unsigned 8-bit register in A & B, the lower order byte of the product is left in A
and the higher order byte in B, if the product is greater than 255, the OFF is set otherwise it
is cleared, CF always cleared.
EXAMPLE:
The program is to add the 16-bit data 1234 with the data 5678 and store the result at
the locations 4150 and 4151 using immediate addressing.
Memory
Opcodes Mnemonics Comments
Address
4100 CLR C Clear C register
4101 MOV A, # data1
Store data1 in accumulator
4102
4103
SUBB A, # data2 Subtract data2 from data1
4104
4105
MOV DPTR, #
4106 Initialize memory location
4500
4107
Store the difference in memory
4108 MOVX @ DPTR, A
location
4109
SJMP HERE Stop
410A
Memory
Opcodes Mnemonics Comments
Address
4100
MOV A ,#data1 Store data1 in accumulator
4101
4102
4103 MOV B, #data2 Store data2 in B register
4104
4105 MUL A,B Multiply both
4106
MOV DPTR,
4107 Initialize memory location
#4500H
4108
4109 MOVX @ DPTR, A Store lower order result
410A INC DPTR Go to next memory location
410B
MOV A,B
410C Store higher order result
410D MOV @ DPTR, A
410E
HERE:SJMP HERE STOP
410F
Memory
Opcodes Mnemonics Comments
Address
4100
MOV A ,#data1 Store data1 in accumulator
4101
4102
4103 MOV B, #data2 Store data2 in B register
4104
4105 DIV A,B Divide both A & B
4106
MOV DPTR,
4107 Initialize memory location
#4500H
4108
4109 MOVX @ DPTR, A Store lower order result
410A INC DPTR Go to next memory location
410B
MOV A,B
410C Store higher order result
410D MOV @ DPTR, A
410E
HERE:SJMP HERE STOP
410F
Thus the program to perform Arithmetic operation using 8051 controller was
performed and output was verified.
EX NO:
DATE :
AIM:
To perform Logical operation using 8051 controller
APPARATUS REQUIRED:
THEORY:
The one's complement of a number is obtained by inverting all the bits in that number ,
that is replacing all 1's by 0's and all 0's by 1's. The two's complement is the negative of that
number.
PROCEDURE:
Memory
Opcodes Mnemonics Comments
Address
4100
MOV A,#DATA Data is moved to accumulator
4101
Complement the content of
4102 CPL A
accumulator
4103
Store the result in my location
4104 MOV DPTR,#4200
4200
4105
4106 Content of accumulator is moved
MOVX @DPTR,A
to DPTR
4107 INC A Increment accumulator
OUTPUT:
Output Address Output Data
4500 33
4501 34
2. PROGRAM FOR OR OPERATION:
Memory
Opcodes Mnemonics Comments
Address
4100
MOV A,#DATA1 Move data 1 to register A
4101
4102
ORL A,#DATA2 OR data 2 with accumulator
4103
4104
Move content of 4500 to
4105 MOV DPTR,#4500
DPTR
4106
4107 MOVX @DPTR,A Move content of A to DPTR
4108
HERE: SJMP HERE Stop the Program
4109
RESULT:
Thus the program to perform Logical operation using 8051 controller was performed
and output was verified.
Expt. No:
Date:
AIM:
To write an assembly language program to perform Square and Cube program using 8051
micro controller.
APPARATUS REQUIRED
PROGRAM:Square of a number
CUBE OF A NUMBER
MOVX A,@DPTR
MOV R0,A
MOV B,A
MUL AB
PUSH B
MOV B,A
MOV A,R0
MUL AB
INC DPTR
MOVX @DPTR,A
MOV A,B
MOV R1,A
POP B
MOV A,R0
MUL AB
ADD A,R1
INC DPTR
MOVX @DPTR,A
MOV A,B
ADDC A,#00
HLT INC DPTR
MOVX @DPTR,A
SJMP HLT
RESULT
Thus the ALP for Square program and Cube program was done using 8051 microcontroller.
ARITHMETIC & LOGIC OPERATION
EX.NO.
DATE.
AIM:
APPARATUS REQUIRED:
1.8086 KIT
2.MASM Software
3.PC with windows
4.RS 232 cable
PROCEDURE:
1.In PC,click start menu button and click on RUN and type cmd at command prompt;
Immediately DOS window will appear.
2. Go to masm directory by typing;
E:
Cd masm
3. In the command prompt type, edit filename.asm
4. Go to file option in the menubar to save the program and exit from deitor window.
5. To assemble the program, type
masm filename.asm,,;
6. To link the program type,
Link filename.asm,,;
7. To execute the program, type
Debug filename.exe
8. after executing type
'n filename.bin'
'wcs : 1000'
9. To quit the execution screen type q
10. To initialize data transfer to 8086 kit, type
'dc'
11. In kit, to set the baud rate, type
BU
And set the baud rate(ie.5)
12. Inthe newly appeared window in PC, click setup and provide the needed
parameters.
13. In kit,type SI and then 1000
14. Return back to the window in PC, click transmit data and provide the needed
parameters.
15. After completion of data transfer,in kit,give the input data and execute the
program.View the output in the display 8086 microprocessor kit.
code segment
assume cs:code, ds:code
ORG 1000H
MOV AL, 05h
MOV BL, 03h
ADD AL,BL
MOV SI,1100h
MOV[SI], AL
HLT
code ends
End
OUTPUT: (ADDITION)
1100:08
code segment
assume cs:code, ds:code
ORG 1000H
MOV AL, 05h
MOV BL, 03h
SUB AL,BL
MOV SI,1100h
MOV[SI], AL
HLT
code ends
End
OUTPUT:(SUBTRACTION)
1100:02
code segment
assume cs:code, ds:code
ORG 1000H
MOV AL, 55h
MOV BL, 53h
MUL BL
MOV SI,1100h
MOV[SI], AL
INC SI
MOV[SI], AH
HLT
code ends
End
OUTPUT:(MULTIPLICATION)
1100:8F
1101:1B
code segment
assume cs:code, ds:code
ORG 1000H
MOV AX,03e8h
MOV BL, 63h
DIV BL
MOV SI,1100h
MOV[SI], AL
INC SI
MOV[SI], AH
HLT
code ends
End
OUTPUT:(DIVISION)
1100:0A
1101:0A
code segment
assume cs:code, ds:code
ORG 1000H
MOV AL, 0F5h
MOV BL, 03h
AND AL, BL
MOV SI,1100h
MOV[SI], AL
HLT
code ends
End
1100:01
code segment
assume cs:code, ds:code
ORG 1000H
MOV AL, 0F5h
MOV BL, 03h
OR AL, BL
MOV SI,1100h
MOV[SI], AL
HLT
code ends
End
OUTPUT:(LOGICAL OR OPERATION)
1100:F7
code segment
assume cs:code, ds:code
ORG 1000H
MOV AL, 55h
NOT AL
MOV SI,1100h
MOV[SI], AL
HLT
code ends
End
1100:AA
RESULT:
Thus assembly language program for arithmetic & logic operations were
executed successfully & output was obtained.