Subversion Repositories Kolibri OS

Rev

Rev 9047 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 9047 Rev 9048
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;                                                              ;;
2
;;                                                              ;;
3
;; Copyright (C) KolibriOS team 2004-2021. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2004-2021. All rights reserved. ;;
4
;; Distributed under terms of the GNU General Public License    ;;
4
;; Distributed under terms of the GNU General Public License    ;;
5
;;                                                              ;;
5
;;                                                              ;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
7
 
7
 
8
$Revision: 8869 $
8
$Revision: 9048 $
9
 
9
 
10
 
10
 
11
keymap:
11
keymap:
12
 
12
 
13
     db   '6',27
13
     db   '6',27
14
     db   '1234567890-=',8,9
14
     db   '1234567890-=',8,9
15
     db   'qwertyuiop[]',13
15
     db   'qwertyuiop[]',13
16
     db   '~asdfghjkl;',39,96,0,'\zxcvbnm,./',0,'45 '
16
     db   '~asdfghjkl;',39,96,0,'\zxcvbnm,./',0,'45 '
17
     db   '@234567890123',180,178,184,'6',176,'7'
17
     db   '@234567890123',180,178,184,'6',176,'7'
18
     db   179,'8',181,177,183,185,182
18
     db   179,'8',181,177,183,185,182
19
     db   'AB
19
     db   'AB
20
     db   'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20
     db   'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
21
     db   'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
21
     db   'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
22
     db   'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
22
     db   'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
23
 
23
 
24
keymap_shift:
24
keymap_shift:
25
     db   '6',27
25
     db   '6',27
26
     db   '!@#$%^&*()_+',8,9
26
     db   '!@#$%^&*()_+',8,9
27
     db   'QWERTYUIOP{}',13
27
     db   'QWERTYUIOP{}',13
28
     db   '~ASDFGHJKL:"~',0,'|ZXCVBNM<>?',0,'45 '
28
     db   '~ASDFGHJKL:"~',0,'|ZXCVBNM<>?',0,'45 '
29
     db   '@234567890123',180,178,184,'6',176,'7'
29
     db   '@234567890123',180,178,184,'6',176,'7'
30
     db   179,'8',181,177,183,185,182
30
     db   179,'8',181,177,183,185,182
31
     db   'AB>D',255,'FGHIJKLMNOPQRSTUVWXYZ'
31
     db   'AB>D',255,'FGHIJKLMNOPQRSTUVWXYZ'
32
     db   'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
32
     db   'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
33
     db   'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
33
     db   'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
34
     db   'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
34
     db   'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
35
 
35
 
36
 
36
 
37
keymap_alt:
37
keymap_alt:
38
     db   ' ',27
38
     db   ' ',27
39
     db   ' @ $  {[]}\ ',8,9
39
     db   ' @ $  {[]}\ ',8,9
40
     db   '            ',13
40
     db   '            ',13
41
     db   '             ',0,'           ',0,'4',0,' '
41
     db   '             ',0,'           ',0,'4',0,' '
42
     db   '             ',180,178,184,'6',176,'7'
42
     db   '             ',180,178,184,'6',176,'7'
43
     db   179,'8',181,177,183,185,182
43
     db   179,'8',181,177,183,185,182
44
     db   'ABCD',255,'FGHIJKLMNOPQRSTUVWXYZ'
44
     db   'ABCD',255,'FGHIJKLMNOPQRSTUVWXYZ'
45
     db   'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
45
     db   'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
46
     db   'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
46
     db   'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
47
     db   'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
47
     db   'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
48
 
48
 
49
 
49
 
50
 
50
 
51
if lang eq ru
51
if lang eq ru
52
  boot_initirq      cp866 'Инициализация IRQ',0
52
  boot_initirq      cp866 'Инициализация IRQ',0
53
  boot_picinit      cp866 'Инициализация PIC',0
53
  boot_picinit      cp866 'Инициализация PIC',0
54
  boot_v86machine   cp866 'Инициализация системной V86 машины',0
54
  boot_v86machine   cp866 'Инициализация системной V86 машины',0
55
  boot_inittimer    cp866 'Инициализация системного таймера (IRQ0)',0
55
  boot_inittimer    cp866 'Инициализация системного таймера (IRQ0)',0
56
  boot_initapic     cp866 'Попытка инициализации APIC',0
56
  boot_initapic     cp866 'Попытка инициализации APIC',0
57
  boot_enableirq    cp866 'Включить прерывания 2, 13',0
57
  boot_enableirq    cp866 'Включить прерывания 2, 13',0
58
  boot_disabling_ide cp866 'Запрещение прерываний в контроллере IDE',0
58
  boot_disabling_ide cp866 'Запрещение прерываний в контроллере IDE',0
59
  boot_enabling_ide cp866 'Разрешение прерываний в контроллере IDE',0
59
  boot_enabling_ide cp866 'Разрешение прерываний в контроллере IDE',0
60
  boot_set_int_IDE  cp866 'Установка обработчиков прерываний IDE',0
60
  boot_set_int_IDE  cp866 'Установка обработчиков прерываний IDE',0
61
  boot_detectfloppy cp866 'Поиск floppy дисководов',0
61
  boot_detectfloppy cp866 'Поиск floppy дисководов',0
62
  boot_detecthdcd   cp866 'Поиск жестких дисков и ATAPI приводов',0
62
  boot_detecthdcd   cp866 'Поиск жестких дисков и ATAPI приводов',0
