Pseudocode Operations

Need help understanding something

Page 1 of 1

1 Replies - 1999 Views - Last Post: 21 February 2009 - 12:17 PM

#1 SarumanTheWhite   User is offline

  • D.I.C Regular

Reputation: 74
  • View blog
  • Posts: 352
  • Joined: 04-November 08

Pseudocode Operations

Posted 19 February 2009 - 09:40 AM

I'm trying to understand how to do something with an assignment I have but I just don't get it.

What I'm doing is somewhat similar to assembly ( in a way ) but with the limitations of the question I'm not sure how to go about it.

I have a chart of instructions very similar to the one in this PDF I found:

http://homepages.ius...Interpreter.ppt

Instructions like Add, Move, what have you. But they are in this format:

s f xxx yyy ddd

where s is a sign, f is a function, xxx is operand 1, yyy is operand2, and ddd is a location in data memory.

Anyway, what my question is. There's this thing that asks me to take the contents of one memory location, add it to another, then store the result in another one. But what confuses me is this... how do I copy the contents of this location with the instructions I've been given? It seems like it's impossible without having a temporary location to store the result into... such as what Assembly has a lot of.

Could someone point me in the right direction?

This post has been edited by SarumanTheWhite: 19 February 2009 - 04:10 PM


Is This A Good Question/Topic? 0
  • +

Replies To: Pseudocode Operations

#2 Dr. Fox   User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 12
  • Joined: 02-March 08

Re: Pseudocode Operations

Posted 21 February 2009 - 12:17 PM

Impossible to answer without knowing your hypothetical machine architecture. If it is similar to the slides you posted, then I think there are sufficient examples in there to answer your question.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1