|
taowentao
高级用户
   
积分 739
发帖 111
注册 2004-11-30 来自 辽宁沈阳
状态 离线
|
『楼 主』:
可以让你自编的程序被引导程序启动(含源代码)
使用 LLM 解释/回答一下
cstrt086.asm 是本人对open watcom c/c++ 1.3 启动文件的修改,使程序的启动地址 cstart 变为 0000:0000,使程序的重定位更容易,这样可用 EXEFLAT.EXE(仅用于 16位 dos 实模式) 生成可执行映象文件;
sys_demo.bat 是一批处理文件,将 demo.exe 变为可由 freedos boot loader 从硬盘引导的KERNEL.SYS
将open watcom c/c++ 1.3 link switches--> 3. Advanced switches 中starting address 设为_cstart_,
编译MAIN_boot.c和cstrt086.asm,将可执行文件命名为demo.exe,双击(执行)sys_demo.bat;可得到KERNEL.SYS.
将KERNEL.SYS 替换 freedos 的 KERNEL.SYS(可将freedos 的 KERNEL.SYS更名), 以实现 freedos boot loader
的硬盘引导;
将rtCell_img.rar和Qemu.rar中的文件解压缩到同一个文件夹(不包含任何自目录),双击(执行)rtCell.bat可看到KERNEL.SYS被 freedos boot loader 加载,并
在模拟器上执行.
*****************************************************
***此文件最好用虚拟机或模拟器执行,以免破坏硬盘数据***
*****************************************************
那位朋友有问题,有新想法,或者发现错误,请联系:taowentao_twt@163.com
Last edited by taowentao on 2005-9-3 at 15:53 ]
cstrt086.asm is my modification of the startup file of Open Watcom C/C++ 1.3, making the startup address of the program cstart become 0000:0000, which makes it easier to relocate the program. In this way, the executable image file can be generated by EXEFLAT.EXE (only for 16-bit DOS real mode);
sys_demo.bat is a batch file that turns demo.exe into KERNEL.SYS that can be booted from the hard disk by FreeDOS boot loader;
Set the starting address in Open Watcom C/C++ 1.3 link switches --> 3. Advanced switches to _cstart_, compile MAIN_boot.c and cstrt086.asm, name the executable file demo.exe, double-click (execute) sys_demo.bat; you can get KERNEL.SYS;
Replace KERNEL.SYS with FreeDOS's KERNEL.SYS (you can rename FreeDOS's KERNEL.SYS) to realize the hard disk boot of FreeDOS boot loader;
Extract the files in rtCell_img.rar and Qemu.rar to the same folder (without any subdirectories), double-click (execute) rtCell.bat to see that KERNEL.SYS is loaded by FreeDOS boot loader and executed on the emulator;
*****************************************************
***This file is best executed with a virtual machine or emulator to avoid damaging hard disk data***
*****************************************************
If any friend has questions, new ideas, or finds errors, please contact: taowentao_twt@163.com
Last edited by taowentao on 2005-9-3 at 15:53 ]
|
|
2005-8-26 11:49 |
|
|
taowentao
高级用户
   
积分 739
发帖 111
注册 2004-11-30 来自 辽宁沈阳
状态 离线
|
『第 2 楼』:
读写硬盘fat16格式文件
使用 LLM 解释/回答一下
"中國DOS聯盟論壇 » DOS開發編程 & 發展交流 (開發室)--->可读写硬盘fat16格式文件的实时微内核 "下还有关于读写硬盘fat16格式文件的文件,可以下载.
其中读写硬盘的c代码仅有400零几行;
读写fat16格式文件的c代码仅有620余行.
非常适合自己编写启动程序,或用于嵌入式系统.
"China DOS Union Forum » DOS Development Programming & Development Exchange (Development Room) ---> Real-time microkernel that can read and write FAT16 format files on the hard disk" There are also files related to reading and writing FAT16 format files on the hard disk that can be downloaded.
Among them, the C code for reading and writing the hard disk is only more than 400 lines;
The C code for reading and writing FAT16 format files is only more than 620 lines.
Very suitable for writing your own boot programs or for embedded systems.
|
|
2005-8-28 13:30 |
|
|
TurboY
中级用户
   绝不写垃圾帖
积分 322
发帖 99
注册 2004-7-3 来自 湖北
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
我现在还无法理解这些程序,但很佩服你对操作系统理解得如此透彻!
I still can't understand these programs now, but I admire that you understand the operating system so thoroughly!
|

从95年开始用DOS3.2,96年在Windows3.1里认识了鼠标,97年开始用Win95,98年装过NetWare,99年迷过Linux,现在用WinXP、WinME和DOS7.1。一回首,从盲到忙,从忙到茫。 |
|
2005-8-29 01:02 |
|
|
fdsiuha
高级用户
    闷
积分 587
发帖 302
注册 2005-7-25
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
怎样获得FREEDOS32的源代码?网站上说要使用好象是一个什么同步的下载工具把,但是我试了几次都不行。
How to obtain the source code of FREEDOS32? The website says that it is necessary to use a certain synchronization download tool, but I have tried several times without success.
|

欢迎造访DOS的小屋!
http://risky.ik8.com |
|
2005-8-29 15:47 |
|
|
taowentao
高级用户
   
积分 739
发帖 111
注册 2004-11-30 来自 辽宁沈阳
状态 离线
|
『第 5 楼』:
直接下载
使用 LLM 解释/回答一下
我试了,可以直接下载
"http://prdownloads.sourceforge.net/freedos-32/fd32-0.0.5-src.tar.bz2?use_mirror=umn"
I tried, and I can download directly
"http://prdownloads.sourceforge.net/freedos-32/fd32-0.0.5-src.tar.bz2?use_mirror=umn"
|
|
2005-8-29 16:06 |
|
|
fdsiuha
高级用户
    闷
积分 587
发帖 302
注册 2005-7-25
状态 离线
|
『第 6 楼』:
使用 LLM 解释/回答一下
我狂晕。(汗...)
我只注意那个Latest source code from CVS去了...
I'm really dizzy. (Sweat...)
I only focused on the "Latest source code from CVS"...
|

欢迎造访DOS的小屋!
http://risky.ik8.com |
|
2005-8-29 20:39 |
|
|
taowentao
高级用户
   
积分 739
发帖 111
注册 2004-11-30 来自 辽宁沈阳
状态 离线
|
『第 7 楼』:
关于你自编的程序
使用 LLM 解释/回答一下
rtCell_img.rar和Qemu.rar 应同时下载,并解压缩到同一个文件夹(不包含任何自目录),方可看到在模拟器上的执行结果.
要使你自编的程序被引导程序启动,并正确执行,该程序中不可有任何dos调用,只能调用BIOS功能,或者你自编硬件驱动程序. 网上有很多资源可供借鉴,请各位朋友查询.
Both rtCell_img.rar and Qemu.rar should be downloaded simultaneously and extracted into the same folder (without any subdirectories) to see the execution result on the emulator. To make your self-compiled program be booted by the bootloader and executed correctly, there should be no DOS calls in this program; it can only call BIOS functions or your self-compiled hardware driver programs. There are many resources available online for reference, please friends query them.
|
|
2005-8-31 09:18 |
|
|
taowentao
高级用户
   