63
  boot_getcache     cp866 'Получение памяти для кэша',0
63
  boot_getcache     cp866 'Получение памяти для кэша',0
64
  boot_detectpart   cp866 'Поиск разделов на дисковых устройствах',0
64
  boot_detectpart   cp866 'Поиск разделов на дисковых устройствах',0
65
  boot_init_sys     cp866 'Инициализация системного каталога /sys',0
65
  boot_init_sys     cp866 'Инициализация системного каталога /sys',0
66
  boot_loadlibs     cp866 'Загрузка библиотек (.obj)',0
66
  boot_loadlibs     cp866 'Загрузка библиотек (.obj)',0
67
  boot_memdetect    cp866 'Количество оперативной памяти','     ',' Мб',0
67
  boot_memdetect    cp866 'Количество оперативной памяти','     ',' Мб',0
68
  boot_tss          cp866 'Установка TSSs',0
68
  boot_tss          cp866 'Установка TSSs',0
69
  boot_cpuid        cp866 'Чтение CPUIDs',0
69
  boot_cpuid        cp866 'Чтение CPUIDs',0
70
;  boot_devices      cp866 'Поиск устройств',0
70
;  boot_devices      cp866 'Поиск устройств',0
71
  boot_timer        cp866 'Установка таймера',0
71
  boot_timer        cp866 'Установка таймера',0
72
  boot_initramdisk  cp866 'Инициализация рамдиска',0
72
  boot_initramdisk  cp866 'Инициализация рамдиска',0
73
  boot_irqs         cp866 'Переопределение IRQ',0
73
  boot_irqs         cp866 'Переопределение IRQ',0
74
  boot_setmouse     cp866 'Установка мыши',0
74
  boot_setmouse     cp866 'Установка мыши',0
75
  boot_windefs      cp866 'Установка настроек окон по умолчанию',0
75
  boot_windefs      cp866 'Установка настроек окон по умолчанию',0
76
  boot_bgr          cp866 'Установка фона',0
76
  boot_bgr          cp866 'Установка фона',0
77
  boot_resirqports  cp866 'Резервирование IRQ и портов',0
77
  boot_resirqports  cp866 'Резервирование IRQ и портов',0
78
  boot_setrports    cp866 'Установка адресов IRQ',0
78
  boot_setrports    cp866 'Установка адресов IRQ',0
79
  boot_setostask    cp866 'Создание процесса ядра',0
79
  boot_setostask    cp866 'Создание процесса ядра',0
80
  boot_allirqs      cp866 'Открытие всех IRQ',0
80
  boot_allirqs      cp866 'Открытие всех IRQ',0
81
  boot_tsc          cp866 'Чтение TSC',0
81
  boot_tsc          cp866 'Чтение TSC',0
82
  boot_cpufreq      cp866 'Частота процессора ','    ',' МГц',0
82
  boot_cpufreq      cp866 'Частота процессора ','    ',' МГц',0
83
  boot_pal_ega      cp866 'Установка EGA/CGA 320x200 палитры',0
83
  boot_pal_ega      cp866 'Установка EGA/CGA 320x200 палитры',0
84
  boot_pal_vga      cp866 'Установка VGA 640x480 палитры',0
84
  boot_pal_vga      cp866 'Установка VGA 640x480 палитры',0
85
  boot_failed       cp866 'Загрузка первого приложения не удалась',0
85
  boot_failed       cp866 'Загрузка первого приложения не удалась',0
86
  boot_mtrr         cp866 'Установка MTRR',0
86
  boot_mtrr         cp866 'Установка MTRR',0
87
 
87
 
88
  boot_APIC_found   cp866 'APIC включен', 0
88
  boot_APIC_found   cp866 'APIC включен', 0
89
  boot_APIC_nfound  cp866 'APIC не найден', 0
89
  boot_APIC_nfound  cp866 'APIC не найден', 0
90
if preboot_blogesc
90
if preboot_blogesc
91
  boot_tasking      cp866 'Все готово для запуска, нажмитре ESC для старта',0
91
  boot_tasking      cp866 'Все готово для запуска, нажмитре ESC для старта',0
92
end if
92
end if
93
else if lang eq sp
93
else if lang eq sp
94
  include 'data32sp.inc'
94
  include 'data32sp.inc'
95
else if lang eq et
95
else if lang eq et
96
  include 'data32et.inc'
96
  include 'data32et.inc'
97
else
97
else
98
  boot_initirq      db   'Initialize IRQ',0
98
  boot_initirq      db   'Initialize IRQ',0
99
  boot_picinit      db   'Initialize PIC',0
99
  boot_picinit      db   'Initialize PIC',0
100
  boot_v86machine   db   'Initialize system V86 machine',0
100
  boot_v86machine   db   'Initialize system V86 machine',0
101
  boot_inittimer    db   'Initialize system timer (IRQ0)',0
101
  boot_inittimer    db   'Initialize system timer (IRQ0)',0
102
  boot_initramdisk  db   'Initialize ramdisk',0
102
  boot_initramdisk  db   'Initialize ramdisk',0
103
  boot_initapic     db   'Try to initialize APIC',0
103
  boot_initapic     db   'Try to initialize APIC',0
104
  boot_enableirq    db   'Enable interrupts 2, 13',0
104
  boot_enableirq    db   'Enable interrupts 2, 13',0
105
  boot_disabling_ide db   'Disable interrupts in IDE controller',0
