1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: 8085 weird problem

  1. Oct 7, 2009 #1
    we were requested to interface 8085 with memory and led,then a routine need to be written to make the led light up one at a time with delay 1 second.we have simulate the program and it run perfectly but when we test on the circuit we built it doesn't work.after a lot of trial and error,finally we found that answer,the 8085 does not recognize DCX,it only recognize DCR,so we only change the DCX in our original program to DCR to perform delay.do you guy know why the 8085 behave like this?simply does not recognize the DCX instruction.our lecturer also say never seen this before.
  2. jcsd
  3. Oct 7, 2009 #2


    User Avatar

    Staff: Mentor

    You are expected to show MUCH more effort than this in your schoolwork questions here on the PF. Post your code and work so far, and ask a specific question about the code. We do not do your schoolwork for you here.
  4. Oct 7, 2009 #3
    i do not request anything here.just wanna ask whether you guy ever seen such case or not.
  5. Oct 7, 2009 #4


    User Avatar
    Science Advisor

    Hi Prescott, I think what Berkeman means is that you don't seem to have done much in the way of trying to debug the code yourself. I appreciate that you have done plenty of work on project as a whole, but it does seem very presumptuous to just assume that "dcx" doesn't work rather than to look into it further to find out how you have misused the instruction.

    As it turns out it is a fairly simple problem with a simple solution and if you have a reasonably detailed instruction reference guide you should be able to discover the reason without too much effort. You know that the systematic analysis required to debug an issue like this really is a very important part of what you are learning. :)

    Tell us what resources you have to debug with (eg break points etc) and what documentation you have on hand. I can offer some more if you're still stuck after following up on the above hints.
  6. Oct 9, 2009 #5


    User Avatar
    Science Advisor

    Hey Prescott, did you figure this one out yet? The "dcx" instruction does do what it's supposed to do, it decrements a register pair. I doesn't however ..... ?

    Can you fill in the .... ?

    It's interesting that your simulator didn't model this correctly. It would be a bug in the simulator rather than a bug in the 8085.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook