Subversion Repositories Kolibri OS

Rev

Rev 8088 | Rev 8285 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8088 Rev 8092
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;                                                              ;;
2
;;                                                              ;;
3
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2004-2015. 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: 8088 $
8
$Revision: 8092 $
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
vmode          db  '/sys/drivers/VMODE.MDR',0
171
vmode          db  '/sys/drivers/VMODE.MDR',0
172
kernel_file_load:
172
kernel_file_load:
173
; load kernel.mnt to _CLEAN_ZONE
173
; load kernel.mnt to _CLEAN_ZONE
174
        dd      0       ; subfunction
174
        dd      0       ; subfunction
175
        dq      0       ; offset in file
175
        dq      0       ; offset in file
176
        dd      0x31000 ; number of bytes to read
176
        dd      0x31000 ; number of bytes to read
177
        dd      _CLEAN_ZONE ; buffer for data
177
        dd      _CLEAN_ZONE ; buffer for data
178
        db      '/sys/KERNEL.MNT',0
178
        db      '/sys/KERNEL.MNT',0
179
 
179
 
180
dev_data_path  db '/sys/DRIVERS/DEVICES.DAT',0
180
dev_data_path  db '/RD/1/DRIVERS/DEVICES.DAT',0
181
 
181
 
182
align 4
182
align 4
183
 
183
 
184
shmem_list:
184
shmem_list:
185
 .bk           dd shmem_list
185
 .bk           dd shmem_list
186
 .fd           dd shmem_list
186
 .fd           dd shmem_list
187
 
187
 
188
dll_list:
188
dll_list:
189
 .bk           dd dll_list
189
 .bk           dd dll_list
190
 .fd           dd dll_list
190
 .fd           dd dll_list
191
 
191
 
192
pcidev_list:
192
pcidev_list:
193
 .bk           dd pcidev_list
193
 .bk           dd pcidev_list
194
 .fd           dd pcidev_list
194
 .fd           dd pcidev_list
195
 
195
 
196
MAX_DEFAULT_DLL_ADDR = 0x80000000
196
MAX_DEFAULT_DLL_ADDR = 0x80000000
197
MIN_DEFAULT_DLL_ADDR = 0x70000000
197
MIN_DEFAULT_DLL_ADDR = 0x70000000
198
dll_cur_addr   dd MIN_DEFAULT_DLL_ADDR
198
dll_cur_addr   dd MIN_DEFAULT_DLL_ADDR
199
 
199
 
200
; supported videomodes
200
; supported videomodes
201
 
201
 
202
 
202
 
203
; mike.dld {
203
; mike.dld {
204
;db 0
204
;db 0
205
;dd servetable-0x10000
205
;dd servetable-0x10000
206
;align 4
206
;align 4
207
;draw_line       dd __sys_draw_line
207
;draw_line       dd __sys_draw_line
208
;draw_pointer    dd __sys_draw_pointer
208
;draw_pointer    dd __sys_draw_pointer
209
;//mike.dld, 2006-08-02 [
209
;//mike.dld, 2006-08-02 [
210
;;drawbar         dd __sys_drawbar
210
;;drawbar         dd __sys_drawbar
211
;;drawbar         dd __sys_drawbar.forced
211
;;drawbar         dd __sys_drawbar.forced
212
;drawbar         dd vesa20_drawbar
212
;drawbar         dd vesa20_drawbar
213
;//mike.dld, 2006-08-02 ]
213
;//mike.dld, 2006-08-02 ]
214
;putpixel        dd __sys_putpixel
214
;putpixel        dd __sys_putpixel
215
; } mike.dld
215
; } mike.dld
216
 
216
 
217
 
217
 
218
align 4
218
align 4
219
keyboard   dd 1
219
keyboard   dd 1
220
 
220
 
221
if lang eq en
221
if lang eq en
222
  SYSLANG = 1
222
  SYSLANG = 1
223
else if lang eq fi
223
else if lang eq fi
224
  SYSLANG = 2
224
  SYSLANG = 2
225
else if lang eq de
225
else if lang eq de
226
  SYSLANG = 3
226
  SYSLANG = 3
