Author | Message | ||
0CodErr Ziron Guru (send private message) Posts: 199 Topics: 37 Location: | [1659] - posted: 2015-02-10 16:42:59 This is for testing http://pastebin.com/W7Txw8ap It contains commented part /* */, because it cannot be compiled
And also something wrong with test Code:
instead of Code:
Also (this was not included in file above): Code:
Result: Code:
I reported only about some errors. Also there are similar errors. And better if you check all output. | ||
Admin Site Admin (send private message) Posts: 933 Topics: 55 Location: OverHertz Studio | [1663] - posted: 2015-02-11 01:11:18 I have rewrote test and bt(s/r) instruction handlers and solved both of those issues, I will take a look at sbb tomorrow. 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: | [1664] - posted: 2015-02-11 09:58:13 You wrote that Ziron now supported shld | shrd. I have some tested. And it gave incorrect result. This source: http://paste2.org/_wdDImHML This result: http://paste2.org/_ed7CL5z7 | ||
Admin Site Admin (send private message) Posts: 933 Topics: 55 Location: OverHertz Studio | [1666] - posted: 2015-02-11 13:21:02 My mistake, I missed a 16 bit check on one of the functions I rewrote. Thanks for fast report, it will be updated on next beta or release. I have also fixed sbb, it was a problem with word based values being sometimes truncated into bytes. 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: | [1674] - posted: 2015-02-11 22:12:52
Code:
Result: Code:
But not every expression such as in your example so very basic. And support such expressions can make parsing and code generation more complex. I suggest to support only expressions which can be directly translated. For example not so clear how translate this: Code:
even this Code:
because not clear which value of eax we will add? Which was before calculations or after Code:
But as for simple expressions that really good thing for example: Code:
| ||
Admin Site Admin (send private message) Posts: 933 Topics: 55 Location: OverHertz Studio | [1676] - posted: 2015-02-11 22:53:39 Yes I plan to only have very basic assignment expressions because of inefficient code generation without loss of registers. Assignment expressions work from left to right. so eax = eax + ebx + ecx - esi will go from left to right Code:
as for Code:
I have added the appropriate error message. 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: | [1680] - posted: 2015-02-12 20:32:25 Ok, how it would be in my example above? Code:
This way: Code:
And now compare some high level example: Code:
Here in result 'a' really will be as sum of 'a + b' While in our registers expression we get that 'eax' will be 'ebx * 2' but not 'ebx + eax'
What about operator precedence? As I know in constant expressions it does matter. And it may cause conflict with constant expressions and reg|mem expressions. Yet example: Code:
Code:
Maybe better need to completely define in documentation which expressions are 'simple'. And if expression not simple then we just say 'error: expression too complex' | ||
0CodErr Ziron Guru (send private message) Posts: 199 Topics: 37 Location: | [1682] - posted: 2015-02-12 21:24:17 Again this http://pastebin.com/W7Txw8ap with some changes. Add this: Code:
Change this: Code:
And check result http://pastebin.com/8Vm0QEuK |
Currently Active Users: There are currently 12 user(s) online. 0 member(s) and 12 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 |