Register | Login
Forum Index > Bugs and Fixes > Using flags
Author Message
Pages: 1 2
0CodErr
Ziron Guru
(send private message)

Posts: 199
Topics: 37

Location:
[1754] Using flags - posted: 2015-02-22 11:38:42
Code:
repeat {
  break if (CF == true);
  break if (PF == true);
  break if (ZF == true);
  break if (SF == true);
  break if (OF == true);
}

Result:
Code:
00000000  750A              jnz 0xc
00000002  7508              jnz 0xc
00000004  7506              jnz 0xc
00000006  7504              jnz 0xc
00000008  7502              jnz 0xc
0000000A  EBF4              jmp short 0x0
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[1767] - posted: 2015-02-23 13:18:06
Fixed for next release.

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:
[1814] - posted: 2015-03-02 10:17:28
Maybe it would be useful to save flags by this way:
Code:
using flags {

}

Code:
function MyFunction() : sysword {
uses flags;
}

And it can be replaced with
Code:
pushf
//......
popf
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[1817] - posted: 2015-03-03 11:57:40
OK, I will add this.

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
[1825] - posted: 2015-03-10 12:58:25
This is added for next release.

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:
[1848] - posted: 2016-05-03 11:35:42
In this case Code:
if (SF == TRUE){};
used Code:
00000000  7C00              jl 0x2
instead of Code:
00000000  7800              js 0x2
0CodErr
Ziron Guru
(send private message)

Posts: 199
Topics: 37

Location:
[1849] - posted: 2016-05-03 11:47:43
Also this must not be translated: Code:
if (AF == TRUE){}
if (DF == TRUE){}
if (TF == TRUE){}

if (AF == FALSE){}
if (DF == FALSE){}
if (TF == FALSE){}

if (AF <> TRUE){}
if (DF <> TRUE){}
if (TF <> TRUE){}
       
if (AF <> FALSE){}
if (DF <> FALSE){}
if (TF <> FALSE){}
But currently result is Code:
00000000  7400              jz 0x2
00000002  7400              jz 0x4
00000004  7400              jz 0x6
00000006  7500              jnz 0x8
00000008  7500              jnz 0xa
0000000A  7500              jnz 0xc
0000000C  7500              jnz 0xe
0000000E  7500              jnz 0x10
00000010  7500              jnz 0x12
00000012  7400              jz 0x14
00000014  7400              jz 0x16
00000016  7400              jz 0x18
0CodErr
Ziron Guru
(send private message)

Posts: 199
Topics: 37

Location:
[1853] - posted: 2016-05-03 18:15:17
Currently Code:
function test() {
uses flags;
}
produces Code:
00000000  E800000000        call dword 0x5
00000005  55                push ebp
00000006  8BEC              mov ebp,esp
00000008  669C              pushfw
0000000A  669D              popfw
0000000C  8BE5              mov esp,ebp
0000000E  5D                pop ebp
0000000F  C3                ret
Is it possible to do 'pushfd\popfd' instead of 'pushfw\popfw'?
Also here Code:
function test() {
  using flags{
  }
}
error occured
Unexpected ident flags in [using]
Pages: 1 2
create new reply


Quick reply:

Message:



Currently Active Users:
There are currently 8 user(s) online. 0 member(s) and 8 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