|
如何实现run a.bin 中的跳转功能
[这个贴子最后由dsyang在 2004/10/15 11:27am 第 2 次编辑]
用Ultraedit打开X.bin,用ASCII方式替换
2000的启动编辑菜单如下
编写启动菜单配置文件bscript\bscript.ini
start:
clear
print c "\n\n\c17===================================================\n"
print c "\c17 \c1fWindows 2000 Setup\c17 \n"
print c "\c17---------------------------------------------------\n"
print c "\c17 \n"
print c "\c17 \c1f1\c17 Windows 2000 Professional \n"
print c "\c17 \c1f2\c17 Windows 2000 Server \n"
print c "\c17 \c1f3\c17 Windows 2000 Advanced Server \n"
print c "\c17 \n"
print c "\c17 \c1fF\c17 Boot from first Floppy Drive \n"
print c "\c17 \c1f Esc\c17 Boot from first Hard Disk \n"
print c "\c17 \n"
print c "\c17---------------------------------------------------\n"
print c "\c17 Select the item and then press Enter \n"
print c "\c17===================================================\n"
;
start1:
call drawscrn
setpos 1 7
print c "\c3f 1\c31 Windows 2000 Professional "
key1:
getkey
call mainkey
&#111nkey space goto item_1
&#111nkey enter goto item_1
&#111nkey up goto start5
&#111nkey down goto start2
goto key1
;
start2:
call drawscrn
setpos 1 8
print c "\c3f 2\c31 Windows 2000 Server "
key2:
getkey
call mainkey
&#111nkey space goto item_2
&#111nkey enter goto item_2
&#111nkey up goto start1
&#111nkey down goto start3
goto key2
;
start3:
call drawscrn
setpos 1 9
print c "\c3f 3\c31 Windows 2000 Advanced Server "
key3:
getkey
call mainkey
&#111nkey space goto item_3
&#111nkey enter goto item_3
&#111nkey up goto start2
&#111nkey down goto start4
goto key3
;
start4:
call drawscrn
setpos 1 11
print c "\c3f F\c31 Boot from first Floppy Drive "
key4:
getkey
call mainkey
&#111nkey space boot 0x00
&#111nkey enter boot 0x00
&#111nkey up goto start3
&#111nkey down goto start5
goto key4
;
start5:
call drawscrn
setpos 1 12
print c "\c3f Esc\c31 Boot from first Hard Disk "
key5:
getkey
call mainkey
&#111nkey space boot 0x80
&#111nkey enter boot 0x80
&#111nkey up goto start4
&#111nkey down goto start1
goto key5
;
mainkey:
&#111nkey 1 goto item_1
&#111nkey 2 goto item_2
&#111nkey 3 goto item_3
&#111nkey f boot 0x00
&#111nkey F boot 0x00
&#111nkey esc boot 0x80
return
;
item_1:
cls
chain WPROSECT.DAT
goto start1
;
item_2:
cls
chain WSRVSECT.DAT
goto start2
;
item_3:
cls
chain ASRVSECT.DAT
goto start3
;
drawscrn:
setpos 1 7
print c "\c1f 1\c17 Windows 2000 Professional \n"
print c "\c1f 2\c17 Windows 2000 Server \n"
print c "\c1f 3\c17 Windows 2000 Advanced Server \n"
print c "\n"
print c "\c1f F\c17 Boot from first Floppy Drive \n"
print c "\c1f Esc\c17 Boot from first Hard Disk "
return
;
eof:
;
这个菜单配置文件看起来挺复杂,实际上大量的代码都是为了使用光标键而重复的。除了界面有点简陋外(你可以加上ANSI制表符等高位DOS扩展符),这个配置文件实现了彩色字符、光标键选择、从软盘启动、从硬盘启动等多种功能。
|
|