You are on page 1of 4

Date :-

Practical No. 8(a)


Aim:
Write an assembly language code in GNU sim 8085 to Addition of first 10
number.
Program:

Address Label Mnemonics Hexcode Comment

F000 LXT,800H 21,00,80 Load the address to get a


count
F003 MOV C, M 4F Load C with count
F004 LXT H,8010 H 21,10,80 Load HL with add
F007 XRA A AF Clear acc
F008 MOV E,A 5F Clear E register
F009 SKIP ADD M 86 Add memory
F00A JNC SKIP D2,DE,FO Carry is false skip step
F00D SKIP 1C Increase E
F00E SKIP DCRC OD Decrease C
F00F INXH 23 Point to next loc
F010 INZ LOOP C2,09,FO When 0 is false go to loop
F013 LXIH,9000H 2,00,90 Load and to result
F016 MOV M,A 77 Save acc content
F017 TNX H 23 Increase H1 pair
F018 MOV M,E 73 Store carry
F019 HLT 76 Terminated
Obseration:
Input: Address data Output:
: : Address
data
8000 08 :
:
: : 9000
DC
8010 AF 9001
03
8011 2E :
:
Date :-

Practical No. 8(b)


Aim:
Write an assembly language code in GNU 8085 to Addition of 10 num stored in
memory.
Program:

Address Label Mnemonics Hexacode Comment

2009 LOA 2050 A<_2050


2003 MOVB,A B<-A
2004 LXI H,2051
2007 MVI C,00 A00
2009 MVI C,00 C00
200B ADD M AA+M
200C TNRL MM+1
200D TNC 2011 -
2010 TNR C CC+1
2011 DCR B BB+1
2012 TNZ 200B -
2015 STA 3050 3050A
2018 MOV A,C AC
2019 STA 8051 3050A
201C HLT Terminate

Observation:
Input: Output:
Page

Date :-

Input Output

Add Data Add Data


2050 5 3050 26
2051 22 3051 00
2052 03
2053 04
2054 01
2055 02
2056 12
2057 52

Observation:
Input: Output:
Page

You might also like