Register | Login
Forum Index > Bugs and Fixes > No error message but it should be
Author Message
Pages: 1 2
0CodErr
Ziron Guru
(send private message)

Posts: 199
Topics: 37

Location:
[1490] No error message but it should be - posted: 2015-01-21 12:10:15
Code:
program RAW_IMAGE 'test';
#set bits 32;
eax = 123456789012345678901234567890;
eax = 0x123456789ABCDEF0;
eax = 0b111111110000000011111111000000001111111100000000111111110000000011111111000000001111111100000000;
eax = 0b123456789;


Result:
Code:
00000000  33C0              xor eax,eax
00000002  B8F0DEBC9A        mov eax,0x9abcdef0
00000007  B800FD02FD        mov eax,0xfd02fd00
0000000C  B801000000        mov eax,0x1
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[1498] - posted: 2015-01-21 19:56:17
Added a couple more warning notifications, but many immediate inputs are auto truncated and are expected to be handled by the user.

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:
[1546] - posted: 2015-01-30 00:58:01
Below compiles without errors
Code:
program RAW_IMAGE 'test';

#set bits 32;

byte b1;
word w1;

eax |= b1; eax |= w1;
eax &= b1; eax &= w1;
eax ^= b1; eax ^= w1;
and result is
Code:
00000000  0B052A000000      or eax,[dword 0x2a]
00000006  0B052B000000      or eax,[dword 0x2b]
0000000C  23052A000000      and eax,[dword 0x2a]
00000012  23052B000000      and eax,[dword 0x2b]
00000018  33052A000000      xor eax,[dword 0x2a]
0000001E  33052B000000      xor eax,[dword 0x2b]


But error occures when Code:
program RAW_IMAGE 'test';

#set bits 32;

byte b1;
word w1;

eax = b1; eax = w1;

Operand size mismatch!


This without errors Code:
eax = al; eax = ax;

And in result movzx used.

I think in first case should say 'Operand size mismatch!'.
And in second case we can do like in third case with movzx.
0CodErr
Ziron Guru
(send private message)

Posts: 199
Topics: 37

Location:
[1549] - posted: 2015-01-30 11:53:49
This works correctly:
Code:
program RAW_IMAGE 'test';
#set bits 32;
eax = @[eax];

Result:
Code:
00000000  8D00              lea eax,[eax]

But this not:
Code:
program RAW_IMAGE 'test';
#set bits 32;
eax = @[ax];
eax = @[ah];
eax = @[al];

Result:
Code:
00000002  8D00              lea eax,[eax]
00000004  8D0424            lea eax,[esp]
00000007  8D00              lea eax,[eax]
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[1560] - posted: 2015-01-30 23:30:54
All of these problems have been corrected 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:
[1730] - posted: 2015-02-18 16:39:37
Actually i am not sure is it need to show error or not, but warning need i think, because someone can use '==' instead of '='.
Code:
program RAW_IMAGE 'test';
#set bits 32;
byte[eax] == ord('X');
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[1742] - posted: 2015-02-19 22:32:43
This is valid since it is a type of high level cmp which doesn't need a direct jmp operation.

Code:
byte[eax] == ord('X');
eax = 5;
if (zero_flag == true) {
  // ... etc


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:
[1759] - posted: 2015-02-22 19:45:07
This is valid since it is a type of high level cmp which doesn't need a direct jmp operation.
Yes, because of 'high level'. With enabled optimizations it is unknown how were made comparisons. It can be 'cmp' or 'test'. And it has different effects on flags. We cannot be sure which instruction was used without disassembling.
Therefore my point -- need to show at least warning.
Pages: 1 2
create new reply


Quick reply:

Message:



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