FilterFactory - Operator "%" (modulo)

Back to function listing

Syntax

a%b

Original Machine Code (in OPER resource) of Filter Factory 3.0 and 3.0.4 for Photoshop/Win32

5B pop ebx (param_b) .
58 pop eax (param_a) .
0B DB or ebx,ebx .
75 04 jnz +$04 (@@1) if (param_b != 0) goto @@1;
2B D2 sub edx,edx edx = 0;
EB 03 jmp +$03 (@@2) goto @@2; // return 0;
@@1: @@1:
99 cdq edx = (eax>0) ? 0 : -1;
F7 FB idiv ebx param_a /= param_b; edx = param_a % param_b;
@@2: @@2:
52 push edx return edx;