Foro de elhacker.net

Programación => Ingeniería Inversa => Mensaje iniciado por: joseyana2007 en 30 Mayo 2008, 01:47 am



Título: JECXZ y JCXZ
Publicado por: joseyana2007 en 30 Mayo 2008, 01:47 am
hola, no encuentro un foro de assembler, supongo este ser el mejor.

consulto OPCODES de hutch y me dice que ambas son 1Byte

programo y tengo problemas: JCXZ y JECXZ deberian ser identicas

pues no, JCXZ ocupa 2Bytes

¿error del compilador?

saludos


Título: Re: JECXZ y JCXZ
Publicado por: Shaddy en 30 Mayo 2008, 09:21 am
hola, no encuentro un foro de assembler, supongo este ser el mejor.

consulto OPCODES de hutch y me dice que ambas son 1Byte

programo y tengo problemas: JCXZ y JECXZ deberian ser identicas

pues no, JCXZ ocupa 2Bytes

¿error del compilador?

saludos



y bueno, si, jcxz ocupa 2 bytes.

Citar
The JECXZ and JCXZ instructions differs from the other Jcc instructions because they do not check the status flags. Instead they check the contents of the ECX and CX registers, respectively, for 0. Either the CX or ECX register is chosen according to the address-size attribute. These instructions are useful at the beginning of a conditional loop that terminates with a conditional loop instruction (such as LOOPNE). They prevent entering the loop when the ECX or CX register is equal to 0, which would cause the loop to execute 2 32 or 64K times, respectively, instead of zero times.

All conditional jumps are converted to code fetches of one or two cache lines, regardless of jump address or cacheability.
Operands    Bytes    Clocks
near8    2    1    PV
near16    3    1    PV

Fuente: http://jsimlo.sk/docs/cpu/index.php/jcxz.html

Será un error de hutch, porque el opcode de JCXZ es "67 E3" y el de JECXZ es "E3".

Salu2..