China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-25 08:59
中国DOS联盟论坛 » DOS学习入门 & 精彩文章 (教学室) » [Original] Introductory DOS Boot Tutorial (3): The MSDOS.SYS Module View 2,898 Replies 5
Original Poster Posted 2002-11-18 00:00 ·  中国 湖北 随州 电信
元老会员
★★★
Credits 1,987
Posts 632
Joined 2002-10-27 00:00
23-year member
UID 73
Gender Male
Status Offline
The Chinese name of MSDOS.SYS is file management program. It is a core file in the DOS system, so it is also called the DOS kernel. In PC-DOS, this file is named IBMDOS.COM.
After the system initialization program in the IO.SYS module gains control, it loads and relocates the MSDOS.SYS module, and at the same time calls the kernel initialization program DOSINIT to complete initialization of the DOS kernel.
The MSDOS.SYS module carries out file management for the DOS operating system and provides many system function calls. It is also made up of two parts:
1. Kernel initialization program DOSINIT;
2. System function call program.
The kernel initialization program DOSINIT mainly does the following 4 things:
1. Set the relevant interrupt vectors for DOS;
2. Check the linked structure of the device headers in the IO.SYS module (equivalent to device control blocks), and complete their initialization;
3. Establish the corresponding Drive Parameter Blocks (DPB) for block devices;
4. According to the BUFFERS command in CONFIG.SYS, allocate and establish the system's disk buffer chain.
After DOSINIT completes the above 4 tasks, control returns to SYSINIT.
The system function call program mainly refers to the INT 21H (H is the hexadecimal marker) interrupt handler. Current microprocessors all support many types of interrupts. According to the cause of the interrupt, they can be divided into three major categories: external hardware interrupts, internal hardware interrupts, and software interrupts. Microprocessors of the Intel86 series can support 256 interrupts. The interrupt numbers are 00-FFH, that is, all 256 interrupts of the 3 types are identified by one unique interrupt number. INT 21H belongs to the software interrupt category. It is a program interrupt caused when the CPU executes an INT n instruction (n is the interrupt number).
MS-DOS has about more than 100 system functions, used to implement character device management, clock management, disk management, file and directory operations, record reading and writing, memory management, program execution, network sharing, and so on. Each function corresponds to a "function" number. As long as the function number is first placed into register AH (a general-purpose register of the CPU, used for storing data), and the corresponding input parameters are set as required, then by executing an INT 21H instruction, branching can be performed according to the provided function number, and a certain system function call can be completed by interrupt.






http://dos.e-stone.cn/dosbbs
uploadImages/200311161145850422.swf
Floor 2 Posted 2002-11-26 00:00 ·  中国 广东 东莞 电信
中级用户
★★
Credits 493
Posts 161
Joined 2002-10-29 00:00
23-year member
UID 94
Gender Male
From ZHCN
Status Offline
Looks like you have to learn some assembly before you'll understand it. Are there any Chinese tutorials on interrupts and assembly instructions?
Floor 3 Posted 2002-12-02 00:00 ·  中国 广东 汕尾 电信
初级用户
Credits 164
Posts 18
Joined 2002-11-30 00:00
23-year member
UID 372
Gender Male
Status Offline
I want to learn too. Are there any teaching materials on this? Recommend some.
我就是我,我要努力。
Floor 4 Posted 2004-02-28 00:00 ·  中国 湖南 株洲 电信
初级用户
Credits 141
Posts 8
Joined 2004-02-26 00:00
22-year member
UID 18510
Gender Male
Status Offline
Yeah! Are there any?
Floor 5 Posted 2004-02-28 00:00 ·  中国 湖北 咸宁 电信
初级用户
Credits 111
Posts 2
Joined 2004-02-28 00:00
22-year member
UID 18701
Gender Male
Status Offline
Isn't there an assembly language textbook?
I'm learning it now too, but I'm doing a terrible job of it
Floor 6 Posted 2004-03-07 00:00 ·  中国 广东 广州 从化区 电信
初级用户
Credits 159
Posts 12
Joined 2004-03-07 00:00
22-year member
UID 19476
Gender Male
Status Offline
So impressive! Admire you! Admire you!
Forum Jump: