I am trying to print the loop count inside my loop. However, I am getting an error trying to move %cx to %rdi:
Printing %cx which holds the value of the loop count:
movw %cx, %rsi
movq $stringNumber, %rdi
xorq %rax, %rax
call printf
This is what I have in the .data section:
.stringNumber: .asciz "Number: %d\n"
I am getting this error:
Error: unsupported instruction `mov'
I think it has to do with the way I am trying to move %cx into %rsi. I don't know what I am doing wrong though.