积分 739
发帖 111
注册 2004-11-30 来自 辽宁沈阳
状态 离线
|
『第 8 楼』:
向硬盘映象文件中添加文件
使用 LLM 解释/回答一下
rtCell_img.rar中的rtCell.img是硬盘映象文件,你可以用winimage在其中添加或删除文件/文件夹(winimage可从 http://as.onlinedown.net/ 下载).
以便在模拟器上演示你编写的被"引导程序"启动的程序.
The rtCell.img in rtCell_img.rar is a hard disk image file. You can use winimage to add or delete files/folders in it (winimage can be downloaded from http://as.onlinedown.net/). So as to demonstrate the program you wrote that is started by the "bootloader" on the emulator.
|
|
2005-9-2 09:33 |
|
|
taowentao
高级用户
   
积分 739
发帖 111
注册 2004-11-30 来自 辽宁沈阳
状态 离线
|
『第 9 楼』:
向你的程序(静态)传递参数
使用 LLM 解释/回答一下
对文件作如下修改:
public _arg1
public _arg2
.
.
.
_cstart_ proc near
jmp around
_arg1:
DB 'a', 'r', 'g', '1'
_arg2:
DB 'a', 'r', 'g', '2'
around: sti ; enable interrupts
mov dx,DGROUP
mov ds,dx
mov es,dx
call _CMain
_cstart_ endp
然后从 c 程序中引用 extern DWORD arg1, arg2;
从引导程序中(动态)或用二进制修改工具(静态)修改可执行文件中的 arg1, arg2 的值,从而可向你的程序传递参数.
Make the following modifications to the file:
public _arg1
public _arg2
.
.
.
_cstart_ proc near
jmp around
_arg1:
DB 'a', 'r', 'g', '1'
_arg2:
DB 'a', 'r', 'g', '2'
around: sti ; enable interrupts
mov dx,DGROUP
mov ds,dx
mov es,dx
call _CMain
_cstart_ endp
Then reference in the C program: extern DWORD arg1, arg2;
Modify the values of arg1 and arg2 in the executable file from the bootloader (dynamically) or using a binary modification tool (static), so that parameters can be passed to your program.
|
|
2005-9-7 15:21 |
|
|
taowentao
高级用户
   
积分 739
发帖 111
注册 2004-11-30 来自 辽宁沈阳
状态 离线
|
『第 10 楼』:
关于文件操作
使用 LLM 解释/回答一下
脱离bios的 fat16 文件操作,请到
“DOS開發編程 & 發展交流 (開發室)------>
可读写硬盘fat16格式文件的实时微内核(含源代码) ”
下查看源代码。
Off-the-BIOS FAT16 file operations, please go to
"DOS Development Programming & Development Exchange (Development Room) ------>
Read-write hard disk FAT16 format file real-time microkernel (including source code)"
to view the source code.
|
|
2005-9-14 11:34 |
|
|
liangshenda
新手上路

积分 8
发帖 6
注册 2006-2-4
状态 离线
|
|
2006-2-4 14:40 |
|
|
hnlyzhd
高级用户
   
积分 544
发帖 164
注册 2004-10-17
状态 离线
|
『第 12 楼』:
使用 LLM 解释/回答一下
我來提供一個文件:
這是個硬盤保護卡的保護模塊,把hj.bin写在主板的BIOS芯片中。插上网卡即可代替硬盤保護卡。希望你能寫個在DOS下加載運行它的程序,或者像你在DOS論壇上發的程序那樣把它變成KERNEL.SYS來啟動測試其性能!
Last edited by hnlyzhd on 2006-2-5 at 22:48 ]
I will provide a file:
This is a protection module of a hard disk protection card, write hj.bin into the BIOS chip of the mainboard. Plug in the network card to replace the hard disk protection card. Hope you can write a program to load and run it under DOS, or make it into KERNEL.SYS like the program you posted on the DOS forum to start and test its performance!
Last edited by hnlyzhd on 2006-2-5 at 22:48 ]
附件
1: bin.rar (2006-2-5 22:47, 50.02 KiB, 下载附件所需积分 1 点
,下载次数: 60)
|

我的留言簿
http://hnlyzhd.ys168.com 我的网络盘
|
|
2006-2-5 22:41 |
|
|
taowentao
高级用户
   
积分 739
发帖 111
注册 2004-11-30 来自 辽宁沈阳
状态 离线
|
『第 13 楼』:
使用 LLM 解释/回答一下
请把 hj.bin 的调用接口作个详细说明,列出其初始化入口地址。
Please provide the relevant Chinese content about "hj.bin 的调用接口作个详细说明,列出其初始化入口地址" so that I can translate it. Currently, the content you provided is incomplete for translation. Please supply the full relevant Chinese text.
|
|
2006-2-9 12:46 |
|
|
crackle
新手上路

积分 14
发帖 7
注册 2006-10-20
状态 离线
|
|
2006-10-20 15:14 |
|
|
electronixtar
铂金会员
      
积分 7493
发帖 2672
注册 2005-9-2
状态 离线
|
『第 15 楼』:
使用 LLM 解释/回答一下
基础不够~~~高深~~
The foundation is not enough~~~ Too advanced~~~
|

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>" |
|
2006-10-20 21:52 |
|