हिंदी

Explain the following instruction of Micro-processor 8085 with an example: CMP M - Computer Science 2

Advertisements
Advertisements

प्रश्न

Explain the following instruction of Micro-processor 8085 with an example:

CMP M

स्पष्ट कीजिए
Advertisements

उत्तर

This instruction compares the contents of the Accumulator with the memory location pointed to by the HL register pair. It performs an internal subtraction (A − M) and updates the status flags, but the data in the Accumulator and memory remains unchanged.

Example:

If A = 20H and M = 10H, after executing CMP M:

  • Carry Flag (CY) = 0 (because A > M)
  • Zero Flag (Z) = 0 (because  A ≠ M)
shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
2023-2024 (July) Official Board Paper
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×