Page 1 of 1

ASM code and PS0, PSn... internal value

Posted: Tue Jan 06, 2009 2:37 pm
by Denis
Fred, inside a procedure , it seems that PS0 (PS1, PSn...) are "constant" (in French - invariable dans la procedure).

am I right or not ?

I try to correct asm code for Moebius project in a different way you explain us on french forum.

I think that an alternative way is to modify asm code for array parameters but i have to change PSn value according modifiations of esp that i want to do. It's not so difficult if PSn are constant.

Tks

Posted: Tue Jan 06, 2009 8:20 pm
by Trond
They are constants, but their definition changes depending on various factors, so you can't expect PS0 to always be 4 i.e..

Posted: Tue Jan 06, 2009 8:52 pm
by Denis
Trond wrote:They are constants, but their definition changes depending on various factors, so you can't expect PS0 to always be 4 i.e..
The definition (value) is not the problem, i want to know if inside a procedure the PSn value can change. I don't remember but it seems for me that it can.

Posted: Tue Jan 06, 2009 10:01 pm
by Trond
No, they are constants (fasm replaces PS0 with the value when the file is assembled, like a macro). It can't change at run-time.

Posted: Tue Jan 06, 2009 11:50 pm
by Fred
Yes, they are constants.

Posted: Thu Jan 08, 2009 8:35 am
by Denis
Merci FRED/Trond