Register | Login
Forum Index > Requests and Feedback > Augmented assignment
Author Message
Pages: 1 2 3 4
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[1809] - posted: 2015-02-27 17:10:09
OK, I have added this to my todo list. 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:
[1815] - 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

And yet about
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 smile
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:
[1855] - 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!




Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[1867] - 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?

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:
[1872] - 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()"
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[1874] - 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.

Download Ziron
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

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

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


Quick reply:

Message:



Currently Active Users:
There are currently 13 user(s) online. 0 member(s) and 13 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
const Copyright = '2011-2024 © OverHertz Ltd. All rights reserved.';
Web development by OverHertz Ltd