ASM code and PS0, PSn... internal value

Everything else that doesn't fall into one of the other PB categories.
Denis
Enthusiast
Enthusiast
Posts: 778
Joined: Fri Apr 25, 2003 5:10 pm
Location: Doubs - France

ASM code and PS0, PSn... internal value

Post 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
A+
Denis
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post 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..
Denis
Enthusiast
Enthusiast
Posts: 778
Joined: Fri Apr 25, 2003 5:10 pm
Location: Doubs - France

Post 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.
A+
Denis
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post 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.
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

Yes, they are constants.
Denis
Enthusiast
Enthusiast
Posts: 778
Joined: Fri Apr 25, 2003 5:10 pm
Location: Doubs - France

Post by Denis »

Merci FRED/Trond
A+
Denis
Post Reply