无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站投放广告、加入VIP会员,请联系 微信:wuyouceo
查看: 1972|回复: 2
打印 上一主题 下一主题

如何实现run a.bin 中的跳转功能

[复制链接]
跳转到指定楼层
1#
发表于 2004-10-15 03:09:56 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
run:加载执行代码
run a.img   在当前目录加载a.img,然后根据他的格式,做软盘模拟启动。
run a.bin   在当前目录加载a.bin,然后跳转到他的入口。
从上面学会了用WinImage制作.img。但是不知道用什么工具做.bin文件!还有怎么实现跳转到他的入口?
希望那位大哥教导一下
万分感谢
2#
 楼主| 发表于 2004-10-15 10:24:44 | 只看该作者

如何实现run a.bin 中的跳转功能

有人能介绍一下吗?
谢谢
回复

使用道具 举报

3#
发表于 2004-10-15 11:21:29 | 只看该作者

如何实现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扩展符),这个配置文件实现了彩色字符、光标键选择、从软盘启动、从硬盘启动等多种功能。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|捐助支持|无忧启动 ( 闽ICP备05002490号-1 )

闽公网安备 35020302032614号

GMT+8, 2025-10-14 19:46

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表