This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Need to print out the register contents

I have studied the MCS-51 Instruction set (8051 instruction set summary) but I do not see how to print out the registers' contents.
Can't find anything about this in the Help either. Help!!!

Parents
  • you say "registers" and "printf()".
    Registers, as such, are totally uninteresting in "C" programming, except in the case where printf() would not help you any. If, for instance, you have an incorrectly coded ISR that screw up a/some register(s), involving printf() will generate other effects which would/could mask what you are hunting. Also, which registers? Bank0 or bankn?

    If the simulator can not help you, go buy an ICE.

    I have studied the MCS-51 Instruction set (8051 instruction set summary) but I do not see how to print out the registers' contents.
    Instruction set and printf()??? Did you expect to find a "pront register opcode"?

    You need to describe what you are doing as well as what you want (print out the register contents)

    If any of the above offend you, remove the offence by being clear what you are doing: C or assembler - never stated reason for register dump - never stated why the simulator can not help - never stated.

    Erik


    Erik

Reply
  • you say "registers" and "printf()".
    Registers, as such, are totally uninteresting in "C" programming, except in the case where printf() would not help you any. If, for instance, you have an incorrectly coded ISR that screw up a/some register(s), involving printf() will generate other effects which would/could mask what you are hunting. Also, which registers? Bank0 or bankn?

    If the simulator can not help you, go buy an ICE.

    I have studied the MCS-51 Instruction set (8051 instruction set summary) but I do not see how to print out the registers' contents.
    Instruction set and printf()??? Did you expect to find a "pront register opcode"?

    You need to describe what you are doing as well as what you want (print out the register contents)

    If any of the above offend you, remove the offence by being clear what you are doing: C or assembler - never stated reason for register dump - never stated why the simulator can not help - never stated.

    Erik


    Erik

Children
  • There's no excuse for a professional to be nasty. I've been trouble-shooting for too long, and as a systems analyst, know that by asking questions rather than blaming the questioner, you can usually get the info you need to answer the question. There are no stupid questions, just stupid replies; and what's this forum for anyhow, if not to help people?
    I'm not using Keil's PRINTF, by the way, but my own. It sounds as though you haven't ever actually printed out the internal register's contents from the evasions and offensive remarks on this board. Won't do it again.

  • "...as a systems analyst..."

    Now I understand!