You are on page 1of 27

Ex.No.

2 ADDITION OF TWO 8 BIT NUMBERS Aim: To write a program for adding the given two 8- bit number and store the result in the memory . Specifications: Microprocessor :Intel 8085 perating !re"uency :#.0$%M&' (ser )*M *rea :+$00-5!!! A !o"it#m: $. ,oad the accumulator by data in the address +%00& %. Move the contents of the accumulator to - )egister #. ,oad the accumulator by data in the address +%0$& +. .lear . )egister 5. *dd the content of the accumulator to - )egister content /. If no carry 0ump to loop 1. Increment . )egister 8. 2hift the content of the accumulator to the location +%0# 3. Move the contents of the . )egister to accumulator. $0. 2hift the content of the accumulator to the location +%0+ $$. &ault the current 4rogram

$"o!"am:
ADDRESS )E* 'ODE (ABE( MNEMONI'S O$ERAND 'OMMENTS

+$00 +$0# +$0+ +$01 +$03 +$0* +$0: +$06 +$$$ +$$% +$$5

#*7007+% +1 #*70$7+% 06700 80 :%7067+$ 0. #%70%7+% ,oop 13 #%70#7+% 1/

,:* M ; ,:* M;I *:: <=. I=) 2T* M ; 2T* &,T

+%00 -7* +%0$ .700 loop . +%0% *7. +%0#

,oad the accumulator with data in +%00 Move the contents of the accumulator to - )egister ,oad the accumulator with data in +%0$ .lear . )egister *dd the content of the )egister to accumulator. If no carry 0ump to loop Increment . )egister 2hift the content of the accumulator to the location +%0% Move the contents of the . )egister to the accumulator. 2hift the content of the accumulator to the location +%0# 2top the current 4rogram

$"oce%&"e: $. 5ey in opcode from the address specified %. 6nter data to +%007 +%0$. #. 68ecute the program and chec9 the result at +%0% and +%0#. Res& t: Thus the 8-bit addition with carry is performed.
'ONTENT IN$UT FIE(D OUT$UT FIE(D ADDRESS FIE(D DATA FIE(D

+%00 +%0$ +%0% +%0#

0+& 03& 0:& 00&

Ex.No.+ ADDITION OF TWO ,- BIT NUMBERS Aim: To write an assembly language program to add the given two $/- bit number with carry and store the result in the memory . Specifications: Microprocessor :Intel 8085 perating !re"uency :#.0$%M&' (ser )*M *rea :+$00-5!!! A !o"it#m: $. ,oad the ,2- of first data accumulator %. Move it to - )egister #. ,oad the ,2- of the second data in accumulator +. *dd the content of the accumulator and - )egister. 5. 2tore the result in the given location /. ,oad the M2- of the first data in the accumulator. 1. Move it to - )egister 8. ,oad the M2- of the second data in accumulator 3. *dd the content if no carry 0ump to address specified $0. If carry e8ist increment . )egister $$. 2hift the content of the accumulator to the desired location $%. Move the contents of the . )egister to accumulator. $#. 2hift the content of the accumulator to the desired location $+. &ault the current 4rogram

$"o!"am:
ADDRESS )E* 'ODE (ABE( MNEMONI'S O$ERAND 'OMMENTS

+$00

#*7007+%

,:*

+%00

,oad the accumulator with data in +%00

+$0# +$0+ +$01 +$08 +$0+$0: +$$0 +$$$ +$$+ +$$5 +$$8 +$$3 +$$. +$$: +$$6

+1 #*70%7+% 80 #%70+7+% 06700 #*70$7+% +1 #*70#7+% 88 :%7$37+$ 0. #%7057+% 13 #%70/7+% 1/

M ; ,:* *:: 2T* M;I ,:* M ; ,:* *:. <=. I=) 2T* M ; 2T* &,T

-7* +%0% +%0+ .700 +%0$ -7* +%0# ,oop . +%05 *7. +%0/

Move the contents of the accumulator to - )egister ,oad the accumulator with data in +%0% *dd the content of the )egister to accumulator. 2tore the content of the * to the location +%0+ .lear . )egister ,oad the content of the accumulator to the location Move the contents of the accumulator to - )egister ,oad the content of * to the location +%0# *dd - register with *ccumulator and carry If no carry <ump to ,oop Increment . register 2tore the content of * to the location +%05 Move the content of . to *ccumulator 2tore the content of * to the location +%0/ 2top the current 4rogram

