rtCell ― Real-Time Microkernel (compilable with GCC 3.xx, Visual C++, and Watcom C++)
This kernel draws on principles from Minix, Windows NT, and Linux, and has the following functions:
1. Fully preemptive multitasking real-time microkernel. Task scheduling, waiting, and wake-up operations have good determinism (independent of the number of tasks).
Independent kernel stack; interrupts and system calls are all switched to the kernel stack for execution;
2. 256 priorities. 254 available priorities 1~254, 0 is the highest priority (reserved by the system), and 255 is the idle priority;
3. Different priorities can be fully preempted. Between the same priorities, tasks can be executed in first-in-first-out until blocked or in round-robin mode. The execution mode can be selected when the task object is created;
4. A kernel timer is implemented in a system (timer service) task, used for timeout waiting for kernel objects, periodic timers, and task delays. The priority of this (timer service) task is driven by the highest priority of its client tasks and changes dynamically to eliminate the priority inversion phenomenon;
5. Any kernel object is identified by an integer ID, not a pointer, thus avoiding the side effects of null pointers in user tasks. The total number of kernel objects does not exceed 32768 (i.e., 32K);
6. Provides kernel objects such as Task, Mutex, Semaphore, Flag, Timer, Message, and Ring buffer;
7. The mutex semaphore provides both priority inheritance and priority ceiling protocols, which are set at creation and always wait by priority;
8. The waiting methods for other objects are priority waiting and first-in-first-out waiting (to save memory), which are set at creation;
9. For synchronization of kernel data, except for temporarily disabling interrupts during task switching and when switching stacks between tasks and the kernel, other operations are performed using the deferred procedure call (DPC) mechanism;
10. System calls are implemented using the trap instruction (int instruction in x86), making it easy to expand to a hierarchical mode with "memory protection";
11. A simple heap memory allocation mechanism is provided in the kernel for dynamic memory allocation of kernel objects;
12. Interrupt entry and exit interfaces are implemented in the kernel, supporting interrupt nesting. The wake-up operations of Semaphore, Flag, Message, and Ring buffer can be executed in interrupts. When users handle interrupts, they only need to write standard C functions without caring about the details of the underlying interrupt processing.
The 32-bit kernel has been compiled successfully under Windows 2000, Mingwin 4.0 (GCC 3.xx), and Visual C++ 5.0/6.0;
The 16-bit kernel has been compiled successfully under Windows 2000 and Open Watcom C/C++ 1.3.
rtCell_vc5_sources.rar and rtCell_vc5.rar are the library files and source codes (serial communication, disk, and fat16 file operations) of the 32-bit real-time microkernel rtCell32. Please compile with Visual C++ 5.0/6.0.
Watcom_C16.rar is the DOS library files and source codes (only applicable to Open Watcom C/C++ ) of the 16-bit real-time microkernel rtCell;
bochs.rar contains the hard disk boot startup demonstration of rtCell in the "virtual machine software Bochs";
In this demonstration, the FreeDOS boot loader is used to load from the fat16 format file system to 0x600 for execution.
The 16-bit rtCell after compilation is about 50 K, including 4K statically allocated kernel stack and more than 4K other kernel data;
The 32-bit rtCell after compilation is about 87 K, including 8K statically allocated kernel stack and more than 4K other kernel data.
The 32-bit rtCell was tested for stability and reliability for 10 consecutive days on a "Lenovo machine" with P4, 1.7G, and 256 M memory.
E-mail: taowentao_twt@163.com
Click the hyperlink to download the file:
Attachment 2:
rtCell_vc5.rar (2005-12-16 05:38 PM, 127.07 K)
http://www.cn-dos.net/forum/attachment.php?aid=623&checkid=69e88&download=1
Attachment 3:
bochs.rar (2005-12-19 10:00 AM, 849.1 K)
http://www.cn-dos.net/forum/attachment.php?aid=655&checkid=c4727&download=1
Attachment 4:
rtCell_vc5_sources.rar (2005-12-19 10:04 AM, 127.07 K)
http://www.cn-dos.net/forum/attachment.php?aid=656&checkid=69e88&download=1
The following are demonstrations of 16-bit DOS real-mode mouse (PS2 ordinary serial port mouse) and keyboard applications and their available library files;
demo.exe is a demonstration of mouse (PS2) and keyboard applications in pure DOS. Note: The mouse cannot be used in the DOS window of (Win98/2K/XP);
KERNEL.SYS is used for the mouse and keyboard demonstration loaded and started by the Free DOS free loader;
rtCell16.lib is the 16-bit library file of the real-time microkernel rtCell (only applicable to Open Watcom C/C++);
rtPC_input.obj is the mouse (PS2) and keyboard input obj file for corresponding I/O operations. The source code can be found in FreeDOS-32 release 0.0.5;
sys_demo.bat and EXEFLAT.EXE are used to generate KERNEL.SYS from demo.exe for loading and starting by the Free DOS free loader.
True multitasking, multi (text mode) window demonstration:
Interrupt-driven mouse and keyboard, event-driven multi-window, true multitasking, fully preemptive real-time microkernel;
The red title is the active window, the blue title is the inactive window, and the inactive window can be dynamically refreshed in the background;
One window displays the task status, the other two windows display the current time and the word "window", and the desktop displays keyboard input;
The mouse can be used to move, activate windows, and change window size (at the lower right corner of the window).
Press "ctrl + z" to switch to the task status window.
Attachment 1: qemu_0.8_domo.rar contains the demonstration on the virtual machine. Unzip it, execute rtCell.bat, and click the window with the mouse;
Download link:
http://www.cn-dos.net/forum/attachment.php?aid=807&checkid=972c0&download=1
Attachment 2: dos_demo.rar (demo.exe and demo_.exe) is used to demonstrate with a serial mouse in pure DOS (no mouse in the Windows DOS window).
Download link:
http://www.cn-dos.net/forum/attachment.php?aid=854&checkid=12353&download=1
Latest graphical mode multi-window demonstration
giCell true graphical mode multi-window – all source codes (C language) are less than six thousand lines, and have the following functions:
1. Perfect and delicate multi-viewport clipping and hidden surface removal processing, tightly integrated with the real-time microkernel rtCell;
2. True event (or message) driven multi-window technology, and supports top-level windows and transparent windows;
3. Currently supports Label, Edit, Botton, Slider, and Checkbox controls. The Edit control supports cut, copy, and paste;
4. Supports window translation, scaling, and window system buttons, and process callbacks for windows and controls;
5. Small memory requirements (less than 64K), and the memory consumed by windows and controls is very small, so it is highly practical. Including rtCell, mouse, keyboard, and graphics driver, it is only more than 100 K bytes in DOS.
Demonstration method: Unzip gui_Test.rar, execute gui_Test.bat under Windows (double-click),
or directly execute bc_gui.exe under pure DOS (no mouse in the DOS window of Windows).
Note: In this demonstration, bc_gui.exe is relatively large due to including an illustrative bitmap.
Download address: http://zhenlove.com.cn/cndos/fileup/files/gui_Test.rar
[ Last edited by taowentao on 2006-10-5 at 22:24 ]
This kernel draws on principles from Minix, Windows NT, and Linux, and has the following functions:
1. Fully preemptive multitasking real-time microkernel. Task scheduling, waiting, and wake-up operations have good determinism (independent of the number of tasks).
Independent kernel stack; interrupts and system calls are all switched to the kernel stack for execution;
2. 256 priorities. 254 available priorities 1~254, 0 is the highest priority (reserved by the system), and 255 is the idle priority;
3. Different priorities can be fully preempted. Between the same priorities, tasks can be executed in first-in-first-out until blocked or in round-robin mode. The execution mode can be selected when the task object is created;
4. A kernel timer is implemented in a system (timer service) task, used for timeout waiting for kernel objects, periodic timers, and task delays. The priority of this (timer service) task is driven by the highest priority of its client tasks and changes dynamically to eliminate the priority inversion phenomenon;
5. Any kernel object is identified by an integer ID, not a pointer, thus avoiding the side effects of null pointers in user tasks. The total number of kernel objects does not exceed 32768 (i.e., 32K);
6. Provides kernel objects such as Task, Mutex, Semaphore, Flag, Timer, Message, and Ring buffer;
7. The mutex semaphore provides both priority inheritance and priority ceiling protocols, which are set at creation and always wait by priority;
8. The waiting methods for other objects are priority waiting and first-in-first-out waiting (to save memory), which are set at creation;
9. For synchronization of kernel data, except for temporarily disabling interrupts during task switching and when switching stacks between tasks and the kernel, other operations are performed using the deferred procedure call (DPC) mechanism;
10. System calls are implemented using the trap instruction (int instruction in x86), making it easy to expand to a hierarchical mode with "memory protection";
11. A simple heap memory allocation mechanism is provided in the kernel for dynamic memory allocation of kernel objects;
12. Interrupt entry and exit interfaces are implemented in the kernel, supporting interrupt nesting. The wake-up operations of Semaphore, Flag, Message, and Ring buffer can be executed in interrupts. When users handle interrupts, they only need to write standard C functions without caring about the details of the underlying interrupt processing.
The 32-bit kernel has been compiled successfully under Windows 2000, Mingwin 4.0 (GCC 3.xx), and Visual C++ 5.0/6.0;
The 16-bit kernel has been compiled successfully under Windows 2000 and Open Watcom C/C++ 1.3.
rtCell_vc5_sources.rar and rtCell_vc5.rar are the library files and source codes (serial communication, disk, and fat16 file operations) of the 32-bit real-time microkernel rtCell32. Please compile with Visual C++ 5.0/6.0.
Watcom_C16.rar is the DOS library files and source codes (only applicable to Open Watcom C/C++ ) of the 16-bit real-time microkernel rtCell;
bochs.rar contains the hard disk boot startup demonstration of rtCell in the "virtual machine software Bochs";
In this demonstration, the FreeDOS boot loader is used to load from the fat16 format file system to 0x600 for execution.
The 16-bit rtCell after compilation is about 50 K, including 4K statically allocated kernel stack and more than 4K other kernel data;
The 32-bit rtCell after compilation is about 87 K, including 8K statically allocated kernel stack and more than 4K other kernel data.
The 32-bit rtCell was tested for stability and reliability for 10 consecutive days on a "Lenovo machine" with P4, 1.7G, and 256 M memory.
E-mail: taowentao_twt@163.com
Click the hyperlink to download the file:
Attachment 2:
rtCell_vc5.rar (2005-12-16 05:38 PM, 127.07 K)
http://www.cn-dos.net/forum/attachment.php?aid=623&checkid=69e88&download=1
Attachment 3:
bochs.rar (2005-12-19 10:00 AM, 849.1 K)
http://www.cn-dos.net/forum/attachment.php?aid=655&checkid=c4727&download=1
Attachment 4:
rtCell_vc5_sources.rar (2005-12-19 10:04 AM, 127.07 K)
http://www.cn-dos.net/forum/attachment.php?aid=656&checkid=69e88&download=1
The following are demonstrations of 16-bit DOS real-mode mouse (PS2 ordinary serial port mouse) and keyboard applications and their available library files;
demo.exe is a demonstration of mouse (PS2) and keyboard applications in pure DOS. Note: The mouse cannot be used in the DOS window of (Win98/2K/XP);
KERNEL.SYS is used for the mouse and keyboard demonstration loaded and started by the Free DOS free loader;
rtCell16.lib is the 16-bit library file of the real-time microkernel rtCell (only applicable to Open Watcom C/C++);
rtPC_input.obj is the mouse (PS2) and keyboard input obj file for corresponding I/O operations. The source code can be found in FreeDOS-32 release 0.0.5;
sys_demo.bat and EXEFLAT.EXE are used to generate KERNEL.SYS from demo.exe for loading and starting by the Free DOS free loader.
True multitasking, multi (text mode) window demonstration:
Interrupt-driven mouse and keyboard, event-driven multi-window, true multitasking, fully preemptive real-time microkernel;
The red title is the active window, the blue title is the inactive window, and the inactive window can be dynamically refreshed in the background;
One window displays the task status, the other two windows display the current time and the word "window", and the desktop displays keyboard input;
The mouse can be used to move, activate windows, and change window size (at the lower right corner of the window).
Press "ctrl + z" to switch to the task status window.
Attachment 1: qemu_0.8_domo.rar contains the demonstration on the virtual machine. Unzip it, execute rtCell.bat, and click the window with the mouse;
Download link:
http://www.cn-dos.net/forum/attachment.php?aid=807&checkid=972c0&download=1
Attachment 2: dos_demo.rar (demo.exe and demo_.exe) is used to demonstrate with a serial mouse in pure DOS (no mouse in the Windows DOS window).
Download link:
http://www.cn-dos.net/forum/attachment.php?aid=854&checkid=12353&download=1
Latest graphical mode multi-window demonstration
giCell true graphical mode multi-window – all source codes (C language) are less than six thousand lines, and have the following functions:
1. Perfect and delicate multi-viewport clipping and hidden surface removal processing, tightly integrated with the real-time microkernel rtCell;
2. True event (or message) driven multi-window technology, and supports top-level windows and transparent windows;
3. Currently supports Label, Edit, Botton, Slider, and Checkbox controls. The Edit control supports cut, copy, and paste;
4. Supports window translation, scaling, and window system buttons, and process callbacks for windows and controls;
5. Small memory requirements (less than 64K), and the memory consumed by windows and controls is very small, so it is highly practical. Including rtCell, mouse, keyboard, and graphics driver, it is only more than 100 K bytes in DOS.
Demonstration method: Unzip gui_Test.rar, execute gui_Test.bat under Windows (double-click),
or directly execute bc_gui.exe under pure DOS (no mouse in the DOS window of Windows).
Note: In this demonstration, bc_gui.exe is relatively large due to including an illustrative bitmap.
Download address: http://zhenlove.com.cn/cndos/fileup/files/gui_Test.rar
[ Last edited by taowentao on 2006-10-5 at 22:24 ]
