Tuesday 25 December 2012

8085pgms parity checker



8085pgms
parity checker in 8085 microprocessor which is successfully executed, checking the parity of
number 05.
MVI A,05H (MOVING 05 TO ACCUMULATOR)
MVI B,08H (THERE IS 8 BIT NUMBER SO INITIALIZING B TO 08)
MVI C,00H (INITIALIZING COUNTER TO 00)
STC (SETTING THE CARRY)
CMC (COMPLIMENT OF CARRY ,SO CARRY BECOMES ZERO)
LOOP::RAR (HERE LOOP BEGINS,NOTE THE ADDRESS OF THIS REGISTER TO BE
USED FURTHER)
JNC level 1:: (WRITE THE ADDRESS OF LEVEL 1)
INR C (INCREMENT IN C)
level 1::DCR B (DECREMENT IN B)
JNZ LOOP:: (HERE SPECIFY THE LOOP ADDRESS)
HLT
8085 16 bit multiplication
LXI B, 0000H
LHLD 8000H
XCHG
LHLD 8002H
DCX D
L006: LDA 8002H
ADD L
MOV L, A
2
LDA 8003H
ADC H
MOV H, A
JNC L013
L013: INX B
DCX D
MOV A, D
ORA E
JNZ L006
SHLD 8006H
MOV L, C
MOV H, B
SHLD 8004H
HLT

No comments:

Post a Comment