|
From: David M. <ci...@ya...> - 2002-02-07 23:30:47
|
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
|