|
penggp
新手上路

积分 12
发帖 4
注册 2008-7-17
状态 离线
|
『楼 主』:
win XP下运行QBasic问题求助!
使用 LLM 解释/回答一下
孩子刚开始学习Qbasic,进入DOS,运行Qbasic.exe正常。可编写的程序执行run-start后,有的程序运行后出现黑屏,有的程序是直接退出了qbasic,不出现运行结果。可在我办公室机器上运行一切正常。求教各位高手,如何解决?谢谢!!
我的操作系统是:番茄花园 Windows XP Pro SP2 免激活 V3.5
系统信息如下:
OS 名称 Microsoft Windows XP Professional
版本 5.1.2600 Service Pack 3 内部版本号 2600
OS 制造商 Microsoft Corporation
系统名称 CFC598C0428A49F
系统制造商 To Be Filled By O.E.M.
系统模式 MCP68
系统类型 基于 X86 的 PC
处理器 x86 Family 15 Model 107 Stepping 1 AuthenticAMD ~2094 Mhz
BIOS 版本/日期 American Megatrends Inc. 080014, 2007-8-28
SMBIOS 版本 2.5
Windows 目录 C:\WINDOWS
系统目录 C:\WINDOWS\system32
启动设备 \Device\HarddiskVolume1
地区 中华人民共和国
硬件抽象层 版本 = "5.1.2600.5512 (xpsp.080413-2111)"
用户名称 CFC598C0428A49F\Administrator
时区 中国标准时间
总的物理内存 2,048.00 MB
可用物理内存 1.24 GB
总的虚拟内存 2.00 GB
可用虚拟内存 1.96 GB
分页文件空间 3.60 GB
页文件 C:\pagefile.sys
The child has just started learning Qbasic, enters DOS, and runs Qbasic.exe normally. But after writing a program and executing run-start, some programs show a black screen after running, and some directly exit Qbasic without showing the running result. However, it runs normally on my office machine. Asking for help from all experts, thanks!!
My operating system is: Tomato Garden Windows XP Pro SP2 Activation-free V3.5
System information is as follows:
OS Name Microsoft Windows XP Professional
Version 5.1.2600 Service Pack 3 Build Number 2600
OS Manufacturer Microsoft Corporation
System Name CFC598C0428A49F
System Manufacturer To Be Filled By O.E.M.
System Model MCP68
System Type X86-based PC
Processor x86 Family 15 Model 107 Stepping 1 AuthenticAMD ~2094 Mhz
BIOS Version/Date American Megatrends Inc. 080014, 2007-8-28
SMBIOS Version 2.5
Windows Directory C:\WINDOWS
System Directory C:\WINDOWS\system32
Boot Device \Device\HarddiskVolume1
Region People's Republic of China
Hardware Abstraction Layer Version = "5.1.2600.5512 (xpsp.080413-2111)"
User Name CFC598C0428A49F\Administrator
Time Zone China Standard Time
Total Physical Memory 2,048.00 MB
Available Physical Memory 1.24 GB
Total Virtual Memory 2.00 GB
Available Virtual Memory 1.96 GB
Paging File Space 3.60 GB
Page File C:\pagefile.sys
|
|
2008-7-18 07:02 |
|
|
ilbgh11
初级用户
 
积分 60
发帖 21
注册 2008-7-17
状态 离线
|
『第 2 楼』:
使用 LLM 解释/回答一下
楼主可以写一个Hello World在XP下运行,肯定CMD窗口闪一下就没了。
解决办法:在需要显示结果的地方加一个暂停语句(C语言中用getch()函数实现)
我有好长时间没接触BASIC了,忘的差不多了。
The LZ can write a Hello World program to run under XP, and surely the CMD window will flash and then disappear.
Solution: Add a pause statement in the place where you need to display the result (implemented with the getch() function in C language).
I haven't been in touch with BASIC for a long time and have almost forgotten it.
|
|
2008-7-19 11:52 |
|
|
ilbgh11
初级用户
 
积分 60
发帖 21
注册 2008-7-17
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
如果出现黑屏,检查一下QBASIC的设置
如果QBASIC直接退出,改改你的程序代码,不要让它触动WINDOWS的保护机制。或换一个BASIC编译器。个人推荐PowerBasic
If there is a black screen, check the settings of QBASIC. If QBASIC exits directly, modify your program code and don't let it trigger the protection mechanism of WINDOWS. Or change to another BASIC compiler. Personally, PowerBasic is recommended.
|
|
2008-7-19 11:55 |
|
|
penggp
新手上路

积分 12
发帖 4
注册 2008-7-17
状态 离线
|
『第 4 楼』:
问题补充
使用 LLM 解释/回答一下
感谢 ilbgh11 朋友的指导!!!Qbasic中没法改变设置,估计是操作系统中的设置问题,我不懂如何改变。
我在电脑上装了一个DosBox0.72,借助它虚拟DOS环境,程序运行情况正常。
进一步观察发现:不出结果或黑屏的只是那些程序代码中用到 screen,line,draw,play等涉及到图像和声音的,其它程序执行还是可以的。请教各位:我如何改变设置才能彻底解决,谢谢!!
Last edited by penggp on 2008-7-20 at 12:38 AM ]
Thanks to friend ilbgh11 for guidance!!! There's no way to change settings in Qbasic. It's estimated to be a setting issue in the operating system, and I don't know how to change it.
I installed a DosBox 0.72 on my computer and used it to virtualize the DOS environment, and the program runs normally.
Further observation found that only those programs whose code uses screen, line, draw, play, etc. related to images and sounds don't produce results or are black screens, while other programs can still be executed. Asking everyone: How can I change the settings to completely solve this problem? Thanks!
Last edited by penggp on 2008-7-20 at 12:38 AM ]
|
|
2008-7-20 00:31 |
|
|
SDOS
新手上路

积分 12
发帖 6
注册 2008-7-26
状态 离线
|
『第 5 楼』:
建议_抛弃QBasic
使用 LLM 解释/回答一下
去Linux平台找个“骆驼”
怎么也比这个强。
Go find a "Camel" on the Linux platform. It's much better than this.
|
|
2008-7-26 23:17 |
|
|
ilbgh11
初级用户
 
积分 60
发帖 21
注册 2008-7-17
状态 离线
|
『第 6 楼』:
再帮帮你吧
使用 LLM 解释/回答一下
你建立一个指向QBASIC.EXE的快捷方式。在WINDOWS中指向DOS程序的快捷方式很特别(MS还是比较照顾老年程序的)。右击你建立的快捷方式图标,属性,在"屏幕"选项卡中“用法”选“全屏幕”,“兼容性”选项卡“显示设置”去掉“禁用视觉样式”前的勾。应用,确定。再双击你建立的这个快捷方式运行QBASIC使你的设置生效。再运行含有screen line draw play等语句的程序,看看好使了没。
You create a shortcut to QBASIC.EXE. In WINDOWS, the shortcut pointing to a DOS program is quite special (MS still takes care of the older programs). Right-click the shortcut icon you created, go to Properties, in the "Screen" tab, select "Full screen" in "Usage", and in the "Compatibility" tab, remove the checkmark in front of "Disable visual styles" in "Display settings". Apply and OK. Then double-click this shortcut to run QBASIC to make your settings take effect. Then run a program containing statements like screen, line draw, play, etc., and see if it works.
|
|
2008-7-27 15:39 |
|