I can provide code if needed just like to try and not have my inital posts cluttered with my bad code

Code: Select all
vid.setcolor(WHITE, BLACK);
Code: Select all
cout << input;
Did you declare your cout object static in the header file? Just a random guess?LordMage wrote:Sorry for being so vague. I guess I didn't realise I was THAT vauge.
I am in protected mode, I was just updating the video memory using a C++ class with xpos and ypos variables to track my current position in the video memory. I have a cout function that works perfectly. My cin function for some reason is printing all the typed characters at the top of the screen. I thought that it might be the hardware cursor so I added code to update the position of the hardware cursor to match the postion of the video location in memory. Now my hardware cursor is jumping from my prompt that I am creating with a cout statement to the top of the screen where my cin statement is still printing.
I think that my OStream class with the object name of cout and my IStream class with the object name of cin are using seperate instances of the Video class which is initiated once to my knowledge using an object named vid. Now when I update the color of my text using the function
it updates the colors being used by my cout object and my other Video class funcitons. So, I would think that since private variables inside the class are maintaining the changing values that a different instance of the class would cause my color changing not to be effective. I was assuming that if that worked then my cin would work the same way with the xpos and ypos variables that determine the output position of a printed character within the video class.Code: Select all
vid.setcolor(WHITE, BLACK);
Inside my IStream class functions I am using cout to print the individual characters produced by the keyboard interrupt function. All my keyboard interrupt does is convert from scancode to ascii and it adds a counter to a buffer that indicates a character is waiting. then a getch function that is called by my cin object waits for the buffer to be a nonzero and processes any characters waiting in the keyboard buffer. That is where it prints all printable characters by issueing a
command. For some reason this cout prints to the top of the screen instead of where the other cout being called by my main function is printing.Code: Select all
cout << input;
I hope that helps, again if you need actual functions i can post what I have.