,oop

$"oce%&"e: $. 5ey in opcode from the address specified %. 6nter data to +%007 +%0# #. 68ecute the program and chec9 the result at the specified location Res& t: Thus the $/-bit addition with carry is performed.
'ONTENT ADDRESS FIE(D IN$UT FIE(D +%00 DATA FIE(D

+%0$ +%0% +%0#


OUT$UT FIE(D

$5& *0& 15& -$& 8*& 5$& 0$&

+%0+ +%05 +%0/

Ex.No. . SUBTRA'TION OF 8 BIT NUMBERS Aim: To write an assembly language program to subtract the given 8 bit number and to store the result in the memory . Specifications: Microprocessor :Intel 8085 perating !re"uency :#.0$%M&' (ser )*M *rea :+$00-5!!! A !o"it#m: $. ,oad the accumulator by data in the address +%00& %. Move the contents of the accumulator to - )egister #. ,oad the accumulator by data in the address +%0$& +. .lear . )egister 5. 2ubtract the content of the accumulator from - )egister content /. If no carry 0ump to loop 1. Increment . )egister 8. 2hift the content of the accumulator to the location +%0# 3. Move the contents of the . )egister to accumulator. $0. 2hift the content of the accumulator to the location +%0+ $$. &ault the current 4rogram

$"o!"am:
ADDRESS )E* 'ODE (ABE( MNEMONI'S O$ERAND 'OMMENTS

+$00 +$0# +$0+ +$01 +$03 +$0* +$0: +$06 +$0! +$$$ +$$+ +$$5 +$$8

#*7007+% +1 #*70$7+% 06700 30 :%7$$7+$ 0. %! ./70$ #%70%7+% ,oop 13 #%70#7+% 1/

,:* M ; ,:* M;I 2(<=. I=) .M* *:I 2T* M ; 2T* &,T

+%00 -7* +%0$ .700 ,oop . * 0$& +%0% *7. +%0#

,oad the accumulator with data in +%00 Move the contents of the accumulator to - )egister ,oad the accumulator with data in +%0$ .lear . )egister 2ubtract the content of the )egister to accumulator. If no carry 0ump to loop Increment . )egister .omplement * register *dd immediately 0$& 2hift the content of the accumulator to the location +%0% Move the contents of the . )egister to the accumulator. 2hift the content of the accumulator to the location +%0# 2top the current 4rogram

$"oce%&"e: $. 5ey in opcode from the address specified %. 6nter data to +%007 +%0$. #. 68ecute the program and chec9 the result at +%0% and +%0#. Res& t: Thus the 8-bit 2ubtraction is performed.
'ONTENT IN$UT FIE(D OUT$UT FIE(D ADDRESS FIE(D DATA FIE(D

+%00 +%0$ +%0% +%01

**& --& 6!& 0$&

Ex.No. / B'D SUBTRA'TION Aim: To write an assembly language program to subtract the given -.: numbers and to store the result in the memory. Specifications: Microprocessor :Intel 8085 perating !re"uency :#.0$%M&' (ser )*M *rea :+$00-5!!! A !o"it#m: $. ,oad the accumulator by data in the address +%00& %. Move the contents of the accumulator to - )egister #. ,oad the accumulator by data in the address +%0$& +. Move the contents of the accumulator to 6 )egister 5. ,oad Immediate 33 to find 3>s .omplement /. 2ubtract the content of the 6 )egister content with accumulator 1. *dd 0$& with *ccumulator 8. *dd the content of - register with *ccumulator 3. *d0ust *ccumulator content to :ecimal $0. 2tore the result $$. &ault the current 4rogram

$"o!"am:
ADDRESS )E* 'ODE (ABE( MNEMONI'S O$ERAND 'OMMENTS

+$00 +$0# +$0+ +$01 +$08 +$0* +$0+$0: +$06 +$0! +$$%

#*7007+% +1 #*70$7+% +! #6733 3$ ./70$ 80 %1 #%70%7+% 1/

,:* M ; ,:* M ; M;I 2(*:I *:: :** 2T* &,T

+%00 -7* +%0$ .7* *733 . 0$ +%0%

,oad the accumulator with data in +%00 Move the contents of the accumulator to - )egister ,oad the accumulator with data in +%0$ Move the contents of the accumulator to . )egister Move the value to *ccumulator 2ubtract the content of the . )egister to accumulator. *dd immediate value 0$ *dd the value of accumulator to . .onvert it to -.: value 2tore the content of the accumulator to the location +%0% 2top the current 4rogram

$"oce%&"e: $. 5ey in opcode from the address specified %. 6nter data to +%007 +%0$. #. 68ecute the program and chec9 the result at +%0% Res& t: Thus the -.: 2ubtraction is performed.
'ONTENT IN$UT FIE(D OUT$UT FIE(D ADDRESS FIE(D DATA FIE(D

+%00 +%0$ +%0%

%5& 50& %5&

Ex.No.8 0 BIT MU(TI$(I'ATION Aim: To write a program for multiplying the given two 8- bit number and store the result in the memory. Specifications: Microprocessor :Intel 8085 perating !re"uency :#.0$%M&' (ser )*M *rea :+$00-5!!! A !o"it#m: $. ,oad the accumulator by data in the address +%00& %. Move the contents of the accumulator to - )egister #. ,oad the accumulator by data in the address +%0$& +. Move the contents of the accumulator to . )egister 5. .lear . )egister and *ccumulator /. *dd the content of the accumulator to - )egister content 1. If no carry 0ump to loop 8. Increment : )egister 3. :ecrement . )egister $0. <ump on no 'ero to loop$ $$. 2tore the content of the accumulator to the desired location $%. Move the contents of the : )egister to accumulator $#. 2hift the content of the accumulator to the desired location $+. &ault the current 4rogram

$"o!"am:
ADDRESS )E* 'ODE (ABE( MNEMONI'S O$ERAND 'OMMENTS

+$00 +$0# +$0+ +$01 +$08 +$03 +$0+$0. +$0! +$$0 +$$$ +$$+ +$$1 +$$8 +$$-

#*7007+% +1 #*70$7+% +! *! $/700 80 :%7$07+$ $+ 0: .%70-7+$ #%70%7+% 1* #%70#7+% 1/ ,oop

,:* M ; ,:* M ; ?)* M;I *:: <=. I=) :.) <=@ 2T* M ; 2T* &,T

+%00 -7* +%0$ .7* * :700 ,oop : . ,oop$ +%0% *7: +%0#

,oop$

,oad the accumulator with data in +%00 Move the contents of the accumulator to - )egister ,oad the accumulator with data in +%0$ Move the contents of the accumulator to . )egister .lear * register .lear : register *dd the contents of accumulator to - register <ump to given location if there is no carry Increment the : register :ecrement the . register <ump to given location if it is not 'ero 2tore the content of * to the location +%0% Move the contents of : register to accumulator 2tore the content of * to the location +%0# 2top the current 4rogram

$"oce%&"e: $. 5ey in opcode from the address specified %. 6nter data to +%007 +%0$. #. 68ecute the program and chec9 the result at +%0% and +%0#. Res& t: Thus the 8-bit multiplication is performed.
'ONTENT IN$UT FIE(D OUT$UT FIE(D ADDRESS FIE(D DATA FIE(D

+%00 +%0$ +%0% +%0#

0+& 0#& 0.& 00&

Ex.No.1 B'D MU(TI$(I'ATION Aim: To write a program for multiplying the given two 8-bit -.: number and store the result in the memory. Specifications: Microprocessor :Intel 8085 perating !re"uency :#.0$%M&' (ser )*M *rea :+$00-5!!! A !o"it#m: $. ,oad the accumulator by data in the address +%00& %. Move the contents of the accumulator to - )egister #. ,oad the accumulator by data in the address +%0$& +. Move the contents of the accumulator to . )egister 5. .lear : )egister and *ccumulator /. *dd the content of the accumulator to - )egister content 1. *d0ust for decimal 8. If no carry 0ump to loop 3. Increment : )egister $0. :ecrement . )egister $$. <ump on no 'ero to loop$ $%. 2tore the content of the accumulator to the desired location $#. Move the contents of the : )egister to accumulator $+. 2tore the content of the accumulator to the desired location $5. &ault the current 4rogram

$"o!"am:
ADDRESS )E* 'ODE (ABE( MNEMONI'S O$ERAND 'OMMENTS

