472,973 Members | 1,889 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,973 software developers and data experts.

simulate getch()

hello everyone:
I want to programming c++ with asm to simulate the getch().
getch() is included in <conio.h>, it's function is to get a
character from keyboard, but not echo.
my code as follow:
char my_getch()
char chr;
mov ah, 07H
mov chr, al
return chr;

but cannot pass the compiler. my complier is CL 7.1.

Mar 5 '06 #1
2 3257

To pause use system("PAUSE"); and #include <stdlib.h> or cstdlib

Also try getchar(); instead of getch() and #include <stdio.h>

Mar 5 '06 #2
To pause use system("PAUSE"); and #include <stdlib.h>
Also try getchar(); instead of getch() and #include <stdio.h>


F. Meyer

Mar 5 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: voidstar | last post by:
Hi, I have the following problem: I use "getch" to monitor keypresses and the I use "cin" to input a string. When I type in 'y', the 'y' character appears, so I need to hit backspace before...
by: Shugong Wang | last post by:
getch() function is not a standard C/C++ function. Thought gcc provieds ncurses.h and a getch() function is realized, I still want to know how to realize a getch() function in standard c or c++.
by: aurgathor | last post by:
Howdy, What would be the equivalent of getch() using iostream? My current code is: cout << "\nPress <Enter> to continue..."; getch(); but <conio.h> is not kosher for the C++ class.
by: Crow | last post by:
Is there any way to make cin behave like getch()? Specifically, getch() returns immediately after a key is pressed and the cin family of input methods seem to block until a new line is...
by: Ratheesh Kumar | last post by:
My doubt is on the working of getch() function based on the following observations 1) if the pressed key has an ascii code,only that can be read using a single call to getch() 2) if the key has...
by: simnav | last post by:
In the following code something strange happens ! If I keep pressed any of ALT+Arrow, keys, they are extracted two times from buffer then getch seems to stop; if I release and press again ALT+arrow...
by: Sankar | last post by:
Dear all, In my programming snippet compiled in Linux 2.6, I have a getch() , but the program when executed does not wait for my input.. fflush(stdin), fflush(stdout) - All these did not help. ...
by: Michele 'xjp' | last post by:
Hi there, I am using a POSIX-compliant system, Cygwin on Windows. I need the features of conio.h's getch() and clrscr(), but I can't compile programs with #include <conio.h(since conio.h is NOT...
by: fuzhen | last post by:
If I want to "press any key to continue" in Windows, I can use getch() But the getch() isn't a standard C function So what should I to do in Linux?
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.