Author | Message | ||||
0CodErr Ziron Guru (send private message) Posts: 199 Topics: 37 Location: | [1525] global variable redeclared - posted: 2015-01-27 18:56:29 Cannot compile this: Code:
But was compiled when i commented first Code:
Also after that i noticed that in generated raw binary MyProc looks: Code:
Seems that you use Code:
But it can be done also with Code:
But you already use Code:
Next, i give quote from AMD Manual:
| ||||
Admin Site Admin (send private message) Posts: 933 Topics: 55 Location: OverHertz Studio | [1526] - posted: 2015-01-27 19:29:16 The CPU mode should offer this optimisation, the add esp is actually for local variables, where-as leave is for the stack parameters on call. try Code:
I will also confirm if this is working correctly, if not I will take a look and correct this. As for global variable, this is because your variable is already declared and you are trying to use the same identifier for the local variable..... I could make it so that they can be redeclared, but it was an intended functionality. Download Ziron Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message. | ||||
0CodErr Ziron Guru (send private message) Posts: 199 Topics: 37 Location: | [1527] - posted: 2015-01-27 19:47:35
| ||||
0CodErr Ziron Guru (send private message) Posts: 199 Topics: 37 Location: | [1528] - posted: 2015-01-27 19:56:37 Also, just to let you knew, in this our case we can code esp -= 8; as: Code:
| ||||
Admin Site Admin (send private message) Posts: 933 Topics: 55 Location: OverHertz Studio | [1529] - posted: 2015-01-27 21:42:52 Sorry I misunderstood, you're right, the final add is not needed with stack frame, I will correct this. It seems set cpu mode is also not working, I will also fix this. Thanks. Download Ziron Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message. | ||||
0CodErr Ziron Guru (send private message) Posts: 199 Topics: 37 Location: | [1602] - posted: 2015-02-03 14:31:22 I think it is relevant to this topic. Code:
Is it supported local constants or not? It would be more convinient Also local variables still not supported. | ||||
0CodErr Ziron Guru (send private message) Posts: 199 Topics: 37 Location: | [1605] - posted: 2015-02-03 15:57:04 hmm... strange This compile -- OK: Code:
But if uncomment global Code:
then cannot compile. | ||||
Admin Site Admin (send private message) Posts: 933 Topics: 55 Location: OverHertz Studio | [1608] - posted: 2015-02-03 16:40:36 local constants are possible. Code:
In this case, you are writing const 0 = 1 because you already declared a as 0 and since it is a global const, it can be accessed from anywhere. As for the second problem, global variables can not be redeclared right now. I may consider to make this possible in one of the following releases. Download Ziron Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message. |
Currently Active Users: There are currently 1 user(s) online. 0 member(s) and 1 guest(s) Most users ever online was 1046, January 28, 2022, 2:08 pm. Statistics: Threads: 225 | Posts: 1848 | Members: 51 | Active Members: 51 Welcome to our newest member, yecate |