|
willsort
元老会员
         Batchinger
积分 4432
发帖 1512
注册 2002-10-18
状态 离线
|
『楼 主』:
[讨论]如何利用二次引导实现DOS启动菜单扩展
使用 LLM 解释/回答一下
To All:
在纯DOS层下(不包括DOS启动前的引导层和DOS启动后的应用程序层)实现启动菜单通常采用Config/Autoexec文件来进行配置。但是这种配置菜单受到DOS内核的局限,无法在功能上得到更多的扩展。
因此,使用外壳层的应用程序扩展启动菜单就属于相对的捷径了。但是由于DOS启动过程的封闭性,在其中要插入我们自己的扩展菜单,并不是很容易的事情;因为启动菜单的选择,可能意味着不同驱动程序的加载,所以扩展须在驱动加载之前就被执行,而这将扩展程序的位置限制到了 config.sys 文件中,任何驱动程序加载和DOS配置语句之前。同时DOS对 config.sys 的处理方式比较独特,类似于高级语言的编译环境,它们会对 config.sys 先进行预处理,然后再进行符号化,而 Boot.sys/bootcon.sys 等便利用了这些处理过程中的“间隙”比较有代表性的实现了启动菜单的扩展。
但是,任何扩展程序都不是万能的,也都不一定完全满足用户的使用需求,这样可以让用户自定义菜单功能,就有其必要性。但是没有人会因为扩展启动菜单的功能而去研究DOS内核,所以创建一个可以容纳用户自编写菜单“插件”的“插槽”,似乎有其必要性。
我将这个插槽放到了 autoexec.bat 中,因为在其中可以比较方便的使用诸如批处理、第三方脚本、图形界面菜单等应用程序层的资源。其基本思路如下:首次启动DOS后,直接单引导进入 autoexec.bat ,在其中创建自定义的菜单界面,并完成与用户之间的交互,然后根据交互结果生成新的 config/autoexec 文件,其中包含用户选择所需要的各项设备驱动、程序调用和环境配置命令以及恢复原有c/a文件的入口,然后重引导 DOS 而不重启计算机,以加载新 config/autoexec 文件,之后恢复原有的 c/a 文件,等待用户下一次重启。
这种“二次引导”的实现思路,其实有很多DOS引导增强程序都已经实现。但是它们也同时做成了封闭式界面,用户很难再进行二次开发;同时它们中的大部分都是以重启而不是以重引导来实现新菜单的加载,这样的启动菜单便存在很大的“启动间隙”。
(未完待续...)
Last edited by willsort on 2006-1-8 at 16:54 ]
To All:
Implementing a startup menu under the pure DOS layer (excluding the boot layer before DOS startup and the application layer after DOS startup) usually uses the Config/Autoexec files for configuration. However, this configured menu is limited by the DOS kernel and cannot be extended more functionally.
Therefore, using a shell - layer application to extend the startup menu is a relatively short cut. But due to the closed nature of the DOS startup process, it is not very easy to insert our own extended menu in it; because the selection of the startup menu may mean the loading of different drivers, so the extension must be executed before the driver is loaded, which restricts the position of the extension program to the config.sys file, before any driver loading and DOS configuration statements. At the same time, the processing method of DOS for config.sys is relatively unique, similar to the compilation environment of a high - level language. They will pre - process config.sys first and then symbolize it, and Boot.sys/bootcon.sys and so on use the "gaps" in these processing processes to relatively typically realize the extension of the startup menu.
However, any extended program is not omnipotent and may not fully meet the user's usage needs. So it is necessary to allow users to customize the menu functions. But no one will study the DOS kernel just for the function of extending the startup menu. So it seems necessary to create a "slot" that can accommodate user - written menu "plugins".
I put this slot in autoexec.bat because various resources of the application layer such as batch processing, third - party scripts, and graphical interface menus can be conveniently used in it. The basic idea is as follows: After the first startup of DOS, directly single - boot into autoexec.bat. In it, create a custom menu interface and complete the interaction with the user. Then, according to the interaction result, generate a new config/autoexec file, which contains various device drivers, program calls, and environment configuration commands required by the user's selection as well as an entry to restore the original c/a files. Then, reboot DOS without restarting the computer to load the new config/autoexec file. After that, restore the original c/a files and wait for the user's next restart.
The implementation idea of this "secondary boot" has actually been implemented by many DOS boot enhancement programs. But they also made closed interfaces, and it is difficult for users to carry out secondary development; at the same time, most of them use restart instead of re - boot to load the new menu, so such a startup menu has a large "startup gap".
(To be continued...)
Last edited by willsort on 2006 - 1 - 8 at 16:54 ]
|

※ Batchinger 致 Bat Fans:请访问 批处理编程的异类 ,欢迎交流与共享批处理编程心得! |
|
2006-1-8 16:49 |
|
|
不得不爱
超级版主
         我爱DOS
积分 5310
发帖 2044
注册 2005-9-26 来自 四川南充
状态 离线
|
|
2006-1-8 19:41 |
|
|
hxj
中级用户
  
积分 377
发帖 66
注册 2005-4-4
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
正在与网友讨论是否能从DOS不用重新启动直接返回光盘主菜问题,看到版主的帖后感到这一希望也许很快能实现,期等版主的“请听下回分解了”!!!
I'm discussing with netizens whether it's possible to return to the CD main menu directly from DOS without rebooting. After seeing the moderator's post, I feel that this hope may be realized soon, looking forward to the moderator's "Please listen to the next installment"!!!
|
|
2006-1-9 03:47 |
|
|
chujiafu
银牌会员
    
积分 1339
发帖 595
注册 2004-5-26 来自 安徽 宿州
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
是个技术难题。能不能不用Grub或者Jo.sys来实现启动时可选择从软盘启动、从硬盘启动或者从光盘启动。
It's a technical problem. Can we implement the option to choose to boot from a floppy disk, hard disk or CD - ROM at startup without using Grub or Jo.sys?
|
|
2006-1-9 19:06 |
|
|
本是
银牌会员
    
