8085 Microprocessor Assembly language Program To Find Square Of the Given Number

Aim
To write an ALP (8085 Microprocessor Assembly language Program ) To Find Square Of the Given Number


Program
Address
Mnemonics
Opcode
LSB
MSB
Comments
2000
LDA 2500H
3A
00
25
Load accumulator
2003
MOV B,A
47
  
Copy A to Register B
2004
MOV C,A
4F
  
Copy A to Register C
2005
MVI A,00
3E
00
 
Clear A
2007
MVI D,00
16
00
 
Clear D
2009
ADD C
81
  
Add A+D
200A
JNC 200E
D2
0E
20
Jump on no carry
200E
DCR B
05
  
Decrement B
200F
JNZ 2009
C2
09
20
Jump on non zero
2012
STA 27F4
32
F4
27
Store result in 27F4
2015
MOV A,D
7A
  
Move D to A
2016
STA 27F5
32
F5
27
Store result in 27F5
2019
CALL 06E3
CD
E3
06
Call subroutine
201C
HLT
76
  
Stop



Observation / Output
i/p
2500 FF
o/p
FE 01

1 comment:

  1. there is some mistake in the code near JNC 200E.

    ReplyDelete

Post Your valuable comments here ..........