Docsity

Sample observation first exp, Exams of Microprocessor and Assembly Language Programming

Partial preview of the text

Download Sample observation first exp and more Exams Microprocessor and Assembly Language Programming in PDF only on Docsity!

PROGRAMS ON ARITHMETIC OPERATIONS EX.NO.2 2a, ADDITION & SUBTRACTION DATE: AIM: . . ; / To write an Assembly Language Program to perform arithmetic operations using 8086 microprocessor. APPARATUS REQUIRED: 8086 Microprocessor training kit PROBLEM STATEMENT: di Write an ALP in 8086 to add and subtract two byte numbers stored in the memory address location and store the result in the memory address location. Also Provide an instruction in the above program to consider the carry and store the carry in the memory address location. ALGORITHM: 16-bit addition a) Initialize the MSBs of sum to 0 b) Get the first number. c) Add the second number to the first number. d) If there is any carry, increment MSBs of sum by 1. e) Store LSBs of sum. f) Store MSBs of sum. PROGRAM: ' MEMORY | ‘ABEL PROGRAM OPCODE COMMENTS ADDRESS | 2060 Z Mov El; 00 Cécloo Clesy Gounley EL 2ooe | Mov S1,4000/ © 7C6 oofo Initialize addsen tor purl 2007 | Mev Ax, Csr) SBo4 Move 185 date bb ay q -————_| 3 Scanned with CamScanner