forked from KolibriOS/kolibrios
89 lines
3.3 KiB
Plaintext
89 lines
3.3 KiB
Plaintext
; (english text below)
|
|
|
|
;------------------------------------------
|
|
; Èíòåðôåéñ ñîõðàíåíèÿ ïàðàìåòðîâ
|
|
;------------------------------------------
|
|
Åñëè ïðè ïåðåäà÷å óïðàâëåíèÿ ÿäðó çàãðóç÷èê óñòàíàâëèâàåò AX='KL',
|
|
òî â DS:SI ÿäðî îæèäàåò äàëüíåãî óêàçàòåëÿ íà ñëåäóþùóþ ñòðóêòóðó:
|
|
db âåðñèÿ ñòðóêòóðû, äîëæíà áûòü 1
|
|
dw ôëàãè:
|
|
áèò 0 óñòàíîâëåí = ïðèñóòñòâóåò îáðàç ðàìäèñêà â ïàìÿòè
|
|
dd äàëüíèé óêàçàòåëü íà ïðîöåäóðó ñîõðàíåíèÿ ïàðàìåòðîâ
|
|
ìîæåò áûòü 0, åñëè çàãðóç÷èê íå ïîääåðæèâàåò
|
|
Ïðîöåäóðà ñîõðàíåíèÿ ïàðàìåòðîâ äîëæíà çàïèñàòü ïåðâûé ñåêòîð ÿäðà
|
|
kernel.mnt íàçàä íà òî ìåñòî, îòêóäà îíà åãî ñ÷èòàëà; âîçâðàò èç
|
|
ïðîöåäóðû îñóùåñòâëÿåòñÿ ïî retf.
|
|
|
|
;------------------------------------------
|
|
; Óêàçàíèå çàãðóç÷èêîì ñèñòåìíîãî êàòàëîãà
|
|
;------------------------------------------
|
|
Ïåðåä ïåðåäà÷åé óïðàâëåíèÿ ÿäðó ìîãóò áûòü óñòàíîâëåíû ñëåäóþùèå ðåãèñòðû:
|
|
CX='HA'
|
|
DX='RD'
|
|
Ýòî óêàçûâàåò íà òî, ÷òî ðåãèñòð BX óêàçûâàåò íà ñèñòåìíûé ðàçäåë. Êàòàëîã /kolibri/ íà
|
|
ýòîì ðàçäåëå ÿâëÿåòñÿ ñèñòåìíûì, ê íåìó ìîæíî îáðàùàòüñÿ êàê ê /sys/
|
|
|
|
Âîçìîæíûå çíà÷åíèÿ ðåãèñòðà BL (óêàçûâàåò íà óñòðîéñòâî):
|
|
'a' - Primary Master
|
|
'b' - Primary Slave
|
|
'c' - Secondary Master
|
|
'd' - Secondary Slave
|
|
'r' - RAM äèñê
|
|
'm' - Ïðèâîäû CD-ROM
|
|
|
|
Âîçìîæíûå çíà÷åíèÿ ðåãèñòðà BH (óêàçûâàåò íà ðàçäåë):
|
|
äëÿ BL='a','b','c','d','r' - óêàçûâàåò íà ðàçäåë, ãäå ðàñïîëîæåí ñèñòåìíûé êàòàëîã
|
|
äëÿ BL='m',óêàçûâàåò íà íîìåð ôèçè÷åñêîãî óñòðîéñòâà, ñ êîòîðîãî íàäî íà÷èíàòü ïîèñê ñèñòåìíîãî êàòàëîãà.
|
|
|
|
ïðèìåðû çíà÷åíèé ðåãèñòðà BX:
|
|
'a1' - /hd0/1/
|
|
'a2' - /hd0/2/
|
|
'b1' - /hd1/1/
|
|
'd4' - /hd3/4/
|
|
'm0' - ïîèñê ïî ñèäþêàì êàòàëîãà kolibri
|
|
'r1' - /rd/1/
|
|
|
|
|
|
;------------------------------------------
|
|
; Interface for saving boot-screen settings
|
|
;------------------------------------------
|
|
If a loader sets AX='KL' when transferring control to the kernel,
|
|
the kernel expects in DS:SI far pointer to the following structure:
|
|
db structure version, must be 1
|
|
dw flags
|
|
bit 0 set = ramdisk image in memory is present
|
|
dd far pointer to save settings procedure
|
|
may be 0 if such procedure is not supported by loader
|
|
Procedure for saving settings must write the first sector of the kernel
|
|
kernel.mnt back to the place, from where it has been read; return from
|
|
this procedure must be with retf.
|
|
|
|
;------------------------------------------
|
|
; System directory information from loader
|
|
;------------------------------------------
|
|
Before transfer of control to the kernel following registers can be set:
|
|
CX = 'HA'
|
|
DX = 'RD'
|
|
This indicates that the register BX identifies system partition. The folder /kolibri/ in
|
|
this partition is system folder, it can be referenced as /sys/
|
|
|
|
Possible values for register BL (indicates the device):
|
|
'a' - Primary Master
|
|
'b' - Primary Slave
|
|
'c' - Secondary Master
|
|
'd' - Secondary Slave
|
|
'r' - RAM disc
|
|
'm' - ROM drives
|
|
|
|
Possible values for register BH (indicates section):
|
|
for BL = 'a', 'b', 'c', 'd', 'r' to denote partition where the system folder
|
|
for BL = 'm', indicates the number of physical devices, which must begin a systematic search directory.
|
|
|
|
Examples of register BX:
|
|
'a1' - /hd0/1/
|
|
'a2' - /hd0/2/
|
|
'b1' - /hd1/1/
|
|
'd4' - /hd3/4/
|
|
'm0' - search directory 'kolibri' by all CD-ROMs
|
|
'r1' - /rd/1/
|