In my quest to learn NASM, I am trying to create a really simple program that does a division and outputs the result.

By the books, everything should run fine. I'm dividing 15 by 3, and it should automatically be stored in the AX register which I then move over to the ecx for output.

However, when I try to compile, I am getting the error

nums.asm:6: error: invalid combination of opcode and operands nums.asm:7: error: invalid combination of opcode and operands

Does anyone know what is wrong with lines 6 and 7?

This is my code: