News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

HJWasm 2.24 release

Started by johnsa, April 04, 2017, 06:47:57 PM

Previous topic - Next topic

johnsa


Straight from the Intel and AMD instruction manuals:

77 cb
JA rel8 D Valid Valid Jump short if above (CF=0 and ZF=0).
0F 87 cd
JA rel32 D Valid Valid Jump near if above (CF=0 and ZF=0).

73 cb
JAE rel8 D Valid Valid Jump short if above or equal (CF=0).
0F 83 cd
JAE rel32 D Valid Valid Jump near if above or equal (CF=0).

In all cases JAE needs to be 0x03 and JA needs to be 0x07, I have no idea where you're getting 77 cb for JAE from ?!?!?

Adamanteus

Correct for programming is such :

77 cb
JAE rel8 D Valid Valid Jump short if above  or equal  (CF=0 and ZF=0).
0F 87 cd
JAE rel32 D Valid Valid Jump near if above or equal  (CF=0 and ZF=0).

73 cb
JA rel8 D Valid Valid Jump short if above (CF=0).
0F 83 cd
JA rel32 D Valid Valid Jump near if above (CF=0).

nidud

#32
deleted

johnsa

Good catch, Nidud!
Thanks  :t

I've put this in now, busy looking at an issue aw27 has found, once thats resolved I'll update the packages/git to 2.26 r2.

I still don't get what you're talking about with JA/JAE.. I've hand checked them, verified the results against the instruction manuals so I'm not sure.. anyone else care to way in on the issue ?

johnsa

these fixes included and git / packages on the site updated.

habran

Quote from: Adamanteus on April 13, 2017, 02:52:12 AM
Correct for programming is such :

77 cb
JAE rel8 D Valid Valid Jump short if above  or equal  (CF=0 and ZF=0).
0F 87 cd
JAE rel32 D Valid Valid Jump near if above or equal  (CF=0 and ZF=0).

73 cb
JA rel8 D Valid Valid Jump short if above (CF=0).
0F 83 cd
JA rel32 D Valid Valid Jump near if above (CF=0).

This is from Intel® 64 and IA-32 Architectures Software Developer's Manual Volume 2 (2A, 2B & 2C): Instruction Set Reference

Quote77 cb JA rel8 D Valid Valid Jump short if above (CF=0 and ZF=0).
73 cb JAE rel8 D Valid Valid Jump short if above or equal (CF=0).
72 cb JB rel8 D Valid Valid Jump short if below (CF=1).
76 cb JBE rel8 D Valid Valid Jump short if below or equal (CF=1 or ZF=1).
72 cb JC rel8 D Valid Valid Jump short if carry (CF=1).
E3 cb JCXZ rel8 D N.E. Valid Jump short if CX register is 0.
E3 cb JECXZ rel8 D Valid Valid Jump short if ECX register is 0.
E3 cb JRCXZ rel8 D Valid N.E. Jump short if RCX register is 0.
74 cb JE rel8 D Valid Valid Jump short if equal (ZF=1).
7F cb JG rel8 D Valid Valid Jump short if greater (ZF=0 and SF=OF).
7D cb JGE rel8 D Valid Valid Jump short if greater or equal (SF=OF).
7C cb JL rel8 D Valid Valid Jump short if less (SF≠ OF).
7E cb JLE rel8 D Valid Valid Jump short if less or equal (ZF=1 or SF≠ OF).
76 cb JNA rel8 D Valid Valid Jump short if not above (CF=1 or ZF=1).
72 cb JNAE rel8 D Valid Valid Jump short if not above or equal (CF=1).
73 cb JNB rel8 D Valid Valid Jump short if not below (CF=0).
77 cb JNBE rel8 D Valid Valid Jump short if not below or equal (CF=0 and
Cod-Father

Adamanteus

#36
Quote from: nidud on April 13, 2017, 03:07:03 AM
There may be brackets added here:

        lea edx,[esp + type edx ]
lea edx,[esp + type(edx)]


But that's extensioning language, maby need maybe not, so better I'd make under condition :

#if defined SYN_TYPE_RB
if ( (i > 0 && tokenarray[i - 1].tokval == T_TYPE) ||
     (i > 1 && tokenarray[i - 1].token == T_OP_BRACKET
    && tokenarray[i - 2].tokval == T_TYPE) )

     ; /* v2.24 [reg + type reg] | [reg + type(reg)] */

else if ( flags & EXPF_IN_SQBR ) {
#else
        if( flags & EXPF_IN_SQBR && (i == 0 || tokenarray[i - 1].tokval != T_TYPE)) {
#endif


Quote from: habran on April 13, 2017, 08:09:59 AM
77 cb JA rel8 D Valid Valid Jump short if above (CF=0 and ZF=0).
73 cb JAE rel8 D Valid Valid Jump short if above or equal (CF=0).
72 cb JB rel8 D Valid Valid Jump short if below (CF=1).
- variosly, thay simple changed mnemomics, as to hardware it not too mach care

P.S. Sorry, with opcode I mistaken - simple JAE really checking more flags, not just CF (looks like SF also)
P.P.S So, the flags mentioned in Intel docs, for use Jxx after ADD, ADC, SUB, SBB commands.