#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2013
    Posts
    6
    Rep Power
    0

    Question about memory locations


    Sorry if this is a really simple question, but I am having a hard time finding an answer that makes sense to me. I am having a hard time figuring out how to ask my question. It seems to me that if a programmer is going to write software for a type of hardware (like a cpu) then they would need to know how to make that hardware do what they want it to do. I'm thinking this is accomplished through an addressing scheme?(such as: add value in location x to location y and set it in location z) - So, if a programmer wanted to access or modify an absolute address in his code how would he do that?
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2013
    Posts
    3
    Rep Power
    0
    Sorry to ask this, can you explain the question properly so that i can try to answer the question.

    Sathishkumar.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2014
    Posts
    17
    Rep Power
    0
    Originally Posted by dmac0505
    add value in location x to location y and set it in location z) - So, if a programmer wanted to access or modify an absolute address in his code how would he do that?
    On all but a few ancient computers (CDC 3000 series for example), modifying the address portion of an instruction isn't normally done.

    For a computer with a single address per instruction, the sequence would be, load accumulator with the value in memory location x, add the value in memory location y to the accumulator, store the accumulator value into memory location z. On computers with multiple registers, any of the registers could be used to perform the math operations.

    Another sequence of instructions would be needed to perform the same addition operation on three other locations in memory.

    Many machines allow addresses and/or offsets to be obtained from registers. Then the values in those registers are changed in order to change the address and/or offsets to be updated, perhaps incremented while in a loop to sum an array of numbers in memory.

    You should find a book on assembly language for a processor that you would be interested in.
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2013
    Posts
    3
    Rep Power
    0
    To my knowledge we can't change the absolute address value, if you want to add an array by incrementing the registers as you said in the example we can do that in ARM 7TDMI instruction set this gives us the authority to traverse over the group of registers and do arithemetic calculations over it.

    Satiz.

IMN logo majestic logo threadwatch logo seochat tools logo