MPMC Final - ECE
MPMC Final - ECE
MICROPROCESSOR AND
MICROCONTROLLER LABORATORY
MANUAL
III – B. Tech., II-Semester ECE
PREFACE
The manual uses the plan, cogent and simple language to explain the
fundamental aspects of Microprocessors and Microcontrollers in practical. The
manual prepared very carefully with our level best. It gives all the steps in executing
an experiment.
DO’S:-
DON’Ts:-
1. Don’t come late to the Lab.
2. Don’t leave the Lab without making proper shut down of desktop and keeping
the chairs properly.
3. Don’t leave the Lab without verification by Lab instructor.
4. Don’t leave the lab without the permission of the Lecturer In-Charge.
1. Sorting.
2. Multibyte addition/subtraction.
3. Sum of squares/cubes of a given n-numbers.
4. Addition of n-BCD numbers.
5. Factorial of given n-numbers.
6. Multiplication and Division operations.
7. Stack operations.
8. BCD to Seven segment display codes.
MICROPROCESSOR TRAINERKIT
8251A-
UniversalSynchronous/AsynchronousReceiver/Transmittersupportingstandardbau
d ratesfrom110to19,[Link]-boardDIPswitchsetting.
8253-5-
ProgrammableIntervalTimer;Timer0isusedforBaudclockgenerationTimer1and
Timer2areavailabletotheuser.
8255A-3ProgrammablePeripheralInterfaceProvideup
to72ProgrammableI/[Link]
8255isusedforcontrollingLCDandreadingDIPSwitch.Two8255sarefortheuser,
of which one is populated by default and the otherisoptional.
8288-BusControllerusedforgeneratingcontrolinMaximumModeOperation.
8042/8742UPI(UniversalPeripheralInterface).
ESA86/88ECONFIGURATION
The following table summarizes the DIP Switch settings for different
configurations of ESA86/88E Trainer.
DIPSwitch Functionality
No Configuration Remarks
CPUSELECTION
ESA 86/88E can be operated either with an 8086 or an 8088 CPU operating at a
frequency of
[Link](8086or8088)inthesocketlabeledU22andselectSW7of
the DIPSwitchaccordingly.
OPERATINGMODE
Instand-
[Link]
e,
thetrainercanbeconnectedtoaCRTterminalortoahostcomputersystemthroughRS
232C communicationstandardinterface.
INSTALLATIONOFESA86/88E
To install and operate ESA 86/8 E trainer, the following accessories are required
The following steps are common for either mode of operation with ESA 86/88E
Trainer.
1. SelecttheCPU(8086or8088)andModeofOperationusingtheDIPSwitch.
2. Select EPROM configuration if necessary(Ref.Section2.5).
3. Install8087NDPifdesired(RefSection2.4).
4. ConnectthePowerSupplyofrequiredcapacitytoESA86/88E.
Serial Mode Operation:
1. Select mode of operation,Baudrate andEnable/DisablePrinterDriverbysettingthe
DIPSwitch.
2. Connect ESA 86/88 E to Host PC/CRT through an RS-232-C cable.
Interfacing requirementsforRS-232-CcommunicationaredescribedinAppendixE.
3. Theterminal/computersystemshouldbepoweredONandthedriversoftwareshould
berunning Refer Chapter 3 for details of installation of Driver Software and
Communicationprocedures
Now the following sign-on message should appear on the console depending on the
CPU installed.
Thesign-
onmessageisfollowedbythecommandprompt,“.”inthenextline.
ThefollowingmessageappearsontheLCDdisplay
ESA86MONITORVx.y
SER:9600 P :86
1. ConfigurethetrainerusingDIPSwitchandjumperasdescribedintheearliersection
s.
2. Installthe20x4LCDandconnectaPCKeyboardtothePS/2orDINconnectorprovi
ded.
3. ConnectthepowersupplyofrequiredcapacitytoESA86/8EandPowerONthetra
iner.
Now if 8086 is installed, the following sign-on message will appear on the LCD.
Thesign-on
messageisfollowedbythecommandprompt,“.”andthcursor“_”inthenextline.Incaseof8
088 CPUthesignonmessagewillchangeaccordingly.
ESA86MONITORVx.y
KBD P:86
Writing an alp program into 8086: Check the supply(+5v) and connect to JI,
Keyboard to J11
Switch on kit
Press reset
Press enter
Press enter
---
---
---
Enter nth mnemonic
Press enter
To compile:
Press G (give starting address)
Press enter
AIM: -To write an assembly language program for Addition of two 16-bit numbers.
APPARATUS:
ALGORITHM:-
1. Start theProgram.
2. Initialize the contents of memory locations in AX & BXregisters.
3. Add the value of AX and BX by using ADD Mnemonic and store the
result in a memory location.
4. Stop theProgram.
PROGRAM:
OUTPUT:
Input output
AX 11H AX 33H
BX 22H
APPARATUS:
1. 8086 Microprocessor Kit -----1
2. RPS(+5V) -------------------1
ALGORITHM:-
1. Start the Program.
2. Load 0000H into AX register.
3. Load the data intoSI from memory 2000.
4. Load the data into BX register from memory 2004.
5. Add BX with AL
6. Increment SI, BX, DI
7. Repeat step 4&5
8. Stop the Program.
PROGRAM:
4014 INC SI
4015 INC BX
4016 INC DI
4017 DEC CL
4019 JNZ 400E
401B INT 03
OUTPUT:
INPUT OUTPUT
B) Subtraction:
i)16 bit subtraction:
AIM: - To write an assembly language program for subtraction of two 16-bit
numbers.
1. Start theProgram
2. Initialize the contents of memory locations in AX & BXregisters
3. Subtract the value of AX and BX by using SUB Mnemonics and store the
result in a memory location.
4. Stop theProgram.
PROGRAM:
MEMORY
LOCATION INSTRUCTION
4000 MOV AX, 34
4003 MOV BX, 12
4006 SUB AX,BX
4008 INT 03
OUTPUT :
INPUT OUTPUT
Regist
Data Register Data
er
AX 34H AX 22H
BX 12H
PROGRAM:
4014 INC SI
4015 INC BX
4016 INC DI
4017 DEC CL
4019 JNZ 400E
401B INT 3
OUTPUT:
INPUT OUTPUT
EXP NO.2: Program for 16-bit Multiplication & Division in 8086 using kit
i)16 bit multiplication:
AIM: -To write an assembly language program for multiplication of two 16-bit
numbers.
APPARATUS: 1. 8086 microprocessor kit ----1
2. RPS (+5V) ----1
ALGORITHM:-
PROGRAM:
MEMORY
LOCATION MNEMONIC
OUTPUT
OUTPUT
INPUT
Register Data Register Data
AX 02H AX 06H
BX 03H
AIM: - To write an assembly language program for division of two 16-bit numbers.
PROGRAM:
MEMORY
LOCATION MNEMONIC
OUTPUT:
INPUT OUTPUT
AX 0008H AX 0004H
BX 0002H DX
3. Travel from starting location to last and compare two numbers if first
and compare two numbers if first number is greater than second number
then swap them
7. Second pass fix the position for last two numbers.
8. Repeat
PROGRAM:
OUTPUT:
INPUT OUTPUT
Memory Memory
Data Data
Location Location
3. Travel from starting location to last and compare two numbers if first
6. Again travel from starting memory location to(last-1,by help of count) and
compare two numbers if first number is smaller than second number then
swap them.
7. Second pass fix the position for last two numbers.
8. Repeat.
PROGRAM:
MEMORY LOCATION MNEMONIC
4000 MOV AX, 0000
4005 DEC CH
400E INC SI
4015 DEC SI
4018 INC SI
4019 DEC CL
4010 DEC CH
4020 INT 3
OUTPUT:
INPUT OUTPUT
Memory Memory
Data Data
Location Location
EXP NO: 4
Program to determine squares of n numbers by using 8086 microprocessor kit
AIM: Write a program in 8086 microprocessor to find out the squares of 8-bit
n numbers.
ALGORITHM :
1. Store 3000 to SI and Load data from address 3000 to register CL and set register
CH to 00 (for count).
2. Increase the value of SI by 1.
3. Load first number (value) from next address (i.e. 3001) to register AL.
4. Multiply the value in register AL by itself.
5. Store the result (value of register AL ) to memory address SI.
6. Increase the value of SI by 1.
7. Loop above 2 till register CX gets 0.
PROGRAM:
2000
MOV SI, 3000H
2003
MOV CL, [SI]
2005
MOV CH,00H
2007
INC SI
2008
MOV AL,[SI]
200A
MUL AL
200C
MOV [SI],AL
200E
INC SI
200F
LOOP 2008
2011
INT 03
OUTPUT:
Input Output
3003 02H
AIM: Write a program in 8086 microprocessor to find out the cubes of 8-bit
n numbers.
ALGORITHM :
1. Store 5000 to SI and Load data from 5000 to register CL and set register CH to
00 (for count).
2. Increase the value of SI by 1.
3. Load number (value) from SI to register AL.
4. Move the value of register AL to BL.
5. Multiply the value in register AL by itself.
6. Multiply the value in register AL by BL.
7. Store the result (value of register AL ) to memory SI.
8. Increase the value of SI by 1.
9. Loop above 6 till register CX gets 0.
PROGRAM:
2000
MOV SI, 5000
2003
MOV CL, [SI]
2005
MOV CH,00H
2007
INC SI
2008
MOV AL,[SI]
200A
MOV BL, AL
200C
MUL AL
200E
MUL BL
2010
MOV [SI],AL
2012
INC SI
2013
LOOP 2008
2015
INT 03
OUTPUT:
Input Output
5000 04 5001 1B
5001 03 5002 01
5002 01 5003 08
5003 02 5004 7D
5004 05
ALGORITHM :
1. Initialize segment
2. Registers
3. Load values from memory
4. Save value and substitute
5. Multiplication
6. Store computed value in memory
7. Stop Execution
PROGRAM:
2000
MOV AX, 0000
2003
MOV CS, AX
2005
MOV DS, AX
2007
MOV SI, 3000
200A
MOV AL, [SI]]
200C
MOV BL, [SI]
200E
DECBL
2010
JZ 2018
2012
MOV [SI], BL
2014
MULW [SI]
2016
JMP 200C
2018
MOV DI,3100
201B
MOV [DI],AX
201D INT 03
OUTPUT:
Input Output
3000 04 3100 18
3000 06 3100 D0
ALGORITHM :
1. Load data from 3000 to register AL (first number)
2. Load data from 3001 to register BL (second number)
3. Add these two numbers (contents of register AL and register BL)
4. Apply DAA instruction (decimal adjust)
5. Store the result (content of register AL) to 4000
6. Set register AL to 00
7. Add contents of register AL to itself with carry
8. Store the result (content of register AL) to 4001
9. Stop
PROGRAM:
2000
MOV SI, 3000
2003
MOV AL, [SI]
2005
MOV SI, 3001
2007
MOV BL, [SI]
2008
ADD AL, BL
200A
DAA
200B
MOV DI, 4000
200D
MOV [DI], AL
200F
MOV AL, 00
2011
ADC AL, AL
2012
MOV DI, 4001
2015
MOV [DI], AL
2017
INT 03
OUTPUT:
Input Output
3000 35 4000 07
3000 72 4001 01
Viva:
14. What is the relation between 8086 processor frequency & crystal Frequency?
EXP NO:1
INTERFACING OF 8259 WITH 8086
AIM: - To the operation of 8259 peripheral interfacing to the 8086 microprocessor.
HARDWARE USED: - 8259 peripheral kit
SOFTWARE USED: -WIN 86E ESA trainer.
THEORY: -
The architecture block diagram of 8259 is shown the functional operation of each block
is given as
INTERRUPT REQUEST REGISTER (IRR):-
The interrupts of IRR I/p lines are handled by interrupt request register internally. It
stores all the interrupt request.
IN SERVICE REGISTER (ISR): -
This stores all the interrupt request those are being served i.e. ISR. Keeps a track of
request being served?
PRIORITY RESOLVER: -
This determiner the priorities of interrupt request appearing simultaneously. The highest
priority and corresponding bit of ISR during INTA.
INTERRUPT MASK REGISTER: -
The register stores the bits required to mask the interrupt I/p.
INTERRUPT CONTROL LOGIC: -
This is used to manage the interrupt and acknowledge signal to be sent to CPU.
CASCADE BUFFER/COMPARATOR: -
This block stores and compares ID’S of 8259’s used in the system. The 8259 contains two
types of command words.
(i) Initialization command words(ICW’S)
(ii) Operation command words (OCW’S)
INITIALIZATION COMMAND: -
ICW1:
Before it starts functioning must be initialized by 2 or 4 command words irrespective
command word register. If A0=1,P4=1,then ICW is recognized as ICW1 it contains edge (or) level
triggered mode, single (or) cascade mode call address interval.
ICW2:
If 10=1 the control word is recognized as ICW2, It stored details regarding interrupt vector
address.
ICW3:
It indicates whether it is in master or slave mode.
ICW4:
IC4 this command word depends on IC4 bit of ICW1,IC4is 0 in [Link] need not to go
for ICW4.
The bit function ICW4 is described mode.
SFNM: Especially fully nested mode.
BUF: Buffer mode.
M/S: Master or slave mode.
AEOI: Automatic end of interrupts.
OPERATIONAL COMMAND WORDS: -
The operating command words divided into 3 types every bit corresponding to
some other features of mode selected except for a few bits gather 1 or 0 twice OCW’s are.
OCW1:The OCW1 is used to mask the interrupt register mask bits is 1 corresponding interrupt
priority is ‘0’.
OCW2: In this OCW2 contains 3 bits R, XZ, EOI content.
OCW3: In OCW3 is the ESMM enable specially masked mode bit is set to 1 and SMM bit is
enable to selected. If ESMM=1, SMM=0 then [Link] return the normal mask operation, the
reaming bits will decide the pole operation D), D1 acts as read||R RD pulse.
PROCEDURE: -
1. 230V power supply is connected and 5V regulated DC is supplied to 8086.
2. RS 232 port is connected to PC trainer kit
3. This 8086 trainer kit consists of 8 switches. First 3 switches are for band rate or key board.
And 4 switches (5,6,7,8) and are for getting the O/P priority i.e 0100 is set
4. The peripherals are connected to 8086 using buses.
5. Every program is calculated in different communication modes so that we can select the
mode for executing the program.
6. To know the communication modes we have to go propertieshard waredevice
managerports.
7. In ports the required communication mode is shown as COM1 to COM9. In that it shown
are COM.
8. In system, we go to startprogramESA trainerWIN86E.
9. When we open WIN86E it will also ask whether to change mode in that we change it as
required.
10. The press CMD, then press rest 8086 trainer kit.
11. In this we type at the command. Linear as Z 2000 ending address.
12. And the ending address is any values as assume then the code displaying on monitor for
viewing output.
13. Set theI/P terminal on 8259 for display of interrupt msg.
14. By applying an external trigger button, we get the O/P & the generated interrupt is
displayed on command window.
[Link]: 2
INTERFACING OF 8255 WITH 8086
AIM: To study the operation of 8255 peripheral connected with 8086 microprocessor
THEORY:
The parallel input-output port chip 8255 is also known as programmablePeripheral input-output
port. It has 24 input-output lines which may be programmed into two groups of twelve lines the
groups are named as a group a and group B. group A contains an 8- bit part A long with a4- bit
part. the part A lines are identified by the symbols [Link] the port C lines are identified
by PC4_PC7.similarly group B,C lower (PC0-PC3) all of these parts and function independently
either as input and output port these can be achieved by programming the bits of an internal
register of 8255 called as control word register. The bit data bus buffer is controlled by read/write
control logic. Bar RD, WR, A1, A0 reset the input provided by the microprocessor to read/write
control logic. In this programmable I/O ports to control word register they areBitset(or) reset mod
Input/output mode
BSR MODE:
In this mode any one, of the 8- bit of port C can be set or reset depending on the D0 of the CWR
INPUT/OUTPUT MODE:
Depending on the D5, D6 bits of CWR. In this 3 modes are present
I) mode 0 Basic I/O mode
II) Mode 1 hand shaking and signal or strobe.
III) Mode2 bidirectional strobe.
All those modes can be selected by programming a register internal to 8255, known as a control
word register (CWR)
PROCEDURE:
1. Connect regular power supply to the 8086 kit.
2. Plug out the key board from pc and connect it to the 8086 kit.
3. Connect the 8255 with the 8086 kit using two parallel ATA cables.
4. Switch on the computer and click on the software ‘ESA 86E”.
5. Before continuing go to device manager and check the usb ports, whether the comport is
enabled, else re-connect it.
6. Go to file and click on an 8255 file. The program modes”BSR mode” and “i/o mode” are
available.
7. Click on any one of the mode and open the file
8. Observe the download programs and determine the end address.
9. Click on the command mode and press the reset button and type Z 2000
10. Enter g 2000 and the program is dumped into 8255 where the required O/P is observed
0000:201b 51 Push cx
0000:201C B9 30 00 MOV CX,0030
0000:201F B8 FF OF 201F: MOV AX,0FFF
0000:2022 48 2022: DEC AX
0000:2023 75 FD JNE 2022
0000:2025 E2 F8 IOOP 201F
0000:2027 59 POP CX
0000:2028 58 POP AX
0000:2029 C3 RET
RESULT :Hence studied the operation of 8255 interfacing the program using win 86e ESA
trainer.
[Link]
INTERFACING OF 8279 WITH 8086
AIM: To study the operation of Interfacing of 8279 peripherals with 8086 microprocessors.
HARD WARE USED: 8279 kit programmable peripheral interface with 8086 kit.
SOFT WARE USED: win 86E ESA trainer kit.
PROCEDURE:
DECODING METHOD: “-ESA PVT LED”
i) Connect regulated power supply to 8086 kit.
ii) Connect the 8279 with the 8086 kit using two parallel ATA cables & Switch on the
regulated power supply.
iii) Now, turn on the pc, open’s 86e’ trainer software.
iv) Before click on the 8279 modes, click on device manager and check out the USB serial
ports whether or gained or not.
v) Click on file and open the 8279 folder and Browse the decoding method hex file.
vi) Observe download program and check starting and ending address.
vii) Click on the command window.
3. PROGRAM TO SCAN THE HEX KEY PAD AND TO DISPLAY THE CODE ON THE
SEVEN SEGMENT DISPLAY USING ENCODE METHOD.
DX,OFFC2
0000:201d Ec Key: IN AL,DX To check if any
character is
available
0000:201e 24 07 AND AL,07
0000:2020 74 fb JZ KEY
0000:2022 Bo40 MOV A1,40
0000:2024 Ee OUT DX,AL
0000:2025 Bacoff MOV Read fifo ram
DX,OFFCO
0000:2028 Ec IN AL, DX Mask sift and ctrl
keys
0000:2029 24 if AND AL, IF
RESULT: Hence we studied the operation of interfacing of 8279 peripherals with 8086
microprocessor using win 86e ESA.
MICROCONTROLLER TRAINERKIT
8051 family of microcontrollers and its derivatives are increasingly becoming popular for
instrumentation and control applications due to its speed and powerful instruction set which
are essential for real-time applications. This has created the need for a good trainer and
development tools. ESA 51E (a low cost version of ESA 51) provides complete solution for
this requirement. It can be used as a flexible instructional aid in academic institutions and a
powerful development kit in R&D Labs.
MAINFEATURES
ESA 51E operates on single +5V power supply either in stand-alone mode using
PC keyboard and LCD or with host PC through serial (USB/RS-232-C) interface
in serial mode implemented using the on chip serial port of microcontroller.
Stand-alone and serial monitor programs support the entry of user programs,
editing and debugging facilities like single stepping and full speed execution of
userprograms.
ESA 51E Microcontroller Trainer is versatile and can be configured in two different
modes, which are determined by DIP switch settings (refer to the component layout
diagram in Appendix A to locate the DIP switch). This chapter describes all the
configurable options and the installationprocedures.
OPERATIONAL MODESELECTION
ESA 51E can be operated either in the stand-alone mode using PC keyboard and LCD or
in the serial mode through serial (USB/RS-232-C) interface. In the serial mode, the trainer
is connected to a host PC through a serial (USB/RS-232-C) interface. In either mode of
operation, the system provides a variety of commands for program
development/debugging, several features like one-line assembler, disassembler etc.; the
selection of the desired mode of operations is done as follows
BAUD RATESELECTION
In the serial mode of operation, ESA51 configures the on-chip port of 8051 as follows:
* Asynchronousmode
* 8-bit characterlength
* 1 stopbit
* noparity
Baud rate selection for Serial Communication (USB/RS-232-C) can be set using DIP
switches 6 to 8 as shown below:
S6 S7 S8 BaudRate
ON ON ON 1200
ON ON OFF 1200
ON OFF ON 1200
ON OFF OFF 1200
OFF ON ON 2400
OFF ON OFF 4800
OFF OFF ON 9600*
OFF OFF OFF 19,200
INSTALLATION OF ESA51E
To install ESA51E, the following accessories are required.
a) Power Supply 5V@ 1A ormore
b) For serial mode ofoperations
Host PC with the windows driver software for host PC. (Refer chapter 10 for details).
ESA 51E performs POST (Power On Self Test) operation. During the POST operation all
register will be intialized to CPU‟s reset condition. Then displays the following Sign On
message followed by the command prompt „>‟ in the next line.
b) Connect the power supply of required capacity to ESA51E and switch-on thepower.
POST
Power- On Self Test is being done. Following initializations
condition.
Then displays the following Sign On message followed by the command prompt `>' in the next
line.
ESA -51E
Press reset
Press enter
st
Enter 1 mnemonic
Press enter
Press enter
---
Press enter
RESET
Press enter
Press enter
Result: Press R
A, B, R0, -------, Rn
For values to particular address location
Press MD(Address location)
Arithmetical operations:
i) 8 bit addition
ALGORITHM :
1. Load accumulator A with any desired 8-bit data.
2. Load the register B with the second 8- bit data.
3. Add these two 8-bit numbers.
4. Store the result.
5. Stop the program.
PROGRAM:
OUTPUT:
Input Output
A 02 A 04
B 02
ALGORITHM :
1. Load accumulator A with any desired 8-bit data.
2. Load the register B with the second 8- bit data.
3. Subtract these two 8-bit numbers.
4. Store the result.
5. Stop the program.
PROGRAM:
OUTPUT:
Input Output
A 04 A 02
B 02
ALGORITHM :
1. Get the multiplier in the accumulator.
2. Get the multiplicand in the B register.
3. Multiply A with B.
4. Store the product in memory.
PROGRAM:
INC DPTR
MOVX A,@DPTR
MUL AB
LCALL 03
OUTPUT:
Input output
9000 03 A 06
9001 02
ALGORITHM :
1. Get the Dividend in the accumulator.
2. Get the Divisor in the B register.
3. Divide A by B.
4. Store the Quotient in memory
PROGRAM:
INC DPTR
MOVX A,@DPTR
MOV F0,A
MOV A,R0
DIV AB
LCALL 03
OUTPUT:
Input output
9000 03 A 06
9001 02
v) 16 bit addition:
ALGORITHM :
1. Start the Program.
2. Get the first number is specific address.
3. Add the second number to the first number.
4. Add the two values
5. Store the sum
6. Stop the Program.
PROGRAM:
8013 INC R2
801E LCALL 03
OUTPUT:
Input Output
9500 BC 9504 80
9501 19 9505 34
9502 88 9506 01
9503 99
logical operations:
i) AND operation
ALGORITHM :
1. Load accumulator A with any desired 8-bit data.
2. Load the register R0 with the second 8- bit data.
3. AND these two 8-bit numbers.
4. Store the result.
5. Stop the program
PROGRAM:
MOV R0,#14
8000
MOV A,#12
ANL A,R0
MOV R1,A
LCALL 03
OUTPUT:
Input output
R0 14H R1 10
A 12H
ALGORITHM :
1. Load accumulator A with any desired 8-bit data.
2. Load the register R0 with the second 8- bit data.
3. XOR these two 8-bit numbers.
4. Store the result.
5. Stop the program
PROGRAM:
MOV R0,#23
8000
MOV A,#34
XRL A,R0
MOV R1,A
LCALL 03
OUTPUT:
Input output
R0 23H R1 17
A 34H
ii) OR operation
ALGORITHM :
1. Load accumulator A with any desired 8-bit data.
2. Load the register R0 with the second 8- bit data.
3. OR these two 8-bit numbers.
4. Store the result.
5. Stop the program.
PROGRAM:
MOV R0,#8
8000
MOV A,#6
ORL A,R0
MOV R1,A
LCALL 03
OUTPUT:
Input output
R0 8H R1 14H
A 6H
EXP NO:3 Finding no. of 1’s and 0’s in a given 8 bit number
AIM: Program in 8051 microcontroller to find out the number of 1’s and 0’s in a
8bit number.
PROGRAM:
8000
MOV R1,#00
8002
MOV R2,#00
8004
MOV R7,#08
8006
MOV A,#97
8008
RLC A
8009
JC 800E
800B
INC R2
800C
DJNZ R7,8008
800E
SJMP 8010
OUTPUT:
Inpu
t Output
Number of
R0 24H zero’s R1 06
Number of
one’s R2 02
EXP NO:4 Program for sorting an array in ascending order using 8051kit
AIM: Program to sort the given numbers in ascending order
PROGRAM:
OUTPUT:
INPUT OUTPUT
Memory Memory
Data Data
Location Location
VIVA:
9. Explain Db.?