Well, I think that Sariel's explanation is great ! :D
Even though, I do believe that those rules can easily work for a person whose first language is Spanish because the pronunciation is already known; in the other hand, if you are just learning it then you will hesitate where to place the stress syllable.
I know that placing accents in Spanish is really difficult so I strongly recomend to "listen" a word and then train your ear to detect the stress syllable then you can follow Sariel's advises.
Well, in order to answer the question to WATSKEBURT :
- No, in Spanish the accent is not placed in the same syllable. Nor in imperative form nor others. But don't worry, you've seen that you can learn some rules that will help you.
- Then, in general Imperative forms of verbs in Spanish don't have any written accent when they are in simple form, like : compra, duerme, tomen, come, lava, encuentra, hable, llama, etc.
- But, if the Imperative form is linked with a pronoun then the word will take a written accent and it can be in the third or fourth vowel: cómprame, duérmete, tómenlo, cómetelo, lávala, encuéntranos, háblele, llámalos, etc
- You have to keep in mind that there're several exceptions like : házlo or vete.
- You also have to know that Spanish is spoken different in each country and there're some in South America where people stress the syllable (or put the accent) in the last Syllable like: comprá, tomá, observá... etc. It happens in countries like Argentina, Uruguay, etc.
So, that's why I said that the first thing to do is to listen the word and train the ear ;-)
It will flow little by little... and then, it will be easier than you can think... :D
Greets!