227
else if lang eq ru
227
else if lang eq ru
228
  SYSLANG = 4
228
  SYSLANG = 4
229
else if lang eq fr
229
else if lang eq fr
230
  SYSLANG = 5
230
  SYSLANG = 5
231
else if lang eq et
231
else if lang eq et
232
  SYSLANG = 6
232
  SYSLANG = 6
233
else if lang eq sp
233
else if lang eq sp
234
  SYSLANG = 7
234
  SYSLANG = 7
235
else if lang eq it
235
else if lang eq it
236
  SYSLANG = 8
236
  SYSLANG = 8
237
else if lang eq ca
237
else if lang eq ca
238
  SYSLANG = 9
238
  SYSLANG = 9
239
else
239
else
240
  display 'unsupported language specified',13,10
240
  display 'unsupported language specified',13,10
241
end if
241
end if
242
syslang    dd SYSLANG
242
syslang    dd SYSLANG
243
 
243
 
244
boot_y     dd 10
244
boot_y     dd 10
245
 
245
 
246
pci_bios_entry  dd 0
246
pci_bios_entry  dd 0
247
                dw pci_code_sel
247
                dw pci_code_sel
248
 
248
 
249
if __DEBUG__ eq 1
249
if __DEBUG__ eq 1
250
  include_debug_strings
250
  include_debug_strings
251
end if
251
end if
252
 
252
 
253
IncludeIGlobals
253
IncludeIGlobals
254
 
254
 
255
align 16
255
align 16
256
gdts:
256
gdts:
257
 
257
 
258
        dw     gdte-$-1
258
        dw     gdte-$-1
259
        dd     gdts
259
        dd     gdts
260
        dw     0
260
        dw     0
261
 
261
 
262
; Attention! Do not change the order of the first four selectors. They are used in Fast System Call
262
; Attention! Do not change the order of the first four selectors. They are used in Fast System Call
263
; must be : os_code, os_data, app_code, app_data, ....
263
; must be : os_code, os_data, app_code, app_data, ....
264
 
264
 
265
int_code_l:
265
int_code_l:
266
os_code_l:
266
os_code_l:
267
        dw     0xffff
267
        dw     0xffff
268
        dw     0x0000
268
        dw     0x0000
269
        db     0x00
269
        db     0x00
270
        dw     11011111b *256 +10011010b
270
        dw     11011111b *256 +10011010b
271
        db     0x00
271
        db     0x00
272
 
272
 
273
int_data_l:
273
int_data_l:
274
os_data_l:
274
os_data_l:
275
        dw     0xffff
275
        dw     0xffff
276
        dw     0x0000
276
        dw     0x0000
277
        db     0x00
277
        db     0x00
278
        dw     11011111b *256 +10010010b
278
        dw     11011111b *256 +10010010b
279
        db     0x00
279
        db     0x00
280
 
280
 
281
app_code_l:
281
app_code_l:
282
        dw 0xFFFF
282
        dw 0xFFFF
283
        dw 0
283
        dw 0
284
        db 0
284
        db 0
285
        db cpl3
285
        db cpl3
286
        dw G32+D32+0xF;
286
        dw G32+D32+0xF;
287
 
287
 
288
app_data_l:
288
app_data_l:
289
        dw 0xFFFF
289
        dw 0xFFFF
290
        dw 0
290
        dw 0
291
        db 0
291
        db 0
292
        db drw3
292
        db drw3
293
        dw G32+D32+0xF;
293
        dw G32+D32+0xF;
294
 
294
 
295
; ------------- PCI BIOS ------------------
295
; ------------- PCI BIOS ------------------
296
 
296
 
297
pci_code_32:
297
pci_code_32:
298
        dw 0         ;lim  0-15
298
        dw 0         ;lim  0-15
299
        dw 0         ;base 0-15
299
        dw 0         ;base 0-15
300
        db 0         ;base 16-23
300
        db 0         ;base 16-23
301
        db cpl0      ;type
301
        db cpl0      ;type
302
        db D32       ;lim 16-19+props
302
        db D32       ;lim 16-19+props
303
        db 0         ;base 24-31
303
        db 0         ;base 24-31
