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

Posts: 199
Topics: 37

Location:
[1583] Jcc instructions - posted: 2015-02-02 09:49:58
Some instructions can be coded as short variant: Code:
program RAW_IMAGE 'test';

#set bits 32;

jo my_label
jno my_label
jb my_label
jbe my_label
jnbe my_label
jnb my_label
ja my_label
jae my_label
jnae my_label
jna my_label
jc my_label
jnc my_label
jz my_label
jnz my_label
je my_label
jne my_label
js my_label
jns my_label
jp my_label
jnp my_label
jl my_label
jle my_label
jnle my_label
jnl my_label
jg my_label
jge my_label
jnge my_label
jng my_label

my_label:


Code:
00000000  0F805A000000      jo dword 0x60
00000006  0F8154000000      jno dword 0x60
0000000C  0F824E000000      jc dword 0x60
00000012  0F8648000000      jna dword 0x60
00000018  0F8742000000      ja dword 0x60
0000001E  0F833C000000      jnc dword 0x60
00000024  0F8736000000      ja dword 0x60
0000002A  0F8330000000      jnc dword 0x60
00000030  0F822A000000      jc dword 0x60
00000036  0F8624000000      jna dword 0x60
0000003C  7222              jc 0x60
0000003E  7320              jnc 0x60
00000040  741E              jz 0x60
00000042  751C              jnz 0x60
00000044  741A              jz 0x60
00000046  7518              jnz 0x60
00000048  7816              js 0x60
0000004A  7914              jns 0x60
0000004C  7A12              jpe 0x60
0000004E  7B10              jpo 0x60
00000050  7C0E              jl 0x60
00000052  7E0C              jng 0x60
00000054  7F0A              jg 0x60
00000056  7D08              jnl 0x60
00000058  7F06              jg 0x60
0000005A  7D04              jnl 0x60
0000005C  7C02              jl 0x60
0000005E  7E00              jng 0x60



Also 'Unexpected ident' for Code:
jcxz my_label
jecxz my_label

Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[1586] - posted: 2015-02-02 16:06:51
Thanks for report, fixed size issue and added those 2 jump opcodes.

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:
[1595] - posted: 2015-02-02 20:17:03
Also still not supported
Code:
loop my_label
loopz my_label
loope my_label
loopnz my_label
loopne my_label
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[1597] - posted: 2015-02-02 22:53:35
Also now implemented for next release. smile

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:
[1600] - posted: 2015-02-03 13:41:08
Code:
program RAW_IMAGE 'test';

#set bits 32;

my_label: $repeat 32: byte[eax - 1] = 1; $end loop my_label

Result:
Code:
00000000  C640FF01          mov byte [eax-0x1],0x1
00000004  C640FF01          mov byte [eax-0x1],0x1
00000008  C640FF01          mov byte [eax-0x1],0x1
0000000C  C640FF01          mov byte [eax-0x1],0x1
00000010  C640FF01          mov byte [eax-0x1],0x1
00000014  C640FF01          mov byte [eax-0x1],0x1
00000018  C640FF01          mov byte [eax-0x1],0x1
0000001C  C640FF01          mov byte [eax-0x1],0x1
00000020  C640FF01          mov byte [eax-0x1],0x1
00000024  C640FF01          mov byte [eax-0x1],0x1
00000028  C640FF01          mov byte [eax-0x1],0x1
0000002C  C640FF01          mov byte [eax-0x1],0x1
00000030  C640FF01          mov byte [eax-0x1],0x1
00000034  C640FF01          mov byte [eax-0x1],0x1
00000038  C640FF01          mov byte [eax-0x1],0x1
0000003C  C640FF01          mov byte [eax-0x1],0x1
00000040  C640FF01          mov byte [eax-0x1],0x1
00000044  C640FF01          mov byte [eax-0x1],0x1
00000048  C640FF01          mov byte [eax-0x1],0x1
0000004C  C640FF01          mov byte [eax-0x1],0x1
00000050  C640FF01          mov byte [eax-0x1],0x1
00000054  C640FF01          mov byte [eax-0x1],0x1
00000058  C640FF01          mov byte [eax-0x1],0x1
0000005C  C640FF01          mov byte [eax-0x1],0x1
00000060  C640FF01          mov byte [eax-0x1],0x1
00000064  C640FF01          mov byte [eax-0x1],0x1
00000068  C640FF01          mov byte [eax-0x1],0x1
0000006C  C640FF01          mov byte [eax-0x1],0x1
00000070  C640FF01          mov byte [eax-0x1],0x1
00000074  C640FF01          mov byte [eax-0x1],0x1
00000078  C640FF01          mov byte [eax-0x1],0x1
0000007C  C640FF01          mov byte [eax-0x1],0x1
00000080  0FF27AFF          pslld mm7,[edx-0x1]
00000084  FF                db 0xff
00000085  FF                db 0xff
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[1609] - posted: 2015-02-03 17:10:23
Thanks, seems I forgot to add the additional check for the raw builder. 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:
[1620] - posted: 2015-02-04 18:17:18
seems I forgot to add the additional check for the raw builder.
Just interesting how it happened. Are you repeat your code for each builder?
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[1622] - posted: 2015-02-04 19:11:12
Not all, but some builders use the code slightly different, in the case of RAW files, it is different (raw system includes intel_boot, kolibri and menuet - The opposing is PECOFF.

Later I will probably further optimise things, but for now it is fine. smile

Download Ziron
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.
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