|
-
Mar 5th, 2003, 08:06 AM
#1
Thread Starter
Addicted Member
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();
}
-
Mar 5th, 2003, 08:12 AM
#2
Retired VBF Adm1nistrator
I have moved your thread into the C/C++ forum as you should get a better response in here.
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Mar 7th, 2003, 02:51 PM
#3
argv[1] is one byte, cx is a 2-byte register. Try cl.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|