105
  boot_disabling_ide db   'Disable interrupts in IDE controller',0
106
  boot_enabling_ide db   'Enable interrupts in IDE controller',0
106
  boot_enabling_ide db   'Enable interrupts in IDE controller',0
107
  boot_set_int_IDE  db   'Set handler of interrupts for IDE',0
107
  boot_set_int_IDE  db   'Set handler of interrupts for IDE',0
108
  boot_detectfloppy db   'Search floppy drives',0
108
  boot_detectfloppy db   'Search floppy drives',0
109
  boot_detecthdcd   db   'Search hard drives and ATAPI drives',0
109
  boot_detecthdcd   db   'Search hard drives and ATAPI drives',0
110
  boot_getcache     db   'Get memory for cache',0
110
  boot_getcache     db   'Get memory for cache',0
111
  boot_detectpart   db   'Search partitions on disk devices',0
111
  boot_detectpart   db   'Search partitions on disk devices',0
112
  boot_init_sys     db   'Initialize system directory /sys',0
112
  boot_init_sys     db   'Initialize system directory /sys',0
113
  boot_loadlibs     db   'Loading librares (.obj)',0
113
  boot_loadlibs     db   'Loading librares (.obj)',0
114
  boot_memdetect    db   'Determining amount of memory',0
114
  boot_memdetect    db   'Determining amount of memory',0
115
  boot_tss          db   'Setting TSSs',0
115
  boot_tss          db   'Setting TSSs',0
116
  boot_cpuid        db   'Reading CPUIDs',0
116
  boot_cpuid        db   'Reading CPUIDs',0
117
;  boot_devices      db   'Detecting devices',0
117
;  boot_devices      db   'Detecting devices',0
118
  boot_setmouse     db   'Setting mouse',0
118
  boot_setmouse     db   'Setting mouse',0
119
  boot_windefs      db   'Setting window defaults',0
119
  boot_windefs      db   'Setting window defaults',0
120
  boot_bgr          db   'Calculating background',0
120
  boot_bgr          db   'Calculating background',0
121
  boot_resirqports  db   'Reserving IRQs & ports',0
121
  boot_resirqports  db   'Reserving IRQs & ports',0
122
  boot_setostask    db   'Setting OS task',0
122
  boot_setostask    db   'Setting OS task',0
123
  boot_allirqs      db   'Unmasking IRQs',0
123
  boot_allirqs      db   'Unmasking IRQs',0
124
  boot_tsc          db   'Reading TSC',0
124
  boot_tsc          db   'Reading TSC',0
125
  boot_cpufreq      db   'CPU frequency is ','    ',' MHz',0
125
  boot_cpufreq      db   'CPU frequency is ','    ',' MHz',0
126
  boot_pal_ega      db   'Setting EGA/CGA 320x200 palette',0
126
  boot_pal_ega      db   'Setting EGA/CGA 320x200 palette',0
127
  boot_pal_vga      db   'Setting VGA 640x480 palette',0
127
  boot_pal_vga      db   'Setting VGA 640x480 palette',0
128
  boot_failed       db   'Failed to start first app',0
128
  boot_failed       db   'Failed to start first app',0
129
  boot_mtrr         db   'Setting MTRR',0
129
  boot_mtrr         db   'Setting MTRR',0
130
 
130
 
131
  boot_APIC_found   db   'APIC enabled', 0
131
  boot_APIC_found   db   'APIC enabled', 0
132
  boot_APIC_nfound  db   'APIC not found', 0
132
  boot_APIC_nfound  db   'APIC not found', 0
133
if preboot_blogesc
133
if preboot_blogesc
134
  boot_tasking      db   'All set - press ESC to start',0
134
  boot_tasking      db   'All set - press ESC to start',0
135
end if
135
end if
136
end if
136
end if
137
 
137
 
138
;new_process_loading db 'K : New Process - loading',13,10,0
138
;new_process_loading db 'K : New Process - loading',13,10,0
139
;new_process_running db 'K : New Process - done',13,10,0
139
;new_process_running db 'K : New Process - done',13,10,0
140
start_not_enough_memory db 'K : New Process - not enough memory',13,10,0
140
start_not_enough_memory db 'K : New Process - not enough memory',13,10,0
141
 
141
 
142
msg_unresolved db 'unresolved ',0
142
msg_unresolved db 'unresolved ',0
143
;msg_module     db 'in module ',0
143
;msg_module     db 'in module ',0
144
;if ~ lang eq sp
144
;if ~ lang eq sp
145
;msg_version    db 'incompatible driver version',13,10,0
145
;msg_version    db 'incompatible driver version',13,10,0
146
;msg_www        db 'please visit www.kolibrios.org',13,10,0
146
;msg_www        db 'please visit www.kolibrios.org',13,10,0
147
;end if
147
;end if
148
msg_CR         db  13,10,0
148
msg_CR         db  13,10,0
149
 
149
 
150
szPS2MDriver    db '/sys/drivers/PS2MOUSE.SYS',0
150
szPS2MDriver    db '/sys/drivers/PS2MOUSE.SYS',0
151
;szCOM_MDriver   db 'COM_MOUSE',0
151
;szCOM_MDriver   db 'COM_MOUSE',0
152
szVidintel      db '/sys/drivers/vidintel.sys',0
152
szVidintel      db '/sys/drivers/vidintel.sys',0
153
szUSB           db 'USB',0
153
szUSB           db 'USB',0
154
 
154
 
155
szEXPORTS      db 'EXPORTS',0
155
szEXPORTS      db 'EXPORTS',0
156
sz_EXPORTS     db '_EXPORTS',0
156
sz_EXPORTS     db '_EXPORTS',0
157
 
157
 
158
szIMPORTS      db 'IMPORTS',0
158
szIMPORTS      db 'IMPORTS',0
159
 
159
 
160
read_firstapp  db '/sys/'
160
read_firstapp  db '/sys/'
161
firstapp       db '/sys/LAUNCHER',0
161
firstapp       db '/sys/LAUNCHER',0
162
notifyapp      db '/sys/@notify',0
162
notifyapp      db '/sys/@notify',0
163
if lang eq ru
163
if lang eq ru
164
ud_user_message  cp866 'Ошибка: неподдерживаемая инструкция процессора',0
164
ud_user_message  cp866 'Ошибка: неподдерживаемая инструкция процессора',0
165
mtrr_user_message cp866 '"Обнаружена проблема с конфигурацией MTRR.\nПроизводительность может быть пониженной" -dW',0
165
mtrr_user_message cp866 '"Обнаружена проблема с конфигурацией MTRR.\nПроизводительность может быть пониженной" -dW',0
166
else if ~ lang eq sp
166
else if ~ lang eq sp
167
ud_user_message db 'Error: unsupported processor instruction',0
167
ud_user_message db 'Error: unsupported processor instruction',0
168
mtrr_user_message db '"There is a problem with MTRR configuration.\nPerformance can be low" -dW',0
168
mtrr_user_message db '"There is a problem with MTRR configuration.\nPerformance can be low" -dW',0
169
end if
169
end if
170
 
170
 
171
kernel_file_load:
171
kernel_file_load:
172
; load kernel.mnt to _CLEAN_ZONE
172
; load kernel.mnt to _CLEAN_ZONE
173
        dd      0       ; subfunction
173
        dd      0       ; subfunction
174
        dq      0       ; offset in file
174
        dq      0       ; offset in file
175
        dd      0x31000 ; number of bytes to read
175
        dd      0x31000 ; number of bytes to read
176
        dd      _CLEAN_ZONE ; buffer for data
176
        dd      _CLEAN_ZONE ; buffer for data
177
        db      '/sys/KERNEL.MNT',0
177
        db      '/sys/KERNEL.MNT',0
178
 
178
 
179
dev_data_path  db '/RD/1/DRIVERS/DEVICES.DAT',0
179
dev_data_path  db '/RD/1/DRIVERS/DEVICES.DAT',0
180
; { Patch by Coldy, For DLL autoload
180
; { Patch by Coldy, For DLL autoload
181
dll_lib_path  db '/RD/1/LIB/DLL.OBJ',0
181
dll_lib_path  db '/RD/1/LIB/DLL.OBJ',0
182
dll_error_msg db '"DLL.OBJ not found!\nTerminate application!" -dE',0   
182
dll_error_msg db '"DLL.OBJ not found!\nTerminate application!" -dE',0   
183
; } End patch by Coldy, For DLL autoload
183
; } End patch by Coldy, For DLL autoload
-
 
184
pe_loader_usermode db '/rd/1/lib/kolibri.dll',0
-
 
185
 
184
align 4
186
align 4
185
 
187
 
186
shmem_list:
188
shmem_list:
187
 .bk           dd shmem_list
189
 .bk           dd shmem_list
188
 .fd           dd shmem_list
190
 .fd           dd shmem_list
189
 
191
 
190
dll_list:
192
pe_list:
191
 .bk           dd dll_list
193
 .bk           dd pe_list
192
 .fd           dd dll_list
194
 .fd           dd pe_list
193
 
195
 
194
pcidev_list:
196
pcidev_list:
195
 .bk           dd pcidev_list
197
 .bk           dd pcidev_list
196
 .fd           dd pcidev_list
198
 .fd           dd pcidev_list
197
 
199
 
198
MAX_DEFAULT_DLL_ADDR = 0x80000000
200
shared_locked_list:
199
MIN_DEFAULT_DLL_ADDR = 0x70000000
201
               dd shared_locked_list
200
dll_cur_addr   dd MIN_DEFAULT_DLL_ADDR
202
               dd shared_locked_list
201
 
203
 
202
; supported videomodes
204
; supported videomodes
203
 
205
 
204
 
206
 
205
; mike.dld {
207
; mike.dld {
206
;db 0
208
;db 0
207
;dd servetable-0x10000
209
;dd servetable-0x10000
208
;align 4
210
;align 4
209
;draw_line       dd __sys_draw_line
211
;draw_line       dd __sys_draw_line
210
;draw_pointer    dd __sys_draw_pointer
212
;draw_pointer    dd __sys_draw_pointer
211
;//mike.dld, 2006-08-02 [
213
;//mike.dld, 2006-08-02 [
212
;;drawbar         dd __sys_drawbar
214
;;drawbar         dd __sys_drawbar
213
;;drawbar         dd __sys_drawbar.forced
215
;;drawbar         dd __sys_drawbar.forced
214
;drawbar         dd vesa20_drawbar
216
;drawbar         dd vesa20_drawbar
215
;//mike.dld, 2006-08-02 ]
217
;//mike.dld, 2006-08-02 ]
216
;putpixel        dd __sys_putpixel
218
;putpixel        dd __sys_putpixel
217
; } mike.dld
219
; } mike.dld
218
 
220
 
219
 
221
 
220
align 4
222
align 4
221
keyboard   dd 1
223
keyboard   dd 1
222
 
224
 
223
if lang eq en
225
if lang eq en
224
  SYSLANG = 1
226
  SYSLANG = 1
225
else if lang eq fi
227
else if lang eq fi
226
  SYSLANG = 2
228
  SYSLANG = 2
227
else if lang eq de
229
else if lang eq de
228
  SYSLANG = 3
230
  SYSLANG = 3
229
else if lang eq ru
231
else if lang eq ru
230
  SYSLANG = 4
232
  SYSLANG = 4
231
else if lang eq fr
233
else if lang eq fr
232
  SYSLANG = 5
234
  SYSLANG = 5
233
else if lang eq et
235
else if lang eq et
234
  SYSLANG = 6
236
  SYSLANG = 6
235
else if lang eq sp
237
else if lang eq sp
236
  SYSLANG = 7
238
  SYSLANG = 7
237
else if lang eq it
239
else if lang eq it
238
  SYSLANG = 8
240
  SYSLANG = 8
239
else if lang eq ca
241
else if lang eq ca
240
  SYSLANG = 9
242
  SYSLANG = 9
241
else
243
else
242
  display 'unsupported language specified',13,10
244
  display 'unsupported language specified',13,10
243
end if
245
end if
244
syslang    dd SYSLANG
246
syslang    dd SYSLANG
245
 
247
 
246
boot_y     dd 10
248
boot_y     dd 10
247
 
249
 
248
pci_bios_entry  dd 0
250
pci_bios_entry  dd 0
249
                dw pci_code_sel
251
                dw pci_code_sel
250
 
252
 
251
if __DEBUG__ eq 1
253
if __DEBUG__ eq 1
252
  include_debug_strings
254
  include_debug_strings
253
end if
255
end if
254
 
256
 
255
IncludeIGlobals
257
IncludeIGlobals
256
 
258
 
257
align 16
259
align 16
258
gdts:
260
gdts:
259
 
261
 
260
        dw     gdte-$-1
262
        dw     gdte-$-1
261
        dd     gdts
263
        dd     gdts
262
        dw     0
264
        dw     0
263
 
265
 
264
; Attention! Do not change the order of the first four selectors. They are used in Fast System Call
266
; Attention! Do not change the order of the first four selectors. They are used in Fast System Call
265
; must be : os_code, os_data, app_code, app_data, ....
267
; must be : os_code, os_data, app_code, app_data, ....
266
 
268
 
267
int_code_l:
269
int_code_l:
268
os_code_l:
270
os_code_l:
269
        dw     0xffff
271
        dw     0xffff
270
        dw     0x0000
272
        dw     0x0000
271
        db     0x00
273
        db     0x00
272
        dw     11011111b *256 +10011010b
274
        dw     11011111b *256 +10011010b
273
        db     0x00
275
        db     0x00
274
 
276
 
275
int_data_l:
277
int_data_l:
276
os_data_l:
278
os_data_l:
277
        dw     0xffff
279
        dw     0xffff
278
        dw     0x0000
280
        dw     0x0000
279
        db     0x00
281
        db     0x00
280
        dw     11011111b *256 +10010010b
282
        dw     11011111b *256 +10010010b
281
        db     0x00
283
        db     0x00
282
 
284
 
283
app_code_l:
285
app_code_l:
284
        dw 0xFFFF
286
        dw 0xFFFF
285
        dw 0
287
        dw 0
286
        db 0
288
        db 0
287
        db cpl3
289
        db cpl3
288
        dw G32+D32+0xF;
290
        dw G32+D32+0xF;
289
 
291
 
290
app_data_l:
292
app_data_l:
291
        dw 0xFFFF
293
        dw 0xFFFF
292
        dw 0
294
        dw 0
293
        db 0
295
        db 0
294
        db drw3
296
        db drw3
295
        dw G32+D32+0xF;
297
        dw G32+D32+0xF;
296
 
298
 
297
; ------------- PCI BIOS ------------------
299
; ------------- PCI BIOS ------------------
298
 
300
 
299
pci_code_32:
301
pci_code_32:
300
        dw 0         ;lim  0-15
302
        dw 0         ;lim  0-15
301
        dw 0         ;base 0-15
303
        dw 0         ;base 0-15
302
        db 0         ;base 16-23
304
        db 0         ;base 16-23
303
        db cpl0      ;type
305
        db cpl0      ;type
304
        db D32       ;lim 16-19+props
306
        db D32       ;lim 16-19+props
305
        db 0         ;base 24-31
307
        db 0         ;base 24-31
306
 
308
 
307
pci_data_32:
309
pci_data_32:
308
        dw 0         ;lim  0-15
310
        dw 0         ;lim  0-15
309
        dw 0         ;base 0-15
311
        dw 0         ;base 0-15
310
        db 0         ;base 16-23
312
        db 0         ;base 16-23
311
        db dpl0      ;type
313
        db dpl0      ;type
312
        db D32       ;lim 16-19+props
314
        db D32       ;lim 16-19+props
313
        db 0         ;base 24-31
315
        db 0         ;base 24-31
314
 
316
 
315
; --------------- APM ---------------------
317
; --------------- APM ---------------------
316
apm_code_32:
318
apm_code_32:
317
        dw     0x0f        ; limit 64kb
319
        dw     0x0f        ; limit 64kb
318
        db     0, 0, 0
320
        db     0, 0, 0
319
        dw     11010000b *256 +10011010b
321
        dw     11010000b *256 +10011010b
320
        db     0x00
322
        db     0x00
321
apm_code_16:
323
apm_code_16:
322
        dw     0x0f
324
        dw     0x0f
323
        db     0, 0, 0
325
        db     0, 0, 0
324
        dw     10010000b *256 +10011010b
326
        dw     10010000b *256 +10011010b
325
        db     0x00
327
        db     0x00
326
apm_data_16:
328
apm_data_16:
327
        dw     0x0f
329
        dw     0x0f
328
        db     0, 0, 0
330
        db     0, 0, 0
329
        dw     10010000b *256 +10010010b
331
        dw     10010000b *256 +10010010b
330
        db     0x00
332
        db     0x00
331
; -----------------------------------------
333
; -----------------------------------------
332
 
334
 
333
graph_data_l:
335
graph_data_l:
334
 
336
 
335
        dw     0x7ff
337
        dw     0x7ff
336
        dw     0x0000
338
        dw     0x0000
337
        db     0x00
339
        db     0x00
338
        dw     11010000b *256 +11110010b
340
        dw     11010000b *256 +11110010b
339
        db     0x00
341
        db     0x00
340
tss0_l:
342
tss0_l:
341
        dw     sizeof.TSS-1
343
        dw     sizeof.TSS-1
342
        dw     tss and 0xFFFF
344
        dw     tss and 0xFFFF
343
        db     (tss shr 16) and 0xFF
345
        db     (tss shr 16) and 0xFF
344
        db     10001001b
346
        db     10001001b
345
        dw     (tss shr 16) and 0xFF00
347
        dw     (tss shr 16) and 0xFF00
346
 
348
 
347
tls_data_l:
349
tls_data_l:
348
        dw 0x0FFF
350
        dw 0x0FFF
349
        dw 0
351
        dw 0
350
        db 0
352
        db 0
351
        db drw3
353
        db drw3
352
        dw D32
354
        dw D32
353
 
355
 
354
gdte:
356
gdte:
355
 
357
 
356
diff16 "end of .data segment",0,$
358
diff16 "end of .data segment",0,$
357
endofcode:
359
endofcode:
358
 
360
 
359
align 16
361
align 16
360
cur_saved_data:
362
cur_saved_data:
361
        rb  4096
363
        rb  4096
362
align 64
364
align 64
363
fpu_data:
365
fpu_data:
364
        rb  0xa80       ; bochs avx512
366
        rb  0xa80       ; bochs avx512
365
fpu_data_size = $ - fpu_data
367
fpu_data_size = $ - fpu_data
366
draw_data:
368
draw_data:
367
        rb  32*256
369
        rb  32*256
368
BPSLine_calc_area   rd  MAX_SCREEN_HEIGHT
370
BPSLine_calc_area   rd  MAX_SCREEN_HEIGHT
369
d_width_calc_area   rd  MAX_SCREEN_HEIGHT
371
d_width_calc_area   rd  MAX_SCREEN_HEIGHT
370
mouseunder          rd  16*24
372
mouseunder          rd  16*24
371
 
373
 
372
mem_block_list      rd  64*2
374
mem_block_list      rd  64*2
373
mem_used_list       rd  64*2
375
mem_used_list       rd  64*2
374
mem_hash_cnt        rd  64
376
mem_hash_cnt        rd  64
375
 
377
 
376
thr_slot_map        rd  8
378
thr_slot_map        rd  8
377
 
379
 
378
_display            display_t
380
_display            display_t
379
bios_fb             FRB
381
bios_fb             FRB
380
 
382
 
381
mst                 MEM_STATE
383
mst                 MEM_STATE
382
 
384
 
383
cpu_freq            dq  ?
385
cpu_freq            dq  ?
384
 
386
 
385
heap_mutex          MUTEX
387
heap_mutex          MUTEX
386
heap_size           dd  ?
388
heap_size           dd  ?
387
heap_free           dd  ?
389
heap_free           dd  ?
388
heap_blocks         dd  ?
390
heap_blocks         dd  ?
389
free_blocks         dd  ?
391
free_blocks         dd  ?
390
mem_block_mask      rd  2
392
mem_block_mask      rd  2
391
next_memblock       dd  ?
393
next_memblock       dd  ?
392
 
394
 
393
pte_valid_mask      dd  ?
395
pte_valid_mask      dd  ?
394
page_start          dd  ?
396
page_start          dd  ?
395
page_end            dd  ?
397
page_end            dd  ?
396
sys_page_map        dd  ?
398
sys_page_map        dd  ?
397
os_stack_seg        dd  ?
399
os_stack_seg        dd  ?
398
 
400
 
399
srv.fd              dd  ?
401
srv.fd              dd  ?
400
srv.bk              dd  ?
402
srv.bk              dd  ?
-
 
403
 
-
 
404
shmem_list_mutex    MUTEX
-
 
405
pe_list_mutex       MUTEX
-
 
406
shared_locked_mutex MUTEX
-
 
407
proc_mem_mutex      MUTEX
-
 
408
ipc_mutex           MUTEX
401
 
409
 
402
LFBAddress          dd  ?
410
LFBAddress          dd  ?
403
 
411
 
404
PUTPIXEL            dd  ?
412
PUTPIXEL            dd  ?
405
GETPIXEL            dd  ?
413
GETPIXEL            dd  ?
406
 
414
 
407
if VESA_1_2_VIDEO
415
if VESA_1_2_VIDEO
408
BANK_SWITCH         dd  ?   ; reserved for vesa 1.2
416
BANK_SWITCH         dd  ?   ; reserved for vesa 1.2
409
BANK_RW             dd  ?
417
BANK_RW             dd  ?
410
end if
418
end if
411
 
419
 
412
MOUSE_PICTURE       dd  ?
420
MOUSE_PICTURE       dd  ?
413
 
421
 
414
def_cursor          dd  ?
422
def_cursor          dd  ?
415
def_cursor_clock    dd  ?
423
def_cursor_clock    dd  ?
416
current_cursor      dd  ?
424
current_cursor      dd  ?
417
hw_cursor           dd  ?
425
hw_cursor           dd  ?
418
cur_saved_base      dd  ?
426
cur_saved_base      dd  ?
419
 
427
 
420
cur.lock            dd  ?   ; 1 - lock update, 2- hide
428
cur.lock            dd  ?   ; 1 - lock update, 2- hide
421
cur.left            dd  ?   ; cursor clip box
429
cur.left            dd  ?   ; cursor clip box
422
cur.top             dd  ?
430
cur.top             dd  ?
423
cur.w               dd  ?
431
cur.w               dd  ?
424
cur.h               dd  ?
432
cur.h               dd  ?
425
 
433
 
426
ipc_tmp             dd  ?
434
ipc_tmp             dd  ?
427
ipc_pdir            dd  ?
435
ipc_pdir            dd  ?
428
ipc_ptab            dd  ?
436
ipc_ptab            dd  ?
429
 
437
 
430
proc_mem_map        dd  ?
438
proc_mem_map        dd  ?
431
proc_mem_pdir       dd  ?
439
proc_mem_pdir       dd  ?
432
proc_mem_tab        dd  ?
440
proc_mem_tab        dd  ?
433
 
441
 
434
tmp_task_ptab       dd  ?
442
tmp_task_ptab       dd  ?
-
 
443
zero_page_tab       dd  ?
435
 
444
 
436
default_io_map      dd  ?
445
default_io_map      dd  ?
437
 
446
 
438
LFBSize             dd  ?
447
LFBSize             dd  ?
439
 
448
 
440
current_process     dd  ?
449
current_process     dd  ?
441
current_slot        dd  ?   ; pointer to APPDATA of current thread
450
current_slot        dd  ?   ; pointer to APPDATA of current thread
442
current_slot_idx    dd  ?   ; index of current thread slot
451
current_slot_idx    dd  ?   ; index of current thread slot
443
thread_count        dd  ?
452
thread_count        dd  ?
444
 
453
 
445
; device addresses
454
; device addresses
446
mididp  dd  ?
455
mididp  dd  ?
447
midisp  dd  ?
456
midisp  dd  ?
448
 
457
 
449
cdbase  dd  ?
458
cdbase  dd  ?
450
cdid    dd  ?
459
cdid    dd  ?
451
 
460
 
452
hdbase  dd  ?   ; for boot 0x1f0
461
hdbase  dd  ?   ; for boot 0x1f0
453
hdid    dd  ?
462
hdid    dd  ?
454
hdpos   dd  ?   ; for boot 0x1
463
hdpos   dd  ?   ; for boot 0x1
455
cdpos   dd  ?
464
cdpos   dd  ?
456
 
465
 
457
;CPUID information
466
;CPUID information
458
cpu_vendor  rd  3
467
cpu_vendor  rd  3
459
cpu_sign    dd  ?
468
cpu_sign    dd  ?
460
cpu_info    dd  ?
469
cpu_info    dd  ?
461
cpu_caps    rd  4
470
cpu_caps    rd  4
462
 
471
 
463
xsave_area_size dd ?
472
xsave_area_size dd ?
464
xsave_eax       dd ?
473
xsave_eax       dd ?
465
xsave_edx       dd ?
474
xsave_edx       dd ?
466
 
475
 
467
pg_data     PG_DATA
476
pg_data     PG_DATA
468
heap_test   dd  ?
477
heap_test   dd  ?
469
 
478
 
470
skin_data   dd  ?
479
skin_data   dd  ?
471
 
480
 
472
mouse_active    dd  ?
481
mouse_active    dd  ?
473
mouse_pause     dd  ?
482
mouse_pause     dd  ?
474
 
483
 
475
BgrDrawMode     dd  ?
484
BgrDrawMode     dd  ?
476
BgrDataWidth    dd  ?
485
BgrDataWidth    dd  ?
477
BgrDataHeight   dd  ?
486
BgrDataHeight   dd  ?
478
 
487
 
479
buttontype          dd  ?
488
buttontype          dd  ?
480
windowtypechanged   dd  ?
489
windowtypechanged   dd  ?
481
 
490
 
482
debug_step_pointer  dd  ?
491
debug_step_pointer  dd  ?
483
 
492
 
484
lba_read_enabled    dd  ?   ; 0 = disabled , 1 = enabled
493
lba_read_enabled    dd  ?   ; 0 = disabled , 1 = enabled
485
pci_access_enabled  dd  ?   ; 0 = disabled , 1 = enabled
494
pci_access_enabled  dd  ?   ; 0 = disabled , 1 = enabled
486
 
495
 
487
NumBiosDisks        dd  ?
496
NumBiosDisks        dd  ?
488
BiosDisksData       rb  200h    ; struct BiosDiskData
497
BiosDisksData       rb  200h    ; struct BiosDiskData
489
BiosDiskCaches      rb  80h*(cache_ide1-cache_ide0)
498
BiosDiskCaches      rb  80h*(cache_ide1-cache_ide0)
490
BiosDiskPartitions  rd  80h
499
BiosDiskPartitions  rd  80h
491
 
500
 
492
img_background          dd  ?
501
img_background          dd  ?
493
mem_BACKGROUND          dd  ?
502
mem_BACKGROUND          dd  ?
494
static_background_data  dd  ?
503
static_background_data  dd  ?
495
 
504
 
496
hd1_status              dd  ?   ; 0 - free : other - pid
505
hd1_status              dd  ?   ; 0 - free : other - pid
497
application_table_owner dd  ?   ; 0 - free : other - pid
506
application_table_owner dd  ?   ; 0 - free : other - pid
498
application_table_mutex MUTEX
507
application_table_mutex MUTEX
499
 
508
 
500
redrawmouse_unconditional   dd  ?
509
redrawmouse_unconditional   dd  ?
501
 
510
 
502
MOUSE_SCROLL_H  rw  1
511
MOUSE_SCROLL_H  rw  1
503
MOUSE_X:        rw  1
512
MOUSE_X:        rw  1
504
MOUSE_Y:        rw  1
513
MOUSE_Y:        rw  1
505
MOUSE_SCROLL_V  rw  1
514
MOUSE_SCROLL_V  rw  1
506
 
515
 
507
X_UNDER         rw  1
516
X_UNDER         rw  1
508
Y_UNDER         rw  1
517
Y_UNDER         rw  1
509
COLOR_TEMP      dd  ?
518
COLOR_TEMP      dd  ?
510
MOUSE_COLOR_MEM dd  ?
519
MOUSE_COLOR_MEM dd  ?
511
 
520
 
512
SCR_MODE    rw  2
521
SCR_MODE    rw  2
513
 
522
 
514
BTN_DOWN:   rb  4
523
BTN_DOWN:   rb  4
515
 
524
 
516
cpu_phys_addr_width db  ?   ; also known as MAXPHYADDR in Intel manuals
525
cpu_phys_addr_width db  ?   ; also known as MAXPHYADDR in Intel manuals
517
hdd_appl_data       db  ?   ; 0 = system cache, 1 - application cache
526
hdd_appl_data       db  ?   ; 0 = system cache, 1 - application cache
518
cd_appl_data        db  ?   ; 0 = system cache, 1 - application cache
527
cd_appl_data        db  ?   ; 0 = system cache, 1 - application cache
519
 
528
 
520
timer_ticks_enable  db  ?  ; for cd driver
529
timer_ticks_enable  db  ?  ; for cd driver
521
 
530
 
522
REDRAW_BACKGROUND   db  ?
531
REDRAW_BACKGROUND   db  ?
523
 
532
 
524
align 16
533
align 16
525
DRIVE_DATA: rb  DRIVE_DATA_SIZE
534
DRIVE_DATA: rb  DRIVE_DATA_SIZE
526
 
535
 
527
IncludeUGlobals
536
IncludeUGlobals
528
 
537
 
529
uglobals_size = $ - endofcode
538
uglobals_size = $ - endofcode
530
 
539
 
531
if ~ lang eq sp
540
if ~ lang eq sp
532
diff16 "end of .bss",0,$
541
diff16 "end of .bss",0,$
533
end if
542
end if
534
 
543
 
535
; check if kernel fits memmap
544
; check if kernel fits memmap
536
assert $-OS_BASE+0x1000 < TMP_STACK_TOP
545
assert $-OS_BASE+0x1000 < TMP_STACK_TOP
537
 
546
 
538
org (OS_BASE+0x0100000)
547
org (OS_BASE+0x0100000)
539
 
548
 
540
; Currently size of memory allocated for the ramdisk is fixed.
549
; Currently size of memory allocated for the ramdisk is fixed.
541
; This should be revisited when/if memory map would become more dynamic.
550
; This should be revisited when/if memory map would become more dynamic.
542
RAMDISK_CAPACITY = 2880 ; in sectors
551
RAMDISK_CAPACITY = 2880 ; in sectors
543
 
552
 
544
RAMDISK:
553
RAMDISK:
545
        rb  RAMDISK_CAPACITY*512
554
        rb  RAMDISK_CAPACITY*512
546
 
555
 
547
_CLEAN_ZONE:
556
_CLEAN_ZONE:
548
CLEAN_ZONE = _CLEAN_ZONE - OS_BASE
557
CLEAN_ZONE = _CLEAN_ZONE - OS_BASE
549
 
558
 
550
BgrAuxTable     rb  32768
559
BgrAuxTable     rb  32768
551
align 65536
560
align 65536
552
SB16Buffer      rb  65536
561
SB16Buffer      rb  65536
553
 
562
 
554
align 4096
563
align 4096
555
BUTTON_INFO     rb  64*1024
564
BUTTON_INFO     rb  64*1024
556
RESERVED_PORTS:
565
RESERVED_PORTS:
557
        rb  64*1024
566
        rb  64*1024
558
sys_pgmap:
567
sys_pgmap:
559
        rb  1024*1024/8
568
        rb  1024*1024/8
560
>
569
>