首页
社区
课程
招聘
[旧帖] [己解决]运行DOS程序时,总是出现Invalid keyboard code specified 0.00雪花
发表于: 2007-10-29 15:13 9900

[旧帖] [己解决]运行DOS程序时,总是出现Invalid keyboard code specified 0.00雪花

2007-10-29 15:13
9900
最近在写汇编的课程设计,是16位的。编译,链接都过了,在CMD下运行总是先出现个“Invalid keyboard code specified”提示,但不影响结果。而且出现一次后,只要不退出CMD,再次运行DOS程序,也不会出现那个提示了。可是退出后再运行的话就有这个提示。
     

     另外如果在“开始”“运行“输入COMMAND命令的话,一运行就会出现“Invalid keyboard code specified”,但接下来运行DOS的话就没有那个提示了。

     我的操作系统是英文XPSP2(Pro)的,但我把区域语言设成了中文,键盘设成是Chinese(PRC)。cmd和command的Current code page显示的是936(ANSI/OEM-Simplified Chinese GBK)

     另外我在Windows 2000sp4(简体中文版)上运行DOS正常!

     用来测试的DOS程序:

;  A 16-bit DOS HelloWorld program originally by RedOx.  Produces a small model .EXE executable.

; To assemble and link from within WinAsm Studio, you must have a special 16-bit linker,
; such as the one in the archive at this URL- http://win32assembly.online.fr/files/Lnk563.exe
; Run the archive to unpack Link.exe, rename the Link.exe file to Link16.exe and copy it
; into the \masm32\bin folder.

.MODEL        small
.stack        100h

.data
        msg                db "This is a 16-bit DOS .EXE executable",13,10,"Hello, World!",13,10,"$"; The string must end with a $

.code
start:
        mov                ax,@data                ; Get the address of the data segment
        mov                ds,ax                        ; Set the DS segment
     
        mov                dx,offset msg        ; Get the address of our message in the DX
        mov                ah,9                        ; Function 09h in AH means "WRITE STRING TO STANDARD OUTPUT"
        int                21h                                ; Call the DOS interrupt (DOS function call)
       
        mov                ax,0C07h                ; Function 0Ch = "FLUSH BUFFER AND READ STANDARD INPUT"
        int                21h                                ; Waits for a key to be pressed.
       
        mov                ax, 4C00h                ; the exit fuction  [4C+no error (00)]
        int                21h                                ; call DOS interrupt 21h
end start

      请问这是什么原因,是不是因为我改语言引起的,麻烦高手看一下。怎么解决?另外请不会的人不要灌水,谢谢!

[课程]Android-CTF解题方法汇总!

收藏
免费 0
支持
分享
最新回复 (1)
雪    币: 237
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
2
已解决,在输入法设置中把开机启动时要用的输入法选为Englis(US)就行了。
2007-10-29 17:13
0
游客
登录 | 注册 方可回帖
返回
//