History, asked by Ramandipkaur2544, 11 months ago

Write an 8085 program in place of 0a i have written 10

Answers

Answered by roysharanjeet
1

8085 program to check whether the given number is even or odd

Problem – Write an assembly language program in 8085 microprocessor to check whether the 8 bit number which is stored at memory location 2050 is even or odd. If even, store 22 at memory location 3050 otherwise store 11 at memory location 3050.

Example –

A number is said to be odd if its lower bit is 1 otherwise even. Therefore to identify whether the number is even or odd, we perform AND operation with 01 by the help of ANI instruction. If number is odd then we will get 01 otherwise 00 in accumulator. ANI instruction also affect the flags of 8085. Therefore if accumulator contains 00 then zero flag becomes set otherwise reset.

Similar questions