Your program uses both something that was only available in Turbo C (far pointer, conio, etc) and something that was only available in MS-DOS (the BIOS keyboard state at 0x417).
25 years is an eternity in the world of computer programming, a lot of things from those days are not applicable today. A program that behaves this way on Windows, MacOS, or Linux would be totally different.