Search code examples
microprocessors8085

8085 microprocessor op-code statement faults


The problem statement is :

Load a data byte A2H in memory location 8150H and 76H in the accumulator. Add the contents of the memory location to the contents of the accumulator.

The opcode statement that I used for execution of the problem in the 8085 micro processor based microcomputer kit, is :

  • 3E:76:26:81:2E:50:36:A2:86:CF

which is :

  • MVI A,76H
  • MVI H,81H
  • MVI L,50H
  • MVI M,A2H
  • ADD M
  • RST 1

what's wrong in the problem statement? while examining the accumulator, after executing, it isn't showing the desired result.


Solution

  • Pretty much a shot in the dark, but you could try this. Two alterations. Immediate values need a #, and hexadecimal values beginning with a letter need a 0 prefix to distinguish from labels.

    MVI A,#76H
    MVI H,#81H
    MVI L,#50H
    MVI M,#0A2H
    ADD M
    RST 1