304
 
304
 
305
pci_data_32:
305
pci_data_32:
306
        dw 0         ;lim  0-15
306
        dw 0         ;lim  0-15
307
        dw 0         ;base 0-15
307
        dw 0         ;base 0-15
308
        db 0         ;base 16-23
308
        db 0         ;base 16-23
309
        db dpl0      ;type
309
        db dpl0      ;type
310
        db D32       ;lim 16-19+props
310
        db D32       ;lim 16-19+props
311
        db 0         ;base 24-31
311
        db 0         ;base 24-31
312
 
312
 
313
; --------------- APM ---------------------
313
; --------------- APM ---------------------
314
apm_code_32:
314
apm_code_32:
315
        dw     0x0f        ; limit 64kb
315
        dw     0x0f        ; limit 64kb
316
        db     0, 0, 0
316
        db     0, 0, 0
317
        dw     11010000b *256 +10011010b
317
        dw     11010000b *256 +10011010b
318
        db     0x00
318
        db     0x00
319
apm_code_16:
319
apm_code_16:
320
        dw     0x0f
320
        dw     0x0f
321
        db     0, 0, 0
321
        db     0, 0, 0
322
        dw     10010000b *256 +10011010b
322
        dw     10010000b *256 +10011010b
323
        db     0x00
323
        db     0x00
324
apm_data_16:
324
apm_data_16:
325
        dw     0x0f
325
        dw     0x0f
326
        db     0, 0, 0
326
        db     0, 0, 0
327
        dw     10010000b *256 +10010010b
327
        dw     10010000b *256 +10010010b
328
        db     0x00
328
        db     0x00
329
; -----------------------------------------
329
; -----------------------------------------
330
 
330
 
331
graph_data_l:
331
graph_data_l:
332
 
332
 
333
        dw     0x7ff
333
        dw     0x7ff
334
        dw     0x0000
334
        dw     0x0000
335
        db     0x00
335
        db     0x00
336
        dw     11010000b *256 +11110010b
336
        dw     11010000b *256 +11110010b
337
        db     0x00
337
        db     0x00
338
tss0_l:
338
tss0_l:
339
        dw     sizeof.TSS-1
339
        dw     sizeof.TSS-1
340
        dw     tss and 0xFFFF
340
        dw     tss and 0xFFFF
341
        db     (tss shr 16) and 0xFF
341
        db     (tss shr 16) and 0xFF
342
        db     10001001b
342
        db     10001001b
343
        dw     (tss shr 16) and 0xFF00
343
        dw     (tss shr 16) and 0xFF00
344
 
344
 
345
tls_data_l:
345
tls_data_l:
346
        dw 0x0FFF
346
        dw 0x0FFF
347
        dw 0
347
        dw 0
348
        db 0
348
        db 0
349
        db drw3
349
        db drw3
350
        dw D32
350
        dw D32
351
 
351
 
352
gdte:
352
gdte:
353
 
353
 
354
diff16 "end of .data segment",0,$
354
diff16 "end of .data segment",0,$
355
endofcode:
355
endofcode:
356
 
356
 
357
align 16
357
align 16
358
cur_saved_data:
358
cur_saved_data:
359
        rb  4096
359
        rb  4096
360
align 64
360
align 64
361
fpu_data:
361
fpu_data:
362
        rb  0xa80       ; bochs avx512
362
        rb  0xa80       ; bochs avx512
363
fpu_data_size = $ - fpu_data
363
fpu_data_size = $ - fpu_data
364
draw_data:
364
draw_data:
365
        rb  32*256
365
        rb  32*256
366
BPSLine_calc_area   rd  MAX_SCREEN_HEIGHT
366
BPSLine_calc_area   rd  MAX_SCREEN_HEIGHT
367
d_width_calc_area   rd  MAX_SCREEN_HEIGHT
367
d_width_calc_area   rd  MAX_SCREEN_HEIGHT
368
mouseunder          rd  16*24
368
mouseunder          rd  16*24
369
 
369
 
370
mem_block_list      rd  64*2
370
mem_block_list      rd  64*2
371
mem_used_list       rd  64*2
371
mem_used_list       rd  64*2
372
mem_hash_cnt        rd  64
372
mem_hash_cnt        rd  64
373
 
373
 
374
thr_slot_map        rd  8
374
thr_slot_map        rd  8
375
 
375
 
376
_display            display_t
376
_display            display_t
377
bios_fb             FRB
377
bios_fb             FRB
378
 
378
 
379
mst                 MEM_STATE
379
mst                 MEM_STATE
380
 
380
 
381
cpu_freq            dq  ?
381
cpu_freq            dq  ?
382
 
382
 
383
heap_mutex          MUTEX
383
heap_mutex          MUTEX
384
heap_size           dd  ?
384
heap_size           dd  ?
385
heap_free           dd  ?
385
heap_free           dd  ?
386
heap_blocks         dd  ?
386
heap_blocks         dd  ?
387
free_blocks         dd  ?
387
free_blocks         dd  ?
388
mem_block_mask      rd  2
388
mem_block_mask      rd  2
389
next_memblock       dd  ?
389
next_memblock       dd  ?
390
 
390
 
391
pte_valid_mask      dd  ?
391
pte_valid_mask      dd  ?
392
page_start          dd  ?
392
page_start          dd  ?
393
page_end            dd  ?
393
page_end            dd  ?
394
sys_page_map        dd  ?
394
sys_page_map        dd  ?
395
os_stack_seg        dd  ?
395
os_stack_seg        dd  ?
396
 
396
 
397
srv.fd              dd  ?
397
srv.fd              dd  ?
398
srv.bk              dd  ?
398
srv.bk              dd  ?
399
 
399
 
400
LFBAddress          dd  ?
400
LFBAddress          dd  ?
401
 
401
 
402
PUTPIXEL            dd  ?
402
PUTPIXEL            dd  ?
403
GETPIXEL            dd  ?
403
GETPIXEL            dd  ?
404
 
404
 
405
if VESA_1_2_VIDEO
405
if VESA_1_2_VIDEO
406
BANK_SWITCH         dd  ?   ; reserved for vesa 1.2
406
BANK_SWITCH         dd  ?   ; reserved for vesa 1.2
407
BANK_RW             dd  ?
407
BANK_RW             dd  ?
408
end if
408
end if
409
 
409
 
410
MOUSE_PICTURE       dd  ?
410
MOUSE_PICTURE       dd  ?
411
 
411
 
412
def_cursor          dd  ?
412
def_cursor          dd  ?
413
def_cursor_clock    dd  ?
413
def_cursor_clock    dd  ?
414
current_cursor      dd  ?
414
current_cursor      dd  ?
415
hw_cursor           dd  ?
415
hw_cursor           dd  ?
416
cur_saved_base      dd  ?
416
cur_saved_base      dd  ?
417
 
417
 
418
cur.lock            dd  ?   ; 1 - lock update, 2- hide
418
cur.lock            dd  ?   ; 1 - lock update, 2- hide
419
cur.left            dd  ?   ; cursor clip box
419
cur.left            dd  ?   ; cursor clip box
420
cur.top             dd  ?
420
cur.top             dd  ?
421
cur.w               dd  ?
421
cur.w               dd  ?
422
cur.h               dd  ?
422
cur.h               dd  ?
423
 
423
 
424
ipc_tmp             dd  ?
424
ipc_tmp             dd  ?
425
ipc_pdir            dd  ?
425
ipc_pdir            dd  ?
426
ipc_ptab            dd  ?
426
ipc_ptab            dd  ?
427
 
427
 
428
proc_mem_map        dd  ?
428
proc_mem_map        dd  ?
429
proc_mem_pdir       dd  ?
429
proc_mem_pdir       dd  ?
430
proc_mem_tab        dd  ?
430
proc_mem_tab        dd  ?
431
 
431
 
432
tmp_task_ptab       dd  ?
432
tmp_task_ptab       dd  ?
433
 
433
 
434
default_io_map      dd  ?
434
default_io_map      dd  ?
435
 
435
 
436
LFBSize             dd  ?
436
LFBSize             dd  ?
437
 
437
 
438
current_process     dd  ?
438
current_process     dd  ?
439
current_slot        dd  ?   ; i.e. cureent thread
439
current_slot        dd  ?   ; i.e. cureent thread
440
 
440
 
441
; device addresses
441
; device addresses
442
mididp  dd  ?
442
mididp  dd  ?
443
midisp  dd  ?
443
midisp  dd  ?
444
 
444
 
445
cdbase  dd  ?
445
cdbase  dd  ?
446
cdid    dd  ?
446
cdid    dd  ?
447
 
447
 
448
hdbase  dd  ?   ; for boot 0x1f0
448
hdbase  dd  ?   ; for boot 0x1f0
449
hdid    dd  ?
449
hdid    dd  ?
450
hdpos   dd  ?   ; for boot 0x1
450
hdpos   dd  ?   ; for boot 0x1
451
cdpos   dd  ?
451
cdpos   dd  ?
452
 
452
 
453
;CPUID information
453
;CPUID information
454
cpu_vendor  rd  3
454
cpu_vendor  rd  3
455
cpu_sign    dd  ?
455
cpu_sign    dd  ?
456
cpu_info    dd  ?
456
cpu_info    dd  ?
457
cpu_caps    rd  4
457
cpu_caps    rd  4
458
 
458
 
459
xsave_area_size dd ?
459
xsave_area_size dd ?
460
xsave_eax       dd ?
460
xsave_eax       dd ?
461
xsave_edx       dd ?
461
xsave_edx       dd ?
462
 
462
 
463
pg_data     PG_DATA
463
pg_data     PG_DATA
464
heap_test   dd  ?
464
heap_test   dd  ?
465
 
465
 
466
skin_data   dd  ?
466
skin_data   dd  ?
467
 
467
 
468
mouse_active    dd  ?
468
mouse_active    dd  ?
469
mouse_pause     dd  ?
469
mouse_pause     dd  ?
470
 
470
 
471
BgrDrawMode     dd  ?
471
BgrDrawMode     dd  ?
472
BgrDataWidth    dd  ?
472
BgrDataWidth    dd  ?
473
BgrDataHeight   dd  ?
473
BgrDataHeight   dd  ?
474
 
474
 
475
buttontype          dd  ?
475
buttontype          dd  ?
476
windowtypechanged   dd  ?
476
windowtypechanged   dd  ?
477
 
477
 
478
debug_step_pointer  dd  ?
478
debug_step_pointer  dd  ?
479
 
479
 
480
lba_read_enabled    dd  ?   ; 0 = disabled , 1 = enabled
480
lba_read_enabled    dd  ?   ; 0 = disabled , 1 = enabled
481
pci_access_enabled  dd  ?   ; 0 = disabled , 1 = enabled
481
pci_access_enabled  dd  ?   ; 0 = disabled , 1 = enabled
482
 
482
 
483
NumBiosDisks        dd  ?
483
NumBiosDisks        dd  ?
484
BiosDisksData       rb  200h    ; struct BiosDiskData
484
BiosDisksData       rb  200h    ; struct BiosDiskData
485
BiosDiskCaches      rb  80h*(cache_ide1-cache_ide0)
485
BiosDiskCaches      rb  80h*(cache_ide1-cache_ide0)
486
BiosDiskPartitions  rd  80h
486
BiosDiskPartitions  rd  80h
487
 
487
 
488
img_background          dd  ?
488
img_background          dd  ?
489
mem_BACKGROUND          dd  ?
489
mem_BACKGROUND          dd  ?
490
static_background_data  dd  ?
490
static_background_data  dd  ?
491
 
491
 
492
hd1_status              dd  ?   ; 0 - free : other - pid
492
hd1_status              dd  ?   ; 0 - free : other - pid
493
application_table_owner dd  ?   ; 0 - free : other - pid
493
application_table_owner dd  ?   ; 0 - free : other - pid
494
application_table_mutex MUTEX
494
application_table_mutex MUTEX
495
 
495
 
496
redrawmouse_unconditional   dd  ?
496
redrawmouse_unconditional   dd  ?
497
 
497
 
498
MOUSE_SCROLL_H  rw  1
498
MOUSE_SCROLL_H  rw  1
499
MOUSE_X:        rw  1
499
MOUSE_X:        rw  1
500
MOUSE_Y:        rw  1
500
MOUSE_Y:        rw  1
501
MOUSE_SCROLL_V  rw  1
501
MOUSE_SCROLL_V  rw  1
502
 
502
 
503
X_UNDER         rw  1
503
X_UNDER         rw  1
504
Y_UNDER         rw  1
504
Y_UNDER         rw  1
505
COLOR_TEMP      dd  ?
505
COLOR_TEMP      dd  ?
506
MOUSE_COLOR_MEM dd  ?
506
MOUSE_COLOR_MEM dd  ?
507
 
507
 
508
SCR_MODE    rw  2
508
SCR_MODE    rw  2
509
 
509
 
510
BTN_DOWN:   rb  4
510
BTN_DOWN:   rb  4
511
 
511
 
512
cpu_phys_addr_width db  ?   ; also known as MAXPHYADDR in Intel manuals
512
cpu_phys_addr_width db  ?   ; also known as MAXPHYADDR in Intel manuals
513
hdd_appl_data       db  ?   ; 0 = system cache, 1 - application cache
513
hdd_appl_data       db  ?   ; 0 = system cache, 1 - application cache
514
cd_appl_data        db  ?   ; 0 = system cache, 1 - application cache
514
cd_appl_data        db  ?   ; 0 = system cache, 1 - application cache
515
 
515
 
516
timer_ticks_enable  db  ?  ; for cd driver
516
timer_ticks_enable  db  ?  ; for cd driver
517
 
517
 
518
REDRAW_BACKGROUND   db  ?
518
REDRAW_BACKGROUND   db  ?
519
 
519
 
520
align 16
520
align 16
521
DRIVE_DATA: rb  DRIVE_DATA_SIZE
521
DRIVE_DATA: rb  DRIVE_DATA_SIZE
522
 
522
 
523
IncludeUGlobals
523
IncludeUGlobals
524
 
524
 
525
uglobals_size = $ - endofcode
525
uglobals_size = $ - endofcode
526
 
526
 
527
if ~ lang eq sp
527
if ~ lang eq sp
528
diff16 "end of .bss",0,$
528
diff16 "end of .bss",0,$
529
end if
529
end if
530
 
530
 
531
; check if kernel fits memmap
531
; check if kernel fits memmap
532
assert $-OS_BASE+0x1000 < TMP_STACK_TOP
532
assert $-OS_BASE+0x1000 < TMP_STACK_TOP
533
 
533
 
534
org (OS_BASE+0x0100000)
534
org (OS_BASE+0x0100000)
535
 
535
 
536
; Currently size of memory allocated for the ramdisk is fixed.
536
; Currently size of memory allocated for the ramdisk is fixed.
537
; This should be revisited when/if memory map would become more dynamic.
537
; This should be revisited when/if memory map would become more dynamic.
538
RAMDISK_CAPACITY = 2880 ; in sectors
538
RAMDISK_CAPACITY = 2880 ; in sectors
539
 
539
 
540
RAMDISK:
540
RAMDISK:
541
        rb  RAMDISK_CAPACITY*512
541
        rb  RAMDISK_CAPACITY*512
542
 
542
 
543
_CLEAN_ZONE:
543
_CLEAN_ZONE:
544
CLEAN_ZONE = _CLEAN_ZONE - OS_BASE
544
CLEAN_ZONE = _CLEAN_ZONE - OS_BASE
545
 
545
 
546
BgrAuxTable     rb  32768
546
BgrAuxTable     rb  32768
547
align 65536
547
align 65536
548
SB16Buffer      rb  65536
548
SB16Buffer      rb  65536
549
 
549
 
550
align 4096
550
align 4096
551
BUTTON_INFO     rb  64*1024
551
BUTTON_INFO     rb  64*1024
552
RESERVED_PORTS:
552
RESERVED_PORTS:
553
        rb  64*1024
553
        rb  64*1024
554
sys_pgmap:
554
sys_pgmap:
555
        rb  1024*1024/8
555
        rb  1024*1024/8
556
>
556
>