Author | Message | ||
Admin Site Admin (send private message) Posts: 933 Topics: 55 Location: OverHertz Studio | [1612] - posted: 2015-02-03 19:17:45 Code:
Because SomeFunction will return eax, it will use the current cast of EAX as the primary cast operator. Code:
The alternative is that it uses the second operator as a decider for signed/unsigned. I am planning in a future update to have types specified for functions, but I am not sure how I want to do this yet, I was planning a big update in the near future to have "managed" functions, which will work like high level languages (auto generated assembly) - but this will be after getting everything working perfectly. 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: | [1613] - posted: 2015-02-03 20:06:55 How is eax inside SomeFunction? And how is after return? SomeFunction may also call some other function in some place. If we cannot be sure then need to write each time the type of register. As said above, easy way this is -- to have different operators. But already implemented other way: uses the status of the first operand. Then is not such a clear situation. Code:
| ||
Admin Site Admin (send private message) Posts: 933 Topics: 55 Location: OverHertz Studio | [1616] - posted: 2015-02-03 22:52:37 I'm not clear as to what you mean.. but in this case you can also cast the register. Code:
Also the AS statement is local not global. 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: | [1619] - posted: 2015-02-04 18:07:53
But anyway, what if it is inline function? Also i think that signed|unsigned important also here: Code:
And let's count how many we have registers? And in 64bit It make programming a bit harder because it means that we need always keep in mind type of register or we need always write type of register(i.e. [type]<reg>. | ||
Admin Site Admin (send private message) Posts: 933 Topics: 55 Location: OverHertz Studio | [1621] - posted: 2015-02-04 19:09:12 I don't really understand.... what are you suggesting? 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: | [1623] - posted: 2015-02-04 19:15:59 As i asked in [1611]
Maybe need to define some default type(signed or unsigned) of registers and let in macros keep it at end of macro. | ||
Admin Site Admin (send private message) Posts: 933 Topics: 55 Location: OverHertz Studio | [1625] - posted: 2015-02-04 20:48:21 you mean to keep the casting as global throughout the whole source lifetime? 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: | [1626] - posted: 2015-02-04 21:05:00
Maybe not so clear for me and should be documented: Code:
|
Currently Active Users: There are currently 7 user(s) online. 0 member(s) and 7 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 |