Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows 98/95 DOS prompt - cursor jumps around #193

Open
ErnWong opened this issue Feb 15, 2018 · 2 comments
Open

Windows 98/95 DOS prompt - cursor jumps around #193

ErnWong opened this issue Feb 15, 2018 · 2 comments

Comments

@ErnWong
Copy link
Contributor

ErnWong commented Feb 15, 2018

I saw this interesting bug a while ago but I didn't know how to reproduce it reliably until now.

Open DOS prompt on Windows 98/95. If you give your keystrokes enough delay, the cursor loves jumping backwards and does interesting things. What could this be?

Here's a little gif demo. Grab some popcorn.

win9x-console

I'll just dump a couple more observations...

You can see that when the glitch occurs, the previous command / stdin is partially reused:

win9x-console-careful

On Windows 95, reading from console stdin (via type con) illustrates this:

win95-typecon

On Windows 98, reading from console stdin (via type con) closes abruptly with random artifects:

image

Notice how the garbage text jumped back into the previous line. It's supposed to look like this: (typing the exact same thing in VirtualBox)

image

@copy
Copy link
Owner

copy commented Feb 15, 2018

Interesting find. This is probably a CPU bug, so I'd set a breakpoint in the keyboard interrupt trigger and in the cycle function and then step through it, inspect registers using cpu.debug.dump_regs and load a memory dump in IDA to get an idea of what the code is doing and where it goes wrong.

It seems like it could be related to the handling of carriage returns, since the cursor jumps to the beginning of the line.

@ErnWong
Copy link
Contributor Author

ErnWong commented Feb 18, 2018

Sorry I couldn't offer much help at the moment. I'm pretty inexperienced with assembly, so I had difficulty locating the code of interest starting from the keyboard handler routine. This sounds fun though, so I might give it a more persevering attempt when I have time later this year - if it's not fixed by then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants