|
From: Ioannis V. <no...@ya...> - 2002-02-08 04:45:26
|
I have not played with assembly but i have the strong impression that
you can use assembly in C/C+= code using the
asm("command"); concept. E.g. asm("mov AH,8");
Ioannis
* Ioannis Vranos
* Programming pages: http://www.noicys.d2g.com
* Alternative URL: http://run.to/noicys
> -----Original Message-----
> From: dev...@li...
> [mailto:dev...@li...] On Behalf
> Of David Mcken
> Sent: Thursday, February 07, 2002 11:05 PM
> To: dev...@li...
> Subject: [Dev-C++] assembly help
>
>
> will some one please help me figure out what is wrong with
> the following
> program
>
> #include <iostream.h>
> #include <stdlib.h>
>
> int main()
> {
> char x, password[50];
> cout << "Please enter your password" << endl;
>
> do{
> // this code reads a character from the keyboard but
> does not echo it
> asm mov AH,8
> asm INT 21H
> asm mov x,AL
> // this cout should say why I want to do this
> cout << "*";
> // add x to the end of password
> } while (x != '\n');
> cout << endl;
> //the remainder of the program goes here
> system("PAUSE");
> return 0;
> }
> (this is an unfinished program)
>
> I am getting the following erors
> 9 c:\windows\desktop\asm_eg.cpp parse error before `AH'
> 10 c:\windows\desktop\asm_eg.cpp nondigits in number and
> not hexadecimal
>
> I do not understand what is the problem is as it works fine
> as part of a
> pascal program
>
>
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|