Trying to divide a positive number by a negative number.
Currently my program will divide correctly, and I can correctly access the remainder.
But when I inputa positive number being divided by a negative value, it wont divide at all.
I know there is a way to "sign extend" and it will divide correctly. I just dont understand the manual
movsss $imm/%reg %reg/mem move, sign extend 231 movzss $imm/%reg %reg/mem move, zero extend
ofcourse thats att syntax, I need intel syntax
here is my code
xor rdx, rdx
mov rax, [input]
mov rcx, [input2]
idiv rcx
Ideas as how to divide by negative?