You are on page 1of 3

Faculty of Engineering & Technology

Subject: Computer Organization Architecture Lab

Subject-Code:203105254
B.Tech. IT Year 2nd Semester: 4th

PRACTICAL : 8
AIM : Write an assembly language code in GNUMSIM8085 to
find Max number among two numbers.
Instruction:
1. LDA :
 This instruction loads 16 bit data in the register pair.
2. MOV :
 This instruction copies the contents of the source register into the destination
register.
3. INX :
 The contents of register pair are incremented by I.
4. CMP :
 The contents of the operand are compared with the contents of the accumulator.
5. JNC :
 This instruction is used to jump to the address a16 as provided in the instruction.
But as it is a conditional jump so it will happen if and only if the present carry flag
value is 1.
6. HLT :
 The CPU finishes executing the current instruction and halts any further
execution.

Program :
LDA 8000
MOV B,A
LDA 8001
CMP B
JNC 000C
MOV A,B
STA 8003
HLT

Enrollment No: - 2203031087018 1|Page


Faculty of Engineering & Technology

Subject: Computer Organization Architecture Lab

Subject-Code:203105254
B.Tech. IT Year 2nd Semester: 4th

Output :

Enrollment No: - 2203031087018 2|Page


Faculty of Engineering & Technology

Subject: Computer Organization Architecture Lab

Subject-Code:203105254
B.Tech. IT Year 2nd Semester: 4th

Enrollment No: - 2203031087018 3|Page

You might also like