Hi,
I wrote a function in 'C' as follows.

void myfunc(int x,int y)
{
	asm	mov ah , 0x02
	asm	mov bh , 0x0
	asm	mov dh , y     <=Error Here
	asm	mov dl , x      <=Error Here
}

It shows the error "Invalid use of Opcode and Operand". What is the reason?

Regards.

Recommended Answers

All 2 Replies

Each compiler handles mixing C and assembler in different ways.
So without you telling us which compiler, this thread is going nowhere.

It looks like an old Turbo variant to me. Did you try asm move dh, [y] ?

This is just a guess...

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.