adccommunitymod (AutomationDirect) asked a question.

"P" register/alias

Created Date: November 10,2008

Created By: dmyer

**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****

I am working on deciphering a program in a DL260 CPU that uses P2470 & P2474 as the destination address in a MOV instruction. I have searched and been unable to find out what the "P " data type/alias is. From what I have been able to deterimine from the rest of the program, I am guessing that it relates to memory loactions V2470 & V2474 but am unsure, as there is a lot of math, calculating index and offset values into a table of data. Can anyone shed any light on exactly what these are?


  • adccommunitymod (AutomationDirect)

    Created Date: November 10,2008

    Created by: bcarlton

    Normally an instruction has a 'V ' register as the source or destination of information.

    When an instruction has a 'P ' reference this means that that numbered 'V ' register contains the ADDRESS of the desired source/target.

    The contents of the 'V ' register which is used as a pointer must contain the 'binary ' form of the address. But most addresses are in 'octal '. How do you convert? The LDA box provides this.

    Let's say you final target register is V10000. We will use V2470 (as in your example) as the holder of the pointer. This is what the code looks like:

    LDA O10000

    OUT V2470

    Now V2470 has the ADDRESS of V10000. As long as the reference to this is P2470 then the final source/destination is actually V10000.

    LD K50

    OUT P2470 - stores '50 ' into V10000

    Now why would anyone go to all this trouble? If, after using P2470 to store something at V10000 we changed the contents of V2470 it would now 'point ' to somewhere else. Let's do:

    INCB V2470 - this adds one, in the binary format necessary for an address.

    Now:

    LD K60

    OUT P2470 - stores '60 ' into V10001

    Let your imagination run wild. As long as you use binary arithmetic to modify the pointer value in V2470 (and keep it within the legal bounds) you can easily store information anywhere.

    Store a block of information using the pointer (MOV). Then bump the pointer up by the size of the block. Then store the next block.

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: November 11,2008

    Created by: dmyer

    Thanks MacS and bcarlton, for the help.

    So, in my case, the instructions are:

    LD K10

    LDA O2440

    MOVE P2470

    This would move 16 words at address ' V2440-V2457, beginning at the address contained in V2470 (if V2470 contains O21000, the 16 words go to V21000-V21017).

    I was a little confused since the original programmer(??), in the next rung does:

    LDA O20

    LDA O3500

    MOV P2474

    and I wasn't positive if the LD K10, and the LDA O20 did the same thing, or if there was a difference somehow due to context.

    This makes a lot of sense, since I could see how data was being moved out of the table, but was having trouble seeing how any updated data was being moved back into the table.

    Thanks again for the help.

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: November 11,2008

    Created by: bcarlton

    It can be confusing - since the words describing the mnemonic LDA are "LoaD Address " you would think it could only be used with one. But it is a general Octal to Hex/Binary convertor/loader.

  • adccommunitymod (AutomationDirect)

    Created Date: November 10,2008

    Created by: dmyer

    I am working on deciphering a program in a DL260 CPU that uses P2470 & P2474 as the destination address in a MOV instruction. I have searched and been unable to find out what the "P " data type/alias is. From what I have been able to deterimine from the rest of the program, I am guessing that it relates to memory loactions V2470 & V2474 but am unsure, as there is a lot of math, calculating index and offset values into a table of data. Can anyone shed any light on exactly what these are?

    Expand Post