News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

add byte ptr [eax] , al

Started by why06, June 02, 2010, 09:57:47 PM

Previous topic - Next topic

why06

in disassembler's I see that line of code quite often, and I was wondering what it really means.

qWord

this instruction is encoded as two zero bytes - it is certainly no code.
FPU in a trice: SmplMath
It's that simple!

why06

Quote from: qWord on June 02, 2010, 10:28:21 PM
this instruction is encoded as two zero bytes - it is certainly no code.

ok. thanks a lot. and again nice fractal.

So i'll assume its safe to omit this instruction when its inside a function.

Rockoon

It shouldnt be inside a function, unless its something very exotic.
When C++ compilers can be coerced to emit rcl and rcr, I *might* consider using one.

why06

Quote from: Rockoon on June 03, 2010, 01:24:07 AM
It shouldnt be inside a function, unless its something very exotic.

its a d3d function this is DIRECT3DDEVICE9::Present(), here's what the first 50 instructions of it look like.

0x6815e3dc sahf 
0x6815e3dd pop eax
0x6815e3de mov ebp , C473456Fh
0x6815e3e3 outsd 
0x6815e3e4 add byte ptr [eax] , al
0x6815e3e6 add byte ptr [eax] , al
0x6815e3e8 add byte ptr [eax] , al
0x6815e3ea add byte ptr [eax] , al
0x6815e3ec add eax , dword ptr [eax]
0x6815e3ee add byte ptr [eax] , al
0x6815e3f0 add byte ptr [eax] , al
0x6815e3f2 add byte ptr [eax] , al
0x6815e3f4 jnc 6815E3F6h
0x6815e3f6 add byte ptr [eax] , al
0x6815e3f8 add byte ptr [eax] , al
0x6815e3fa add byte ptr [eax] , al
0x6815e3fc add byte ptr [eax] , al
0x6815e3fe add byte ptr [eax] , al
0x6815e400 add byte ptr [eax] , al
0x6815e402 add byte ptr [eax] , al
0x6815e404 add byte ptr [eax] , al
0x6815e406 add byte ptr [eax] , al
0x6815e408 add byte ptr [eax] , al
0x6815e40a add byte ptr [eax] , al
0x6815e40c add byte ptr [eax] , al
0x6815e40e add byte ptr [eax] , al
0x6815e410 add byte ptr [eax] , al
0x6815e412 add byte ptr [eax] , al
0x6815e414 sldt word ptr [eax]
0x6815e417 add byte ptr [eax] , al
0x6815e419 add byte ptr [eax] , al
0x6815e41b add byte ptr [edi+66h] , ch
0x6815e41e add byte ptr [eax] , al
0x6815e421 add byte ptr [eax] , al
0x6815e423 add byte ptr [eax] , al
0x6815e425 add byte ptr [eax] , al
0x6815e427 add byte ptr [eax] , al
0x6815e429 add byte ptr [eax] , al
0x6815e42b add byte ptr [ebx] , al
0x6815e42d add byte ptr [eax] , al
0x6815e42f add byte ptr [edi] , cl
0x6815e431 add byte ptr [eax] , al
0x6815e433 add byte ptr [eax] , al
0x6815e435 add byte ptr [eax] , al
0x6815e437 add byte ptr [edi+61h] , dh
0x6815e43a insb 
0x6815e43b insb 
0x6815e43c push 006B6361h
0x6815e441 add byte ptr [eax] , al
0x6815e443 add byte ptr [eax] , al

hutch--

why06,

Read the forum rules about cracking, reversing and similar. There are other places where you can ask questions of this type but i9n this forum there is no activities of this type allowed.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php