seems like every time i write a program in assembly i get these errors. all i am trying to do is multiply these two numbers, but this happens

1>z:\assembly\p2a\new folder\p2c\p2c\p2c.cpp(27) : error C2443: operand size conflict
1>z:\assembly\p2a\new folder\p2c\p2c\p2c.cpp(28) : error C2414: illegal number of operands
1>z:\assembly\p2a\new folder\p2c\p2c\p2c.cpp(29) : error C2443: operand size conflict

short int num1 = 0x4444;
     short int num2 = 0x7777;
     short int ans1 = 0;
   

        __asm {
//  your syntatically correct assembly language code here
//  column alignment markers below (to guide you)
//      |       |               |
		mov     ax,num1         ;get first num to add
	    mul		ax,num2		    ;form mul
	    mov		ans1,ax		    ;store result

I still have no idea why you are having the operand size conflicts. This is what Microsoft has to say about it.

The AX is implied in MUL operands, so the third instruction should read mul num2 Hope this helps.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.