4 All OS functionality can be reached from one or several
7 When calling the system interrupt 0x32, you request a service
8 number and function in AX register with AL & AH. Making 256 the max
9 number of interfaces and available service-functions.
11 Services numbered 0x0F and below are system reserved and will not be
12 assigned automatically when requesting to add a new service. They can
13 still be replaced by implicitly requesting that service number instead
14 of getting a free one assigned.
16 This will allow for great OS modularity when each interface/service-
17 group can be replaced or upgraded by any user software or driver.
19 Most service groups or interfaces can be extended with drivers for
20 the type of device(s) that it handles, or the full service/interface
21 can be replaced for more fundamental changes to the design. For
22 example the 'process' and 'memory' interfaces can be replaced to
23 allow more advanced functionality like multitasking and paging.
25 The OS will be unable to function at all without the basic service
26 0x00 that performs the most crucial tasks, and without the STDIO and
27 VFS interfaces it will be severly crippled, left with no means of
28 communication, except perhaps a beep or two from the PC-speaker.
30 Below is a more visual representation of the main OS services
31 that will likely be included in the kernel. And a draft of what
32 functions each could or would include. Some functions also have
33 a breif example of parameters required.
35 Possible funture service groups or interfaces that could be system
37 - network functionality
39 - special one for all things USB?
40 - GUI specific functions
41 - running stuff in 16 and 64 bit, with extra DOS emulation
47 services.asm (main service 0x00)
48 --------------------------------------
49 always present in BOS, kernel
50 --------------------------------------
52 signature dd 'VFS ', 'IO ', 'SND ', 'PCI '
54 requested_no db 23 ; 0xFF or 0x00 to get assigned
55 service_struct dd 0 ; memory address of service calltable
58 returns all info above if service found
61 removes / unloads a service/interface
63 AL = free service number ; always above 0x0F (below reserved)
64 - get BOS version (and other misc. kernel functions below)
66 - execute kernel monitor command/script
68 - DMA functions, here or in VFS/floppy/memory drivers?
69 - GDT function, create new segments 'n shit
70 - pc-speaker beep if not even stdio is found
71 - CMOS / PIC functions
72 - run 16/64 bit code - seperate services for this? (int21h included?)
76 stdio.asm (service number 0x01)
77 --------------------------------------
78 needs to init itself as a service,
79 requesting servicenumber 1.
80 internal struct with info on
81 default in and out devices.
82 --------------------------------------
84 type db 1 ; 0 = output, 1 = input
85 signature dd 'COM ', 'VGA ', 'VESA', 'FILE', 'NET ', 'USB ', 'KEYB', 'MICE'
87 device_struct dd 0 ; address of calltable
89 AL = assigned device type ID / 0 for default?
90 returns all info above
92 AL = assigned device type ID
95 AL = assigned device type ID
96 AH = 1 for in, 0 for out
98 get a char from stdin or specified device
100 put a char to stdout or specified device
102 .... other default stubs needed for STDIO ....
105 vfs.asm (service number 0x02)
106 --------------------------------------
107 needs to init itself as a service,
108 requesting servicenumber 2.
109 internal struct with info on
110 devices and filesystems.
111 add simple 'FILE' STDIO interface?
112 --------------------------------------
115 - get devices (list or number specified)
119 - more device specific stubs?
128 - mount device (with auto detect fs option)
129 - format fs (take device argument)
130 - more fs specific stubs?
133 proccess.asm (service number 0x03)
134 --------------------------------------
135 needs to init itself as a service,
136 requesting servicenumber 3.
137 possible to extend/replace for
139 --------------------------------------
141 needs VFS info to load file
143 - Terminate and Stay Resident
145 interface to load driver/extensions for
146 more executable formats, possibly other
147 execution modes: realmode, longmode
151 memory.asm (service number 0x04)
152 --------------------------------------
153 needs to init itself as a service,
154 requesting servicenumber 4.
155 --------------------------------------
156 - lowalloc ? (for low mem, DMA & 16bit code)
160 - DMA functions here? Possibly most related to mem?