how can I know if a command is treating an immediate as a decimal or as a hexadecimal? e.g div casts the values into decimal before it make the arithmetic division:
.data x: .quad 0x16 y: .quad 0x7 z: .space 8
.text
.global main
main:
xor %rax, %rax
xor %rbx, %rbx
xor %rdx, %rdx
movq x, %rax
movq y, %rbx
div %rbx
movq %rax, z
ret
I'm getting those results:
and my guess is that div looks at the decimal value of the number inside a register (cast it from hex to dec) but is it always like that in all arithmetic commands? are there commnads from different type that also act like this? I've tried reading the manual, but it doesn't specified there, I found it out by accident when debugging in sasm.
thank you very much for your time and attention.