我正在尝试使用 Assembly 和 C 创建一个操作系统,并且我有一些将文本写入屏幕的文件。但是,我需要检测键盘上是否按下了某个键。我使用 Windows 10 和 Visual Studio Code 作为代码编辑器。
我尝试使用
iostream
的 std::cin.get()
但 gcc 返回错误 fatal error: iostream: No such file or directory
。
我尝试使用
conio.h
的 getch()
和 _getch()
但 gcc 返回 fatal error: conio.h: No such file or directory
。
操作系统处于64位保护模式。
既然你正在编写一个操作系统并尝试使用高级库,并且你不明白它们为什么不起作用,所以你不应该编写一个操作系统。
这些函数必须自己编写才能使用。