+$00 +$0# +$0+ +$01 +$08 +$03 +$0+$0. +$0: +$$0 +$$$ +$$% +$$5 +$$8 +$$3 +$$.

#*7007+% +1 #*70$7+% +! *! $/700 80 %1 :%7$$7+$ $+ 0: .%70-7+$ #%70%7+% 1* #%70#7+% 1/ ,oop ,oop$

,:* M ; ,:* M ; ?)* M;I *:: :** <=. I=) :.) <=@ 2T* M ; 2T* &,T

+%00 -7* +%0$ .7* * :700 -

,oad the accumulator with data in +%00 Move the contents of the accumulator to - )egister ,oad the accumulator with data in +%0$ Move the contents of the accumulator to . )egister .lear * register .lear : register *dd the contents of register to * :ecimal ad0ust the contents of accumulator <ump to given location if there is no carry Increment the : register :ecrement the . register <ump on no 'ero to ,oop$ 2tore the content of * to the location +%0% Move the contents of the to : )egister to accumulator 2tore the content of * to the location +%0% 2top the current 4rogram

,oop : . ,oop$ +%0% *7: +%0#

$"oce%&"e: $. 5ey in opcode from the address specified %. 6nter data to +%007 +%0$. #. 68ecute the program and chec9 the result at +%0% and +%0#. Res& t: Thus the 8-bit -.: multiplication is performed.
'ONTENT IN$UT FIE(D OUT$UT FIE(D ADDRESS FIE(D DATA FIE(D

+%00 +%0$ +%0% +%0#

0+& 0#& $%& 00&

E*.NO.8 8 BIT DI2ISION Aim: To write a program for dividing the given 8- bit number and store the result in the memory Specifications: Microprocessor :Intel 8085 perating !re"uency :#.0$%M&' (ser )*M *rea :+$00-5!!! A !o"it#m: $. ,oad the accumulator by data in the address +%00& %. Move the contents of the accumulator to . )egister #. ,oad the accumulator by data in the address +%0$& +. .lear : )egister 5. 2ubtract - )egister /. Increment . )egister and compare - register with accumulator 1. If no carry 0ump to loop 8. 2tore the content of the accumulator to the location +%0# 3. Move the contents of the : register to accumulator. $0. 2tore the content of the accumulator to the location +%0+ $$. &ault the current 4rogram

$"o!"am:
ADDRESS )E* 'ODE (ABE( MNEMONI'S O$ERAND 'OMMENTS

+$00 +$0# +$0+ +$01 +$03 +$0* +$0+$0. +$0! +$$$ +$$% +$$5

#*7007+% +8 #*70$7+% $/700 3$ $+ -3 :%7037+$ #%70%7+% 1* #%70#7+% 1/

,:* M ; ,:* M;I 2(I=) .M4 <=. 2T* M ; 2T* &,T

+%00 .7* +%0$ :700 . : . ,oop +%0% *7: +%0#

,oop

,oad the accumulator with data in +%00 Move the contents of the accumulator to . )egister ,oad the accumulator with data in +%0$ .lear : )egister 2ubtract the content of the . )egister to accumulator. Increment : )egister .ompare with . reg If no carry 0ump to loop 2tore the content of * to the location +%0% Move the contents of the : )egister to the * 2tore the content of * to the location +%0# Terminate the program

$"oce%&"e: $. 5ey in opcode from the address specified %. 6nter data to +%007 +%0$. #. 68ecute the program and chec9 the result at +%0% and +%0#. Res& t: Thus the 8-bit :ivision is performed.
'ONTENT IN$UT FIE(D OUT$UT FIE(D ADDRESS FIE(D DATA FIE(D

+%00 +%0$ +%0% +%08

0%& 10& 00& #5&

E*.NO.3 B(O'4 MO2E AND RE2ERSIN5 AN ARRA6 OF E(EMENTS Aim: To write an assembly language program to perform bloc9 move and reversing an array of elements. Specification: Microprocessor perating fre"uency (ser )*M area A !o"it#m: B oc7 Mo8e: $. %. #. +. 5. /. 1. 8. 3. Move immediately the data 05& to the register .. ,oad the &,-register pair with data. ,oad the :6-register pair with data. Move the contents of memory to the accumulator. 2tore the content of the :6 register pair. Increment the &,-register pair. :ecrement the register-.. If no 'ero 0ump to the loop. 2top the program. : Intel 8085 : #.$0% M&@ : +$00-5!!!&

Re8e"sin! An A""a9 Of E ements: $. ,oad the &, register pair with some data in +%00 %. ,oad the -. register pair in +#00 #. Move immediately the data 05& to the register :. +. Move the .-register value to the accumulator. 5. *dd the content of the accumulator with :-register. /. Move the accumulator content to the .-register. 1. :ecrement the content of the -6-register pair. 8. Move the content of M to the accumulator. 3. 2tore the content of the -.-register pair. $0. Increment the content of the &,-register pair. $$. :ecrement the content of the -.-register pair. $%. :ecrement the content of :-register. $#. If no 'ero 0ump to the loop. $+. 2top the process.

$"o!"am: B oc7 Mo8e:


ADDRESS )E*'ODE (ABE( MNEMONI' O$ERAND 'OMENTS

+$00 +$0% +$05 +$08 +$03 +$0* +$0+$0. +$0: +$$0

06705 %$.007+% 0$7007+# 16 $% %# $# 0: .%7087+$ 1/ ,oop

M;I ,?I ,?I M ; 2T*? I=? I=? :.) <=@ &,T

.705 &7+%00 :7+#00 *7M : & : . ,oop

Move immediately the data 05& to the register .. ,oad the &,-register pair with data. ,oad the :6-register pair with data. Move the contents of memory to the accumulator. 2tore the content of the :6 register pair. Increment the &,-register pair. Increment the :6-register pair. :ecrement the register-.. If no 'ero 0ump to the loop. 2top the program.

Re8e"sin! An A""a9 Of E ements:


ADDRESS )E*'ODE (ABE( MNEMONI'S O$ERAND 'OMMENTS

+$00 +$0# +$0/ +$08 +$03 +$0* +$0+$0. +$0: +$06 +$0! +$$0 +$$$ +$$+

%$7007+% :$7007+# $/705 13 8% +! 016 0% %# 0$5 /%70.7+$ 1/ ,oop

,?I ,?I M;I M ; *:: M ; :.? M ; 2T*? I=? :.? :.) <=. &,T

&7+%00 -7+#00 :705 *7. : .7* *7M & : ,oop

,oad the &, pair with some data in +%00 ,oad the -. pair in +#00 Move immediately the data 05& to : register Move the .-register value to the * *dd the content of : with *ccumulator Move the accumulator content to the .-register :ecrement the content of the -6-register pair Move the content of M to the accumulator 2tore the content of the -.-register pair Increment the content of the &,-register pair :ecrement the content of the -.-register pair. :ecrement the content of :-register. If no carry 0ump to the loop. 2top the process.

$"oce%&"e: B oc7 Mo8e an% Re8e"sin!

An A""a9 Of E ement:

$. 5ey in opcode from the specified location. %. 6nter the data into the memory and e8ecute the program. #. .hec9 for the result and stop the program. Re8e"sin! An A""a9 Of E ements:
Res& t:

Thus bloc9 moving and reversing an array of element is e8ecuted successfully and the output is verified. B oc7 Mo8e:
'ONTENT IN$UT FIE(D ADDRESS FIE(D DATA FIE(D

+%00 +%0$ +%0% +%0# +%0+ +#00 +#0$ +#0% +#0# +#0+

0$& 0%& 0#& 0+& 05& 0$& 0%& 0#& 0+& 05&

