When Im using this bit of the code I get an exception. At least this what I get from the school's compiler.
The value of i,j is given, j= 348 and i= 457830 (i is declared as int 32 and j is declared as int16)
mov(i,eax);
movzx(j,ebx);
sub(ebx,eax);
add(3,ebx);
cdq;
div(ebx);
mov(edx,eax);
The value that I should return in EAX is: (i - j) % (3+j) All I want is the remainder, which I get, but with that exception I cant get the points for my homework.