Fixed this for next release.
Forum / Bugs and Fixes
signed | unsigned comparison
A community discussion post from the original code:zIRON forum.
Replies
program RAW_IMAGE 'test';
#set bits 32;
function test1(dword x) {
[sysint]return al;
}
function test2(dword x) {
return [sysint]al;
}
test1(0);
test2(0);
Produces
00000000 6A00 push byte +0x0
00000002 E807000000 call dword 0xe
00000007 6A00 push byte +0x0
00000009 E80C000000 call dword 0x1a
0000000E 55 push ebp
0000000F 8BEC mov ebp,esp
00000011 0FB6C0 movzx eax,al
00000014 8BE5 mov esp,ebp
00000016 5D pop ebp
00000017 C20400 ret 0x4
0000001A 55 push ebp
0000001B 8BEC mov ebp,esp
0000001D 0FB6C0 movzx eax,al
00000020 8BE5 mov esp,ebp
00000022 5D pop ebp
00000023 C20400 ret 0x4
there is
movzx eax,al
instead of
movsx eax,al
This is corrected in next release, the second function is the correct syntax.