Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:docs:kernel:doskrnl [2023/12/15 03:46] – prokushev | en:docs:kernel:doskrnl [2024/05/25 02:43] (current) – prokushev | ||
---|---|---|---|
Line 3: | Line 3: | ||
====== DOSKRNL ====== | ====== DOSKRNL ====== | ||
- | DOSKRNL is a specialized FreeDOS kernel changed to support DOS in MVM. Mostly all FAT code removed as well as CONFIG.SYS parser. So it smaller in compare with original FreeDOS kernel. Also image format changed because different load logic. | + | DOSKRNL is a specialized FreeDOS kernel changed to support DOS in MVM. Mostly all FAT code removed as well as CONFIG.SYS parser. So it smaller in compare with original FreeDOS kernel. Also image format changed |
===== Initialization ===== | ===== Initialization ===== | ||
- | DOSKRNL loaded at address differ from standard DOS 0060:0000 address. osFree DOSKRNL | + | DOSKRNL loaded at address differ from standard DOS 0060: |
On DOSKRNL startup registers are following: | On DOSKRNL startup registers are following: | ||
* CS:IP - starting point | * CS:IP - starting point | ||
- | * SS:BP - pointer to the DOSKRNL init structure | + | * SS:BP - pointer to the DOSKRNL init structure |
* SS:SP - stack pointer (size around 800 bytes) | * SS:SP - stack pointer (size around 800 bytes) | ||
+ | |||
+ | Interrupts disabled. | ||
DOSKRNL init structure: | DOSKRNL init structure: | ||
Line 29: | Line 31: | ||
| 26 | 1 | Current drive (1-A, 2-B, 3-C, ...)| | | 26 | 1 | Current drive (1-A, 2-B, 3-C, ...)| | ||
| 27 | 1 | Boot drive (1-A, 2-B, 3-C, ...) | | | 27 | 1 | Boot drive (1-A, 2-B, 3-C, ...) | | ||
- | | ???? | ??? | ???? | | + | | 28 | 1 | Last drive (1-A, 2-B, 3-C, ...) | |
+ | | ??? | ??? | ??? | | ||
DEVICES is ASCIIZ string with list of DOS devices to be loaded divided by 0AH | DEVICES is ASCIIZ string with list of DOS devices to be loaded divided by 0AH | ||
Line 35: | Line 38: | ||
SHELL is ASCIIZ string. | SHELL is ASCIIZ string. | ||
- | SHELL arguments is ASCIIZ string (first byte is as string length, string ends with 0dh) | + | SHELL arguments is ASCIIZ string (first byte is a string length, string ends with 0dh) |
VDD is linked list of structures: | VDD is linked list of structures: | ||
- | VDDs linked list (in init area) in standard DOS Device drivers format | + | VDDs linked list in standard DOS Device drivers format. Entry can be placed in HMA, so need to be sure A20 enabled for such entries. Named as DOSDDTYPE in DDK |
^ offset ^ Size ^ Description ^ | ^ offset ^ Size ^ Description ^ | ||
Line 62: | Line 65: | ||
| Free | [BP+0]:0 | | | Free | [BP+0]:0 | | ||
| DOSKRNL | | DOSKRNL | ||
- | | some data | + | | Some data (VDD entries was found here) | ??? | |
| CMOS Data | 40:0 | | | CMOS Data | 40:0 | | ||
| Interrupt vectors | 0:0 | | | Interrupt vectors | 0:0 | | ||
Line 79: | Line 82: | ||
* DOS | * DOS | ||
* BREAK | * BREAK | ||
+ | * FCBS | ||
+ | * LASTDRIVE | ||
todo add more info here | todo add more info here | ||
Line 135: | Line 140: | ||
* VIDEO_SWITCH_NOTIFICATION | * VIDEO_SWITCH_NOTIFICATION | ||
* VIDEO_WINDOW_REFRESH | * VIDEO_WINDOW_REFRESH | ||
- | * XMS _HANDLES | + | * XMS_HANDLES |
* XMS_MEMORY_LIMIT | * XMS_MEMORY_LIMIT | ||
* XMS_MINIMUM_HMA | * XMS_MINIMUM_HMA |