OUT$UT FIE(D

Re8e"sin! An A""a9 Of E ements:


'ONTENT ADDRESS FIE(D IN$UT FIE(D +%00 DATA FIE(D

+%0$ +%0% +%0# +%0+


OUT$UT FIE(D

0$& 0%& 0#& 0+& 05& 05& 0+& 0#& 0%& 0$&

+#00 +#0$ +#0% +#0# +#0+

Ex.No.,: AS'ENDIN5 ORDER AND DES'ENDIN5 ORDER Aim: To write an assembly language program to perform ascending order and descending order. Specification: Microprocessor : I=T6, 8085 perating fre"uency : #.$0% M&@ (ser )*M area : +$00-5!!!& A !o"it#am: Ascen%in! O"%e" an% Descen%in! O"%e": $. %. #. +. 5. /. 1. Move immediately the data 0+& to .-register. ,oad the &,-register pair in the location +%00& Move immediately the data 0#& to :-register Move the content if M to the accumulator Increment the content of &l register pair .ompare the content of M register with accumulator. If carry is present 0ump to loop for ascending order and 0ump on no carry to loop for descending order. 8. Move the content of M to the --register 3. Move the accumulator content to M-register pair $0. :ecrement the content of the &,-register pair. $$. Move the content of --register to M register. $%. Increment the &,-register pair $#. :ecrement the :-register. $+. If no 'ero 0ump to the loop $5. :ecrement the content of .-register. $/. If no 'ero 0ump to the loop $1. 2top the program.

$"o!"am:
ADDRESS )E*'ODE (ABE( MNEMONI'S O$ERAND 'OMMENTS

+$00 +$0% +$05 +$01 +$08 +$03 +$0* +$0: +$06 +$0! +$$0 +$$$ +$$% +$$# +$$/ +$$1 +$$*

0670+ %$7007+% $/70# 16 %# -6 :*7$%7+$ +/ 11 %10 %# $5 .%7017+$ 0: .%70%7+$ 1/ ,oop$ ,oop% ,oop#

M;I ,?I M;I M ; I=? .M4 <. M ; M ; :.? M ; I=? :.) <=@ :.) <=@ &,T

.70+ &7+%00 :70# *7M & M ,oop$ -7M M7* & M7& : ,oop% . ,oop#

Move immediately 0+& to .-register. ,oad the &,-register pair in the location +%00 Move immediately the data 0#& to :-register Move the content if M to the accumulator Increment the content of &, register pair .ompare contents of M with accumulator. If carry is present 0ump to ,oop$ Move the content of M to the --register Move the accumulator content to M-register pair :ecrement the content of the &,-register pair. Move the content of - to M register. Increment the &, pair :ecrement the : reg. If no 0ump to the ,oop% :ecrement the content of .-register. <ump on 'ero to the loop# 2top the program.

$"o!"am:
ADDRESS )E*'ODE (ABE( MNEMONI'S O$ERAND

'OMMENTS

+$00 +$0% +$05 +$01 +$08 +$03 +$0* +$0: +$06 +$0!

0670+ %$7007+% $/70# 16 %# -6 :%7$%7+$ +/ 11 %-

,oop# ,oop%

M;I ,?I M;I M ; I=? .M4 <=. M ; M ; :.?

.70+ &7+%00 :70# *7M & M ,oop$ -7M M7* &

Move the 0+& to .-register ,oad the &,-register pair Move immediately the data 0#& to :-register Move the content if M to the accumulator Increment the content of &, register pair .ompare the M with accumulator. If no carry 0ump to loop$ Move the content of M to the --register Move the accumulator content to M-register :ecrement the content of

+$$0 +$$$ +$$% +$$# +$$/ +$$1 +$$*

10 %# $5 .%7017+$ 0: .%70%7+$ 1/ ,oop$

M ; I=? :.) <=@ :.) <=@ &,T

M7& : ,oop% . ,oop#

the &,-register pair. Move the content of -register to M register. Increment the content of &,-register pair :ecrement the content of :-register. <ump on no 'ero to loop% :ecrement the content of .-register. <ump on no 'ero to loop# 2top the program.

$"oce%&"e: Ascen%in! O"%e" An% Descen%in! O"%e": $. 5ey in opcode from the specified location. %. 6nter the data into the memory and e8ecute the program. #. .hec9 for the result and stop the program. Res& t: Thus the ascending order and descending order are e8ecuted successfully and the output is verified Ascen%in! O"%e":
'ONTENT IN$UT FIE(D ADDRESS FIE(D DATA FIE(D

+%00 +%0$ +%0% +%0# +%00 +%0$ +%0% +%0#

0/& 0$& 08& 0%& 0$& 0%& 0/& 08&

OUT$UT FIE(D

Descen%in! O"%e":
'ONTENT IN$UT FIE(D ADDRESS FIE(D DATA FIE(D

+%00 +%0$ +%0% +%0# +%00 +%0$ +%0% +%0#

05& 0$& 01& 0#& 01& 05& 0#& 0$&

OUT$UT FIE(D

Ex.No.,, TRAFFI' 'ONTRO((ER Aim: To write an assembly language program to do traffic signal controller and store result in memory. Specification: Microprocessor : I=T6, 8085 perating fre"uency : #.$0% M&@ (ser )*M area : +$00-5!!!& A !o"it#m: $. ,oad the &,-register pair7 move the data . to .-register. %. Move the pair to *-register7 out the counter #. Increment &, pair7 move &, pair to *-register. +. ut the port *7 increment &, pair. 5. Move the &, pair to *-register7 out port -7 call delay. /. Increment &, pair7 decrement . register. 1. If no 0ump to loop$7 0ump to start. 8. 4ush -7 initiali'e 05 to .-register. 3. Move :-register to accumulator $0. ) the 6-register $$. If no 0ump to loop7 decrement . register. $%. If no 0ump to loop7 pop the --register. $#. )eturn.

$"o!"am:
ADDRESS )E*'ODE (ABE( MNEMONI'S O$ERAND 'OMMENTS

+$00 +$0# +$05 +$0/ +$08 +$03 +$0* +$0. +$0: +$06 +$$0 +$$# +$$+ +$$5 +$$8 +$$+$$. +$$6 +$%$ +$%% +$%# +$%+ +$%1 +$%8 +$%+$%.

%$7007+5 67 . 16 :#7 ! %# 16 :#7 . %# 16 :#7 : .:7$-7+$ %# : .%7037+$ .#7007+$ .5 6705 $$7!!7!! $1* -# .%7%$7+$ : .%7$67+$ .$ .3

2tart

,?I M;I M ; (T I=? M ; (T I=? M ; (T .*,, I=? :.) <=@ <M4 4(2& M;I ,?I :.? M ; )* <=@ :.) <=@ 4 4 )6T

&7+500 .7 . *7M .=T & *7M * & *7M :elay & . , 4$ 2tart .705 :7!!7!! : *7: 6 ,oop% . ,oop# -

,oop$

:elay ,oop# ,oop%

,oad the &,-register pair Move data . to . register Move &, contents to accumulator .ount the value Increment &, pair Move the content of M to *-register ut * port Increment &, register pair Move the content of M to accumulator ut - port .all the :elay Increment &, pair :ecrement the . register If no 'ero 0ump to loop <ump to 2tart 4ush - register Move data 05 to . register ,oad the :6-pair :ecrement :-register Move :-register to accumulator ) the 6-register If no 'ero 0ump to ,oop% :ecrement .-register If no 'ero 0ump to ,oop# 4op the --register )eturn

$"oce%&"e: +. 5ey in opcode from the specified location. 5. 6nter the data in +500 to +508. Res& t: Thus the traffic signal controller is carried out. 'ONTENT Input field ADDRESS FIE(D +500 DATA FIE(D 807$*7*$7/+7 *+78$75*7/+75+

Ex.No.,2 STUD6 OF 8:8- MI'RO$RO'ESSOR Aim: To study about the operation of 808/ Microprocessor Specification: ,. 4rocessor7 .loc9 !re"uency: Intel 808/A8088.4( at 5A+.11 M&' .loc9 2. Memory: M =IT ) 64) M 64) M 6?4*=2I = 2B2T6M )*M 2B2T6M )*M 6?4*=2I = I=T6))(4T ;6.T )2 2T*.5A:*T* *)6* +. 46)I4&6)*,2: 4*)*,,6, IA 26)I*, Timer .. :I24,*B /. 56B- *): : +8 IA lines using two numbers of 8%55 : one number of )2%#%. E 2erial Interface using 8%5$* (2*)T : # .hannel $/- 4rogrammable Timer 8%5#. .hannel 0 used as baud rate generator for the 2erial 4ort : $/F% ,.: :I24,*B : I-M 4.-*T 56B- *): : !000:0000-#!!! for $/5 : !000:0000-$!!! for /+5 : 0000:$000-#!!! for $/5 : 0000:$000-!!!! for /+5 : 0000:0000-0#!! : 0000:0+00-0!!!

CM =IT )7*2MA:2M76:IT )D

-. *(:I .*226TT6 I=T6)!*.6 GIT& !I,6 M*=*H6M6=T 1. 2B2T6M 4 G6) . =2(M4TI =: I5; : $.5 *mps 8. 4 G6) 2(44,B 246.I!I.*TI =2: Model Mains Input utput : 2M42-0$ : %#0; *. at 50&' : %#0; *. at 50& : I5;olts7 # *mps regulated I$%;olts7 %50 m* regulated -$%;olts7 %50 m* regulated I#0;olts7 %50m* regulated 3. 4&B2I.*, .&*)*.T6)I2TI.2: M -8/A88 ,.: 4.: 8#0mmF/80mm

,:. -us 68pansion: * new concept of ;?TJ-us has been incorporated in M E 8/A88 ,.: which facilitates addition of e8tra hardware on to M-8/A88 ,.:. *n unlimited number of *dd- n -oards can be added to this e8pansion bus. *ll buffered address7 data and control signals are brought out to this bus. The trainer provision for one ;?TJ-us connectors. 'OMMAND 4E6 FUN'TION MEMOR6: RES : This )62 9ey allows the user to terminate any activity and return the M- 8/A88 ,.: to an initiali'ed state. Ghen pressed7 message appears in the display for a few seconds and then the monitor will come to the command prompt KT6.&-808/L only after this prompt is displayed7 the commands will be accepted. INT : The INT 9ey allows the user to interrupt any activity and return to the command prompt. S&;stit&te Memo"9 'omman%: F&nction: This command is used to e8amine the contents of selected memory location and modify the )*M contents if desired. S9ntax: <i= M2M2N*::)O N.)O <ii= M2G M2G N*::)O N.)O Re!iste" 'omman%: S9ntax: M) ) N.)O N)ON.)O )egister viewAmodify command word .arriage )eturn N*::)ON.)O 2ubstitute byte command word (ser can enter the address in segment 5eyboard )eturn 2ubstitute Gord command word address either segment 5eyboard )eturn

N*::)ON.)O

5o an% Exec&te 'omman%: F&nction: The Ho and 68ecute command is used to run a program. This command transfers control of the 808/* .4( from the monitor program to user programs. S9ntax: MH MH N*::)O N.)O F&nction: This command e8ecutes a bloc9 of program whose start and end address are specified. S9ntax: MH MH Nstart *::)O N6nd *::)O N.)O T"ace comman%: F&nction: This command helps the user to e8ecute programs in steps i.e Instruction. This command will be very helpful while debugging programs. S9ntax: MT) N*::)ON.)O MT) N*::)O N.)O Fi comman%: F&nction: This command permits a bloc9 of )*M memory to be filled with desired data byte. S9ntax: CiD M!N2tart *::)ON6nd *::)ON-yte dataON.)O Trace command word 4rogram starting address .arriage )eturn N2tart *::)ON6nd *::)ON.)O Ho with brea9 command 4rogram start address 4rogram end address .arriage )eturn N*::)ON.)O Ho command $/ bit address .arriage )eturn

5o an% Exec&te 'omman% >it# ;"ea7 point:

M !N2tart *::) O N6nd *::)O N-yte dataO N.)O CiiD M!G M !G N2tart *::) O N6nd *::)O N-yte dataO N.)O Inse"t comman%: F&nction:

!ill byte command word -loc9 starting address -loc9 ending address Gord data to be filled .arriage )eturn !ill Gord command word -loc9 starting address -loc9 ending address Gord data to be filled .arriage )eturn

N2tart *::)ON6nd *::)ONdataON.)O

This command inserts specified file bytes in the desired memory location. S9ntax: MI2- NInsert *::)ON4rogram 6nd *::) ON.)O M I2NInsert *::)O N4rogram 6nd *::)O N.)O De ete comman%: F&nction: This command deletes a bloc9 of bytes from a memory. S9ntax: M:6M :6Nstart *::)O N6nd *::)O N4rogram 6nd O N.)O Inp&t comman%: F&nction: This command Inputs data from the desired 4ort. N2tart *::)ON6nd *::)ON4rogram 6nd ON.)O :elete -yte command Gord :elete bloc9 start address :elete bloc9 6nd address 4rogram 6nd *ddress .arriage )eturn Insert -yte command 4rompt Insert address 6nd address of the bloc9 .arriage )eturn

S9ntax: MIM IN4ort *::)O N.)O O&tp&t comman%: F&nction: This command utputs data to the desired 4ort. S9ntax: M - N4ort *::) ON:ataON.)O M N4ort *::)O N:ataO N.)O RESU(T: Thus7 the operation of 808/ microprocessor is studied. utput -yte command Gord ;alid utput address utput :ata .arriage )eturn N4ort *::) ON.)O Input -yte command Gord ;alid Input address .arriage )eturn

You might also like