-
quite difficult !
hello
i'm writing this C program to run a asm. i want to pass command line arguements to this asm.
but when i use mov cx,argv[1], it says operand size conflict. may be because mov requires 1 byte and argv[1] is sending 2 bytes. what is the possible solution ?? i need to use command line arguements only, what is the other way out to do this ?
i'm also including a sample program. pls suggest me how to go abt it.
waiting for a quick response.
thanks
shruti !!
Code:
#include <stdio.h>
#include <conio.h>
#include<string.h>
void main(int argc,char *argv[])
{
FILE *fptr;
printf("in func\n");
_asm
{
MOV CX,0FF20H
MOV DX,3F8H
}
getch();
}
-
I have moved your thread into the C/C++ forum as you should get a better response in here.
-
argv[1] is one byte, cx is a 2-byte register. Try cl.