Author Message
Pages: 1 2 3 4 (send private message)

Posts: 932
Topics: 54

Location:
OverHertz Studio
 - posted: 2015-02-27 17:10:09
OK, I have added this to my todo list. Thanks.

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:
 - posted: 2015-03-02 11:21:59
Seems that it also not so hard to do:
Code:
``````dword a, b, d;

a = b + d;
a = b - d;
a = b | d;
a = b ^ d;
a = b & d;
a = b >> d;
a = b << d;
a = b * d;
a = b / d;``````
Can be translated as:
Code:
``````eax = b; eax += d;            a = eax; // uses eax
eax = b; eax -= d;            a = eax; // uses eax
eax = b; eax |= d;            a = eax; // uses eax
eax = b; eax ^= d;            a = eax; // uses eax
eax = b; eax &= d;            a = eax; // uses eax
eax = b; ecx  = d; eax >> cl; a = eax; // uses eax, ecx
eax = b; ecx  = d; eax << cl; a = eax; // uses eax, ecx
eax = b; mul d;               a = eax; // uses eax
eax = b; edx = 0; div d;      a = eax; // uses eax, edx``````

 “ eax and edx changing without the programmer understanding this

Programmer should know that in this case(dividing of dword) after such instructions as 'div' and 'idiv' the remainder stores in 'edx'. And of course 'edx' will changes And 'mul' may also corruptes 'edx'. Also flags are corrupted(even if you do just eax += ebx). But you do not save flags.
My point that such things should be documented. But our documentation still not have needed explanation about it.
0CodErr
Ziron Guru
(send private message)

Posts: 199
Topics: 37

Location:
 - posted: 2016-05-07 14:51:37
Can You add the ability to use?
Code:
``````program RAW_IMAGE 'test';
#set bits 32;

al = CF;
al = PF;
al = ZF;
al = SF;
al = OF;``````

Currently
 “ Instruction usage is not supported! (send private message)

Posts: 932
Topics: 54

Location:
OverHertz Studio
 - posted: 2016-12-13 00:41:44
Hmm this I wonder if would better added as macros.

maybe something like...

Code:
``````inline function getCF() {
setc al
\$return al;
}

al = getCF();``````

then you can easily use dl = getCF();

which will translate to

Code:
``````setc al
mov dl, al``````

what do you think?

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:
 - posted: 2017-01-19 21:24:08
Is it too hard to implement? Code:
``al = CF;``

Cause this is more shorter than GetCF().
And just by analogy: if we want to set dl to al we write "al = dl" but not "al = Getdl()" (send private message)

Posts: 932
Topics: 54

Location:
OverHertz Studio
 - posted: 2017-02-05 15:55:38
setc does not work with al etc, so it means you would physically need to write:

Code:
``````al = CF;
dl = al;``````

vs

Code:
``dl = getCF();``

But i will consider to inbuild this to automate dl = CF; etc.

Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message. (send private message)

Posts: 932
Topics: 54

Location:
OverHertz Studio
 - posted: 2019-07-14 15:22:50
Sorry for very very very late response, but exactly is it you want al = cf to do?

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:
 - posted: 2019-07-18 17:23:27
 “ al = cf
Yes, that's what I meant.
Pages: 1 2 3 4 