积分 2221
发帖 789
注册 2005-1-27
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
好思路!如果成功了,对DOS进行其它扩展可是方便得多!
Good idea! If it succeeds, it will be much more convenient to extend DOS in other ways!
|

my major is english----my love is dos----my teacher is the buddha----my friends--how about U |
|
2006-1-10 09:08 |
|
|
willsort
元老会员
         Batchinger
积分 4432
发帖 1512
注册 2002-10-18
状态 离线
|
『第 6 楼』:
使用 LLM 解释/回答一下
To All:
二次引导实现启动配置菜单扩展的技术核心在于如何实现第二次引导过程,对此我最先想到的就是 BIOS 提供的现有的引导装入中断 INT19 ,这是最简单,也最直接的方法,通过 DEBUG 写一个二字节的程序即可实现。不熟悉 DEBUG 的朋友,将下面的脚本创建为一个批处理,然后点击运行即可得到重引导程序 reboot.com 。
需要说明的是,reboot.com 的运行必须是在实模式环境下,而且目前为止,我尚未听说可以在保护模式下可以重引导系统的独立软件。所以,它对 Windows 是不起作用的,在 DOS 下也通常要求不能加载 EMM386.EXE 及任何 TSR 程序。
我很快做完了测试,在虚拟机的 MSDOS6.22 硬盘环境下,它的工作成绩尚算良好,它成功的实现了非重启的引导方式;只是在重引导之前,会首先检测软驱,如果其中存在可引导软盘,那么会立即从软盘引导;如果不存在,则出现选择引导设备的提示,等待回车确认后方才从硬盘引导。至于 BIOS 中的引导优先设置,则毫不理会。
但在虚拟机的 MSDOS7.10 硬盘环境下,则出现了更严重的问题:reboot 之后,仍然会有先寻找软驱的问题;不仅如此,如果没有找到可引导软盘,会首先提示未找到操作系统(猜想是 BIOS 不识别 MSDOS7.10 的DOS引导扇区),再提示选择引导设备,然后在三次回车确定后,系统挂起不再有任何反应。
而在虚拟机的 Win98 硬盘环境实模式命令行下,虽然仍然有未找到操作系统的提示,却仍会正常的重引导。
于是我搜索了一些关于 INT19 的资料,最后确定单纯使用 INT19 无法完成目前的需要。
生成 reboot.com 的批处理脚本
@echo off
if exist %0.bat set _me=%0.bat
if exist %0 set _me=%0
if not "%_me%"=="" debug < %_me% > nul
set _me=
goto end
a
int19
ret
n reboot.com
r cx
3
w
q
:end
Reboot and Select proper Boot device
Reboot and Select proper Boot device
or Insert Boot Media in selected Boot device
OS not found
OS not found
Install an OS on this hard drive
INT 19 - SYSTEM - BOOTSTRAP LOADER
INT 19 - SYSTEM - BOOTSTRAP LOADER
Desc: This interrupt reboots the system without clearing memory or restoring
interrupt vectors. Because interrupt vectors are preserved, this
interrupt usually causes a system hang if any TSRs have hooked
vectors from 00h through 1Ch, particularly INT 08.
Notes: Usually, the BIOS will try to read sector 1, head 0, track 0 from drive
A: to 0000h:7C00h. If this fails, and a hard disk is installed, the
BIOS will read sector 1, head 0, track 0 of the first hard disk.
This sector should contain a master bootstrap loader and a partition
table (see #00650). After loading the master boot sector at
0000h:7C00h, the master bootstrap loader is given control
(see #00653). It will scan the partition table for an active
partition, and will then load the operating system's bootstrap
loader (contained in the first sector of the active partition) and
give it control.
true IBM PCs and most clones issue an INT 18 if neither floppy nor hard
disk have a valid boot sector
to accomplish a warm boot equivalent to Ctrl-Alt-Del, store 1234h in
0040h:0072h and jump to FFFFh:0000h. For a cold boot equivalent to
a reset, store 0000h at 0040h:0072h before jumping.
VDISK.SYS hooks this interrupt to allow applications to find out how
much extended memory has been used by VDISKs (see #00649). DOS 3.3+
PRINT hooks INT 19 but does not set up a correct VDISK header block
at the beginning of its INT 19 handler segment, thus causing some
programs to overwrite extended memory which is already in use.
the default handler is at F000h:E6F2h for 100% compatible BIOSes
MS-DOS 3.2+ hangs on booting (even from floppy) if the hard disk
contains extended partitions which point at each other in a loop,
since it will never find the end of the linked list of extended
partitions
under Windows Real and Enhanced modes, calling INT 19 will hang the
system in the same was as under bare DOS; under Windows Standard
mode, INT 19 will successfully perform a cold reboot as it appears
to have been redirected to a MOV AL,0FEh/OUT 64h,AL sequence
BUG: when loading the remainder of the DOS system files fails, various
versions of IBMBIO.COM/IO.SYS incorrectly restore INT 1E before
calling INT 19, assuming that the boot sector had stored the
contents of INT 1E at DS:SI instead of on the stack as it actually
does
To All:
The technical core of realizing the expansion of the boot configuration menu through secondary booting lies in how to achieve the second booting process. The first thing I thought of was the existing boot loading interrupt INT19 provided by BIOS, which is the simplest and most direct method. A two-byte program can be implemented by writing in DEBUG. For friends who are not familiar with DEBUG, create the following script as a batch file and then click to run to get the reboot.com reboot program.
It should be noted that the operation of reboot.com must be in the real mode environment, and so far, I haven't heard of an independent software that can reboot the system in protected mode. Therefore, it doesn't work for Windows, and in DOS, it usually requires that EMM386.EXE and any TSR programs are not loaded.
I quickly completed the test. In the MSDOS6.22 hard disk environment of the virtual machine, its work performance is still relatively good. It successfully realized the non-restart boot method; only before rebooting, it will first detect the floppy drive. If there is a bootable floppy disk in it, it will immediately boot from the floppy disk; if not, a prompt to select the boot device will appear, and it will boot from the hard disk after waiting for a carriage return confirmation. As for the boot priority setting in BIOS, it is completely ignored.
But in the MSDOS7.10 hard disk environment of the virtual machine, a more serious problem occurred: after rebooting, there is still the problem of first searching for the floppy drive; not only that, if no bootable floppy disk is found, it will first prompt that the operating system is not found (it is guessed that BIOS does not recognize the DOS boot sector of MSDOS7.10), then prompt to select the boot device, and then after confirming three times by carriage return, the system hangs and has no response anymore.
And in the real mode command line of the Win98 hard disk environment of the virtual machine, although there is still a prompt that the operating system is not found, it will still reboot normally.
So I searched some information about INT19 , and finally determined that simply using INT19 cannot meet the current needs.
Batch script to generate reboot.com
@echo off
if exist %0.bat set _me=%0.bat
if exist %0 set _me=%0
if not "%_me%"=="" debug < %_me% > nul
set _me=
goto end
a
int19
ret
n reboot.com
r cx
3
w
q
:end
Reboot and Select proper Boot device
Reboot and Select proper Boot device
or Insert Boot Media in selected Boot device
OS not found
OS not found
Install an OS on this hard drive
INT 19 - SYSTEM - BOOTSTRAP LOADER
INT 19 - SYSTEM - BOOTSTRAP LOADER
Desc: This interrupt reboots the system without clearing memory or restoring
interrupt vectors. Because interrupt vectors are preserved, this
interrupt usually causes a system hang if any TSRs have hooked
vectors from 00h through 1Ch, particularly INT 08.
Notes: Usually, the BIOS will try to read sector 1, head 0, track 0 from drive
A: to 0000h:7C00h. If this fails, and a hard disk is installed, the
BIOS will read sector 1, head 0, track 0 of the first hard disk.
This sector should contain a master bootstrap loader and a partition
table (see #00650). After loading the master boot sector at
0000h:7C00h, the master bootstrap loader is given control
(see #00653). It will scan the partition table for an active
partition, and will then load the operating system's bootstrap
loader (contained in the first sector of the active partition) and
give it control.
true IBM PCs and most clones issue an INT 18 if neither floppy nor hard
disk have a valid boot sector
to accomplish a warm boot equivalent to Ctrl-Alt-Del, store 1234h in
0040h:0072h and jump to FFFFh:0000h. For a cold boot equivalent to
a reset, store 0000h at 0040h:0072h before jumping.
VDISK.SYS hooks this interrupt to allow applications to find out how
much extended memory has been used by VDISKs (see #00649). DOS 3.3+
PRINT hooks INT 19 but does not set up a correct VDISK header block
at the beginning of its INT 19 handler segment, thus causing some
programs to overwrite extended memory which is already in use.
the default handler is at F000h:E6F2h for 100% compatible BIOSes
MS-DOS 3.2+ hangs on booting (even from floppy) if the hard disk
contains extended partitions which point at each other in a loop,
since it will never find the end of the linked list of extended
partitions
under Windows Real and Enhanced modes, calling INT 19 will hang the
system in the same was as under bare DOS; under Windows Standard
mode, INT 19 will successfully perform a cold reboot as it appears
to have been redirected to a MOV AL,0FEh/OUT 64h,AL sequence
BUG: when loading the remainder of the DOS system files fails, various
versions of IBMBIO.COM/IO.SYS incorrectly restore INT 1E before
calling INT 19, assuming that the boot sector had stored the
contents of INT 1E at DS:SI instead of on the stack as it actually
does
|

※ Batchinger 致 Bat Fans:请访问 批处理编程的异类 ,欢迎交流与共享批处理编程心得! |
|
2006-1-10 13:56 |
|
|
DOSforever
金牌会员
     
积分 4639
发帖 2239
注册 2005-1-30
状态 离线
|
|
2006-1-11 12:39 |
|
|
willsort
元老会员
         Batchinger
积分 4432
发帖 1512
注册 2002-10-18
状态 离线
|
『第 8 楼』:
使用 LLM 解释/回答一下
Re DOSforever:
需求性问题我在主题贴曾有提及,现说明我的主题缘起的初衷。
我在制作 Wengier 超级启动盘 的中文启动菜单时,发现各种各样的菜单扩展程序都不完全满足我的理想要求,而且设计风格上也过于呆板,所以想自己做出改进;但是我只是比较擅长批处理,用 wbat 等其他工具写个菜单界面倒是可以,真要追踪 DOS 的启动过程并设计插入自己的代码未免有些强人所难,所以才想到设计一个可以方便的插入各种扩展菜单插件的“插槽”已满足我的需要。
相信有不少想自己设计启动菜单功能和定制独特风格界面的朋友,擅长C、Basic或其他DOS编程语言和工具中的一种或几种,而对汇编语言以及DOS的启动过程可能并不太熟悉,为启动菜单而专门学习这些内容,似乎有些买珠求椟的奢侈。
另外,现在有两个思路实现重引导:
1、Win9x 系统有“退出到DOS”的功能,这可能是在保护模式下实现重引导的唯一实例,只是它在很多情况下它完成的是重启动而非重引导,而且 Win9x 系统的代码跟踪过于困难。
2、在实模式下,将 reboot 所在盘的引导扇区代码载入内存中,然后用类似GRUB 的方式,绕过 INT19 中断直接调用 BIOS 的启动代码;这种方法存在中断向量表如何恢复,引导介质如何确定等多个问题,这方面我是个门外汉,很多东西都在摸索之中,正在研读 grub for dos 的 dosstart.S ,因为没有汇编基础,很吃力。
在此,特向 Grub for DOS 的作者 不点 兄请教:根据我以上的描述,请问是否可以设计一个特化的 grub for dos?在DOS命令行或批处理环境中运行,可以完成直接从上一次的引导设备再次引导,而无需菜单选择,考虑到启动盘的需要,程序体积应该尽可能的小。如果此想法不太现实,那么是否可利用现有的 grub for dos 完成以上的功能?
同时,向文本模式下汉字显示工具 VTMagic的作者 本是 兄请教:扩展ASCII字符和基本ASCII字符的字模是否在ROM/RAM中存放地址不同?内存中的字模信息是否会在文本模式初始化时被恢复?它是否可以通过某种方式实现重引导后不会被恢复?
Last edited by willsort on 2006-1-11 at 16:58 ]
Re: DOSforever:
The demand-related issues I mentioned in the main thread. Now, I explain the original intention of my main thread.
When I was making the Chinese boot menu for the Wengier Super Boot Disk, I found that various menu extension programs didn't fully meet my ideal requirements, and the design style was too rigid. So I wanted to improve it myself; but I'm only good at batch processing. Writing a menu interface with wbat and other tools is okay, but it's really difficult to track the DOS boot process and insert my own code. That's why I thought of designing a "slot" that can easily insert various extended menu plugins to meet my needs.
I believe there are many friends who want to design their own boot menu functions and customize unique style interfaces, who are proficient in one or several of C, Basic or other DOS programming languages and tools, but may not be very familiar with assembly language and the DOS boot process. It seems a bit extravagant to specifically learn these contents for the boot menu.
In addition, there are two ideas for achieving reboot:
1. The Win9x system has the "Exit to DOS" function. This may be the only example of achieving reboot in protected mode. However, in many cases, it completes a restart rather than a reboot, and the code tracking of the Win9x system is too difficult.
2. In real mode, load the boot sector code of the disk where reboot is located into memory, and then use a method similar to GRUB to directly call the BIOS boot code bypassing the INT19 interrupt; this method has multiple problems such as how to restore the interrupt vector table and how to determine the boot medium. I'm a layman in this aspect, a lot of things are still in the exploration stage. I'm currently studying dosstart.S of GRUB for DOS, but it's very difficult because I have no assembly foundation.
Here, I specially ask Brother Budian, the author of GRUB for DOS: According to my description above, can a specialized GRUB for DOS be designed? It can run in the DOS command line or batch processing environment, can complete booting again from the last boot device directly without menu selection. Considering the needs of the boot disk, the program volume should be as small as possible. If this idea is not very practical, then can the existing GRUB for DOS be used to complete the above functions?
At the same time, I ask Brother Ben Shi, the author of the text mode Chinese character display tool VTMagic: Are the font patterns of extended ASCII characters and basic ASCII characters stored at different addresses in ROM/RAM? Will the font pattern information in memory be restored when the text mode is initialized? Can it be implemented in a way that it won't be restored after reboot?
Last edited by willsort on 2006-1-11 at 16:58 ]
|

※ Batchinger 致 Bat Fans:请访问 批处理编程的异类 ,欢迎交流与共享批处理编程心得! |
|
2006-1-11 16:08 |
|
|
DOSforever
金牌会员
     
积分 4639
发帖 2239
注册 2005-1-30
状态 离线
|
|
2006-1-11 16:27 |
|
|
willsort
元老会员
         Batchinger
积分 4432
发帖 1512
注册 2002-10-18
状态 离线
|
|
2006-1-11 16:43 |
|
|
DOSforever
金牌会员
     
积分 4639
发帖 2239
注册 2005-1-30
状态 离线
|
『第 11 楼』:
使用 LLM 解释/回答一下
多谢“笑天”不辞辛劳的把帖子找出来。由于内容太多,太长,我没有每一行都仔细的看,大致看了一下。我的理解是大家无非要在配置菜单中实现多重选择功能。我看了下 BOOT.SYS 1.42版为 MS-DOS 提供启动菜单选择系统配置的功能,并和 MS-DOS 自带的多重配置选择功能进行比较:
√ * 支持单层菜单,连续菜单,多层嵌套菜单 (不清楚什么叫连续菜单)
√ * 每个菜单最多可有9个菜单项(每个1行),上面可定制提示区 (和MS-DOS提供的相同)
* 共可拥有25个连续菜单,各有不同系统配置
√ * 子菜单共可嵌套25层 (没试过 MS-DOS 最多允许嵌套几层)
√ * 菜单选择可通过输入数字键或用箭头移动 (同 MS-DOS )
√ * 每个菜单可定制倒计时间和默认选项 (同 MS-DOS )
√ * 完全支持MS/PC-DOS 5.00起的 DOS= 和其它新命令 (不用说了)
* 支持LCD笔记本切换到外接监视器 (这个应该是笔记本本身要有这个功能才行吧,和软件没什么关系吧)
* 支持启动时现场编辑 CONFIG.SYS 行内容 (这个好象任何DOS都没有这个功能)
* 驻留占用DOS内存不到200字节(DOS 6.0及以上中不占内存!) (不用说了,不占任何内存)
打勾的地方即是 MS-DOS 也同样支持的功能,其它的一些功能,如超时自动选择某一项和菜单颜色选择都是支持的。我看唯一的 MS-DOS 多重配置的不足就是不能显示中文,但这一点我看无关紧要,并不是说本人的英文怎么好,而是一般而言计算机英语都是一些很简单的,没必要汉化。除非要作为一个实用软件提供给初学者使用。还有一点就是不支持复选(可能连续菜单指的就是这个),但是通过多重配置同样也可以实现这个功能,只不过烦琐了点。下面的 CONFIG.SYS 内容是我很多年以前在基于 MS-DOS 6.22 的基础上制作的启动盘,其中的显示的“中文”其实是西文制表符。该 CONFIG.SYS 启动后主要可以实现以下选择:
1、选择什么作为内存管理程序
2、选择什么作为命令解释器
3、选择内存使用的方式,即XMS,EMS
4、如果是选择 QEMM386 作为内存管理器还可以选择是否使用普通的UMB使用方式还是使用特有的 Stealth 方式
5、如果是使用特有的 Stealth 方式,再选择 Stealth 的方式是 MAP 方式还是 FRAME 方式
在进入每一个子菜单后都可以有菜单选择返回上一级菜单。其实 MS-DOS 也提供了一键返回功能,之不过要返回的话是一下子返回到根菜单。只要这样改动一下就可以实现逐级返回。
现在看起来这个启动盘很“土”,不支持很多新的功能,如USB,长文件名,NTFS的支持。我也一直想做一个新的启动盘,但一直没找到满意的“材料”,而且还在比较各个“材料”的优缺点。我把这个 CONFIG.SYS 的内容发出来只是想供大家评论一下,起抛砖引玉的作用。另外就是讨论一下是否有必要使用另外的软件来实现DOS启动菜单的扩展。(除了特殊情况外要用到启动时现场编辑 CONFIG.SYS 行内容)
SUBMENU=QUARTERDECK,Memory Managed by Quarterdeck QEMM386.SYS Version 8.0
SUBMENU=MICROSOFT,Memory Managed by Microsoft HIMEM.SYS V3.10 + EMM386.EXE V4.49
MENUDEFAULT=QUARTERDECK,5
MENUCOLOR=3,0
REM ============================================================================
SUBMENU=QEMM-NDOS,NDOS.COM command interpreter Version 8.0
SUBMENU=QEMM-COMMAND,COMMAND.COM command interpreter Version 6.22
SUBMENU=MENU,Return to main MENU
MENUDEFAULT=QEMM-NDOS,5
MENUCOLOR=0,2
SUBMENU=Q-X&E-N,XMS & EMS
MENUITEM=Q-X-N,XMS Only (No EMS)
SUBMENU=QUARTERDECK,Return to upper menu
MENUDEFAULT=Q-X&E-N,5
MENUCOLOR=15,2
SUBMENU=Q-X&E-C,XMS & EMS
MENUITEM=Q-X-C,XMS Only (No EMS)
SUBMENU=QUARTERDECK,Return to upper menu
MENUCOLOR=14,2
MENUITEM=QnEMS&N,Normal EMS
SUBMENU=ST&N,StealthROM
SUBMENU=QEMM-NDOS,Return to upper menu
MENUITEM=STM&N,StealthROM Mapping Method
MENUITEM=STF&N,StealthROM Frame Method
SUBMENU=Q-X&E-N,Return to upper menu
MENUITEM=QnEMS&C,Normal EMS
SUBMENU=ST&C,StealthROM
SUBMENU=QEMM-COMMAND,Return to upper menu
MENUITEM=STM&C,StealthROM Mapping Method
MENUITEM=STF&C,StealthROM Frame Method
SUBMENU=Q-X&E-C,Return to upper menu
INCLUDE=Q_XMS&EMS
INCLUDE=QEMM_COMMON
INCLUDE=NDOS
INCLUDE=STEALTH_M
INCLUDE=QEMM_COMMON
INCLUDE=NDOS
INCLUDE=STEALTH_F
INCLUDE=QEMM_COMMON
INCLUDE=NDOS
INCLUDE=Q_XMS
INCLUDE=QEMM_COMMON
INCLUDE=NDOS
INCLUDE=Q_XMS&EMS
INCLUDE=QEMM_COMMON
INCLUDE=COMMAND
INCLUDE=STEALTH_M
INCLUDE=QEMM_COMMON
INCLUDE=COMMAND
INCLUDE=STEALTH_F
INCLUDE=QEMM_COMMON
INCLUDE=COMMAND
INCLUDE=Q_XMS
INCLUDE=QEMM_COMMON
INCLUDE=COMMAND
REM ============================================================================
SUBMENU=HIMEMM-NDOS,NDOS.COM command interpreter Version 8.0
SUBMENU=HIMEMM-COMMAND,COMMAND.COM command interpreter Version 6.22
SUBMENU=MENU,Return to main MENU
MENUCOLOR=10,1
MENUITEM=MS-X&E-N,XMS & EMS
MENUITEM=MS-X-N,XMS Only (No EMS)
SUBMENU=MICROSOFT,Return to upper menu
MENUCOLOR=15,1
MENUITEM=MS-X&E-C,XMS & EMS
MENUITEM=MS-X-C,XMS Only (No EMS)
SUBMENU=MICROSOFT,Return to upper menu
MENUCOLOR=14,1
INCLUDE=HIMEMM-X&E
INCLUDE=NDOS
INCLUDE=HIMEMM-X
INCLUDE=NDOS
INCLUDE=HIMEMM-X&E
INCLUDE=COMMAND
INCLUDE=HIMEMM-X
INCLUDE=COMMAND
REM ============================================================================
REM 赏屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯突
REM ? The following paragraph is configuration modules ?
REM 韧屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯图
DEVICE=A:\QEMM\DOS-UP.SYS REPORT
DEVICEHIGH=A:\QEMM\QDPMI.SYS VMOFF
Rem 谀哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪目
Rem ?The following section is QEMM module ?
Rem 滥哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪馁
Rem The first line is utility parameters of QEMM386.SYS device driver
;DEVICE=A:\QEMM\QEMM386.SYS BK RAM NW3 ST:M|F BE:N BF:N SORT DBF=2 EMS:N SUS=N FILL:N XBDA:H USEXMS:N
DEVICE=A:\QEMM\DOSDATA.SYS REPORT
DEVICE=A:\QEMM\QEMM386.SYS RAM BF:N BTO:30
DEVICE=A:\QEMM\DOSDATA.SYS REPORT
DEVICE=A:\QEMM\QEMM386.SYS RAM ST:M BF:N BTO:30
DEVICE=A:\QEMM\DOSDATA.SYS REPORT
DEVICE=A:\QEMM\QEMM386.SYS RAM ST:F BF:N BTO:30
DEVICE=A:\QEMM\DOSDATA.SYS REPORT
DEVICE=A:\QEMM\QEMM386.SYS RAM BF:N BTO:30 EMS:N
Rem 谀哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪目
Rem ?The following section is HIEMM+EMM386 module ?
Rem 滥哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪馁
DEVICE=A:\DOS\HIMEM.SYS /V
DEVICE=A:\DOS\EMM386.EXE RAM M3 HIGHSCAN I=B000-B7FF /V
DEVICE=A:\DOS\HIMEM.SYS /V
DEVICE=A:\DOS\EMM386.EXE NOEMS HIGHSCAN I=B000-B7FF /V
DEVICEHIGH/L:1=A:\DOS\TRICDVD.SYS /D<img src="images/smilies/face-smile-big.png" align="absmiddle" border="0">ISC0000
DEVICEHIGH/L:1=A:\DOS\ANSI.SYS/X/R
DEVICEHIGH?=A:\DOS\RAMDRIVE.SYS 1536 /E
DEVICEHIGH?=A:\DOS\RAMDRIVE.SYS 1536 /A
DEVICEHIGH?=A:\DOS\RAMDRIVE.SYS 4096 /E
DEVICEHIGH?=A:\DOS\RAMDRIVE.SYS 4096 /A
DEVICEHIGH?=A:\DOS\RAMDRIVE.SYS 16384 /E
DEVICEHIGH?=A:\DOS\RAMDRIVE.SYS 16384 /A
DEVICEHIGH?=A:\DOS\RAMDRIVE.SYS 32767 /E
DEVICEHIGH?=A:\DOS\RAMDRIVE.SYS 32767 /A
BUFFERS=45,0
FILES=20
DOS=UMB
LASTDRIVE=Z
FCBS=1,1
DOS=HIGH
;STACKS?=0,0
STACKS=9,256
SWITCHES=/F
NUMLOCK=ON
DRIVPARM?=/D:0/S:18/T:82
SHELL = A:\COMMAND.COM/P/E:512/MSG
REM
REM The following section was added by Norton Utilities Install
REM
SHELL = A:\NDOS.COM @A:\NDOS.INI /P
Thanks to "Xiaotian" for going to the trouble of finding the post. Since there is too much and too long content, I didn't read every line carefully, but just took a general look. My understanding is that everyone just wants to implement multi - choice functions in the configuration menu. I looked at version 1.42 of BOOT.SYS, which provides the function of starting menu to select system configuration for MS - DOS, and compared it with the multi - configuration selection function built into MS - DOS:
√ * Supports single - layer menu, continuous menu, multi - layer nested menu (not clear what a continuous menu is)
√ * Up to 9 menu items per menu (each in one line), and a prompt area can be customized above (the same as provided by MS - DOS)
* Can have 25 continuous menus in total, each with different system configurations
√ * Sub - menus can be nested up to 25 layers (not tried how many layers MS - DOS allows at most)
√ * Menu selection can be done by entering the number key or moving with the arrow (the same as MS - DOS)
√ * Each menu can customize the countdown time and default option (the same as MS - DOS)
√ * Fully supports DOS = and other new commands starting from MS/PC - DOS 5.00 (needless to say)
* Supports switching from LCD notebook to external monitor (this should depend on the notebook itself having this function, not related to software)
* Supports editing the content of CONFIG.SYS lines on - site during startup (this seems to be a function that no DOS has)
* Resident occupies less than 200 bytes of DOS memory (does not occupy memory in DOS 6.0 and above! ) (needless to say, does not occupy any memory)
The ticked places are functions also supported by MS - DOS. Other functions, such as automatic selection of a certain item after timeout and menu color selection, are all supported. The only shortcoming of MS - DOS multi - configuration that I see is that it cannot display Chinese, but this is not important. It's not that my English is good, but generally computer English is very simple, and there is no need to localize it. Unless it is to provide it as a practical software for beginners. Another point is that it does not support checkboxes (probably the continuous menu refers to this), but the same function can be realized through multi - configuration, although it is more cumbersome. The following content of CONFIG.SYS is a boot disk I made many years ago based on MS - DOS 6.22. The "Chinese" displayed in it is actually Western tab characters. After this CONFIG.SYS is started, it can mainly realize the following selections:
1. Select what to use as the memory management program
2. Select what to use as the command interpreter
3. Select the way of memory use, namely XMS, EMS
4. If QEMM386 is selected as the memory manager, you can also select whether to use the ordinary UMB use method or the unique Stealth method
5. If the unique Stealth method is used, then select whether the Stealth method is MAP method or FRAME method
After entering each sub - menu, you can have a menu to return to the upper level menu. In fact, MS - DOS also provides a one - key return function, but to return, you will return directly to the root menu. Just make such a change to realize returning level by level.
Now it seems that this boot disk is very "old - fashioned" and does not support many new functions, such as USB, long file names, and NTFS support. I have always wanted to make a new boot disk, but I haven't found satisfactory "materials" yet, and I'm still comparing the advantages and disadvantages of various "materials". I send out the content of this CONFIG.SYS just to for everyone to comment on, playing a role in drawing out what is valuable. Also, discuss whether it is necessary to use other software to expand the DOS boot menu. (Except for special cases where the function of editing the content of CONFIG.SYS lines on - site during startup is needed)
SUBMENU=QUARTERDECK,Memory Managed by Quarterdeck QEMM386.SYS Version 8.0
SUBMENU=MICROSOFT,Memory Managed by Microsoft HIMEM.SYS V3.10 + EMM386.EXE V4.49
MENUDEFAULT=QUARTERDECK,5
MENUCOLOR=3,0
REM ============================================================================
SUBMENU=QEMM-NDOS,NDOS.COM command interpreter Version 8.0
SUBMENU=QEMM-COMMAND,COMMAND.COM command interpreter Version 6.22
SUBMENU=MENU,Return to main MENU
MENUDEFAULT=QEMM-NDOS,5
MENUCOLOR=0,2
SUBMENU=Q-X&E-N,XMS & EMS
MENUITEM=Q-X-N,XMS Only (No EMS)
SUBMENU=QUARTERDECK,Return to upper menu
MENUDEFAULT=Q-X&E-N,5
MENUCOLOR=15,2
SUBMENU=Q-X&E-C,XMS & EMS
MENUITEM=Q-X-C,XMS Only (No EMS)
SUBMENU=QUARTERDECK,Return to upper menu
MENUCOLOR=14,2
MENUITEM=QnEMS&N,Normal EMS
SUBMENU=ST&N,StealthROM
SUBMENU=QEMM-NDOS,Return to upper menu
MENUITEM=STM&N,StealthROM Mapping Method
MENUITEM=STF&N,StealthROM Frame Method
SUBMENU=Q-X&E-N,Return to upper menu
MENUITEM=QnEMS&C,Normal EMS
SUBMENU=ST&C,StealthROM
SUBMENU=QEMM-COMMAND,Return to upper menu
MENUITEM=STM&C,StealthROM Mapping Method
MENUITEM=STF&C,StealthROM Frame Method
SUBMENU=Q-X&E-C,Return to upper menu
INCLUDE=Q_XMS&EMS
INCLUDE=QEMM_COMMON
INCLUDE=NDOS
INCLUDE=STEALTH_M
INCLUDE=QEMM_COMMON
INCLUDE=NDOS
INCLUDE=STEALTH_F
INCLUDE=QEMM_COMMON
INCLUDE=NDOS
INCLUDE=Q_XMS
INCLUDE=QEMM_COMMON
INCLUDE=NDOS
INCLUDE=Q_XMS&EMS
INCLUDE=QEMM_COMMON
INCLUDE=COMMAND
INCLUDE=STEALTH_M
INCLUDE=QEMM_COMMON
INCLUDE=COMMAND
INCLUDE=STEALTH_F
INCLUDE=QEMM_COMMON
INCLUDE=COMMAND
INCLUDE=Q_XMS
INCLUDE=QEMM_COMMON
INCLUDE=COMMAND
REM ============================================================================
SUBMENU=HIMEMM-NDOS,NDOS.COM command interpreter Version 8.0
SUBMENU=HIMEMM-COMMAND,COMMAND.COM command interpreter Version 6.22
SUBMENU=MENU,Return to main MENU
MENUCOLOR=10,1
MENUITEM=MS-X&E-N,XMS & EMS
MENUITEM=MS-X-N,XMS Only (No EMS)
SUBMENU=MICROSOFT,Return to upper menu
MENUCOLOR=15,1
MENUITEM=MS-X&E-C,XMS & EMS
MENUITEM=MS-X-C,XMS Only (No EMS)
SUBMENU=MICROSOFT,Return to upper menu
MENUCOLOR=14,1
INCLUDE=HIMEMM-X&E
INCLUDE=NDOS
INCLUDE=HIMEMM-X
INCLUDE=NDOS
INCLUDE=HIMEMM-X&E
INCLUDE=COMMAND
INCLUDE=HIMEMM-X
INCLUDE=COMMAND
REM ============================================================================
REM 赏屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯突
REM ? The following paragraph is configuration modules ?
REM 韧屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯图
DEVICE=A:\QEMM\DOS-UP.SYS REPORT
DEVICEHIGH=A:\QEMM\QDPMI.SYS VMOFF
Rem 谀哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪目
Rem ?The following section is QEMM module ?
Rem 滥哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪馁
Rem The first line is utility parameters of QEMM386.SYS device driver
;DEVICE=A:\QEMM\QEMM386.SYS BK RAM NW3 ST:M|F BE:N BF:N SORT DBF=2 EMS:N SUS=N FILL:N XBDA:H USEXMS:N
DEVICE=A:\QEMM\DOSDATA.SYS REPORT
DEVICE=A:\QEMM\QEMM386.SYS RAM BF:N BTO:30
DEVICE=A:\QEMM\DOSDATA.SYS REPORT
DEVICE=A:\QEMM\QEMM386.SYS RAM ST:M BF:N BTO:30
DEVICE=A:\QEMM\DOSDATA.SYS REPORT
DEVICE=A:\QEMM\QEMM386.SYS RAM ST:F BF:N BTO:30
DEVICE=A:\QEMM\DOSDATA.SYS REPORT
DEVICE=A:\QEMM\QEMM386.SYS RAM BF:N BTO:30 EMS:N
Rem 谀哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪目
Rem ?The following section is HIEMM+EMM386 module ?
Rem 滥哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪馁
DEVICE=A:\DOS\HIMEM.SYS /V
DEVICE=A:\DOS\EMM386.EXE RAM M3 HIGHSCAN I=B000-B7FF /V
DEVICE=A:\DOS\HIMEM.SYS /V
DEVICE=A:\DOS\EMM386.EXE NOEMS HIGHSCAN I=B000-B7FF /V
DEVICEHIGH/L:1=A:\DOS\TRICDVD.SYS /D:DISC0000
DEVICEHIGH/L:1=A:\DOS\ANSI.SYS/X/R
DEVICEHIGH?=A:\DOS\RAMDRIVE.SYS 1536 /E
DEVICEHIGH?=A:\DOS\RAMDRIVE.SYS 1536 /A
DEVICEHIGH?=A:\DOS\RAMDRIVE.SYS 4096 /E
DEVICEHIGH?=A:\DOS\RAMDRIVE.SYS 4096 /A
DEVICEHIGH?=A:\DOS\RAMDRIVE.SYS 16384 /E
DEVICEHIGH?=A:\DOS\RAMDRIVE.SYS 16384 /A
DEVICEHIGH?=A:\DOS\RAMDRIVE.SYS 32767 /E
DEVICEHIGH?=A:\DOS\RAMDRIVE.SYS 32767 /A
BUFFERS=45,0
FILES=20
DOS=UMB
LASTDRIVE=Z
FCBS=1,1
DOS=HIGH
;STACKS?=0,0
STACKS=9,256
SWITCHES=/F
NUMLOCK=ON
DRIVPARM?=/D:0/S:18/T:82
SHELL = A:\COMMAND.COM/P/E:512/MSG
REM
REM The following section was added by Norton Utilities Install
REM
SHELL = A:\NDOS.COM @A:\NDOS.INI /P
|

DOS倒下了,但永远不死
DOS NEVER DIES !
投票调查:
http://www.cn-dos.net/forum/viewthread.php?tid=46187
本人尚未解决的疑难问题:
http://www.cn-dos.net/forum/viewthread.php?tid=15135
http://www.cn-dos.net/forum/viewthread.php?tid=47663
http://www.cn-dos.net/forum/viewthread.php?tid=48747 |
|
2006-1-11 18:16 |
|
|
willsort
元老会员
         Batchinger
积分 4432
发帖 1512
注册 2002-10-18
状态 离线
|
『第 12 楼』:
使用 LLM 解释/回答一下
Re DOSforever:
很早看了你的回复,但是因为个人原因同时对此主题没有进一步的收获,故没有及时回复,请谅解,
DOS 层的启动配置菜单实现应该可以有多种选择,最常用Config/Autoexec满足了大多数用户的一般使用需求,Bootcon / boot.sys 等满足少数用户可以预先加载驱动或配置程序及一些其它的需求。然而,正如你发现的,这并不是所有的需求。我在这里着重提出四点二者无法实现的例证,也包括你曾经提到过的。
1、自定义菜单风格
菜单风格有很多,但是我们所能选择的,却只有背景色/前景色,菜单标题,菜单项提示等少数几个项目,诸如菜单背景图,菜单项布局,菜单的多样化动态提示,菜单的下拉列表等各种各样的风格,对于许多设计开发者来说可能是切实的需要。
2、菜单项的复选
boot.sys 的连续菜单实际上只是一种近似意义上的复选,为了选择多个设备驱动,需要回答多个驱动加载的是否选择,这是低效且机械的设计。至于c/a的通过枚举所有可能的设备驱动组合来选择加载也只适用于驱动较少,如果可供选择设备有三个,那么枚举出的菜单选择项将会有8个排列组合,如果设备更多将只有分级选择,仍然治标不治本。对于你的config中ramdrive的加载选择的方式,我也持有同样的异议。
3、菜单项的动态编辑
boot.sys 的动态编辑只能实现单行指定语句参数的编辑,而无法实现语句命令的编辑,而至于我所需要的类似Grub那样的菜单项内容的整体编辑以及菜单项本身的编辑(增减、更改顺序、菜单提示、默认选择等),就更无从谈起了。
4、中文及多语言的自由切换
要想实现启动菜单的国际化,并非简单使用汉语或英语一种语言,而是通过多语言包实现菜单语言的兼容显示和动态切换,这在很多地方都已经有类似的实现。
以上所说的这些,在 config.sys 中实现的难度将会很大,所以我才产生将之转移到autoexec 中通过批处理调用外部程序实现的思路。
另外,因为一直无法联系到 不点 兄,所以重引导的实现暂时搁浅,希望兄与大家一同献计献策,以完成这个主题。
Re DOSforever:
I saw your reply a long time ago, but due to personal reasons and not further gaining something on this topic, I didn't reply in time. Please understand.
The implementation of the startup configuration menu at the DOS layer should have multiple options. The most commonly used Config/Autoexec meets the general usage needs of most users. Bootcon / boot.sys, etc., meet the needs of a few users to preload drivers or configuration programs and some other needs in advance. However, as you found, this is not all the needs. I focus on putting forward four examples where the two cannot be realized here, including the ones you mentioned before.
1. Custom menu style
There are many menu styles, but the ones we can choose are only a few items such as background color/foreground color, menu title, menu item prompt, etc. Various styles such as menu background image, menu item layout, diversified dynamic prompt of the menu, drop-down list of the menu, etc., may be practical needs for many design developers.
2. Checkbox of menu items
The continuous menu of boot.sys is actually only an approximate check. In order to select multiple device drivers, it is necessary to answer whether multiple driver loads are selected, which is an inefficient and mechanical design. As for the way of c/a selecting loading by enumerating all possible device driver combinations, it is only applicable when there are few drivers. If there are three devices available for selection, then there will be 8 permutations and combinations in the enumerated menu options. If there are more devices, there will only be hierarchical selection, still not solving the fundamental problem. I also have the same objection to the way of loading selection of ramdrive in your config.
3. Dynamic editing of menu items
The dynamic editing of boot.sys can only realize the editing of single-line specified statement parameters, but cannot realize the editing of statement commands. As for the overall editing of menu item content similar to Grub and the editing of the menu items themselves (addition, reduction, change of order, menu prompt, default selection, etc.) that I need, it is even out of the question.
4. Free switching of Chinese and multi-languages
To realize the internationalization of the startup menu, it is not simply using one language such as Chinese or English, but realizing the compatible display and dynamic switching of menu languages through multi-language packs. This has been implemented in many places.
The above-mentioned things will be very difficult to implement in config.sys, so I have the idea of transferring it to autoexec and calling external programs through batch processing.
In addition, because I have been unable to contact Brother Budian, the implementation of reboot is temporarily stalled. I hope you and everyone can offer suggestions together to complete this topic.
|

※ Batchinger 致 Bat Fans:请访问 批处理编程的异类 ,欢迎交流与共享批处理编程心得! |
|
2006-1-16 01:35 |
|
|
zhgwbzhd
高级用户
   
积分 506
发帖 187
注册 2005-12-4
状态 离线
|
|
2006-1-18 16:53 |
|
|
lizhenduo
初级用户
 
积分 190
发帖 29
注册 2003-6-24
状态 离线
|
『第 14 楼』:
使用 LLM 解释/回答一下
willsort:
你的二次引导实现DOS启动菜单扩展的思路太好了,正是我需要的,希望尽快实现,并能使我们这些初学者容易实现扩展.
在纯DOS层下,我想加载一个大于5M的.img,使其再次引导.请帮忙.
谢谢了
willsort:
Your idea of using a secondary boot to implement DOS boot menu extension is great. It's exactly what I need. I hope it can be implemented as soon as possible and be easy for beginners like me to extend.
Under the pure DOS layer, I want to load an.img larger than 5M and let it boot again. Please help.
Thanks
|
|
2006-1-24 15:24 |
|
|
luobing
新手上路

积分 2
发帖 1
注册 2006-2-8 来自 nanjing
状态 离线
|
『第 15 楼』:
使用 LLM 解释/回答一下
我想,为什么要这么麻烦。自己改软盘或硬盘的主引导扇区,不就行了
I think, why is it so troublesome. Just modify the master boot sector of the floppy disk or hard disk, isn't it okay
|
|
2006-2-8 11:10 |
|
|