Subversion Repositories Kolibri OS

Rev

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

Rev 4608 Rev 4700
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;                                                              ;;
2
;;                                                              ;;
3
;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2004-2012. 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: 4608 $
8
$Revision: 4700 $
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
szHwMouse       db 'ATI2D',0
150
szHwMouse       db 'ATI2D',0
151
szPS2MDriver    db 'PS2MOUSE',0
151
szPS2MDriver    db 'PS2MOUSE',0
152
;szCOM_MDriver   db 'COM_MOUSE',0
152
;szCOM_MDriver   db 'COM_MOUSE',0
153
szVidintel      db 'vidintel',0
153
szVidintel      db 'vidintel',0
154
szUSB           db 'USB',0
154
szUSB           db 'USB',0
155
szAtiHW         db '/rd/1/drivers/ati2d.drv',0
155
szAtiHW         db '/rd/1/drivers/ati2d.drv',0
156
 
156
 
157
szSTART        db 'START',0
157
szSTART        db 'START',0
158
szEXPORTS      db 'EXPORTS',0
158
szEXPORTS      db 'EXPORTS',0
159
sz_EXPORTS     db '_EXPORTS',0
159
sz_EXPORTS     db '_EXPORTS',0
160
 
160
 
161
szIMPORTS      db 'IMPORTS',0
161
szIMPORTS      db 'IMPORTS',0
162
 
162
 
163
read_firstapp  db '/sys/'
163
read_firstapp  db '/sys/'
164
firstapp       db  'LAUNCHER',0
164
firstapp       db  'LAUNCHER',0
165
notifyapp      db '@notify',0
165
notifyapp      db '@notify',0
166
if lang eq ru
166
if lang eq ru
167
ud_user_message  cp866 'Ошибка: неподдерживаемая инструкция процессора',0
167
ud_user_message  cp866 'Ошибка: неподдерживаемая инструкция процессора',0
168
mtrr_user_message cp866 'Обнаружена проблема с конфигурацией MTRR.',13,10,'Производительность может быть пониженной~a',0
168
mtrr_user_message cp866 'Обнаружена проблема с конфигурацией MTRR.',13,10,'Производительность может быть пониженной~a',0
169
else if ~ lang eq sp
169
else if ~ lang eq sp
170
ud_user_message db 'Error: unsupported processor instruction',0
170
ud_user_message db 'Error: unsupported processor instruction',0
171
mtrr_user_message db 'There is a problem with MTRR configuration.',13,10,'Performance can be low~a',0
171
mtrr_user_message db 'There is a problem with MTRR configuration.',13,10,'Performance can be low~a',0
172
end if
172
end if
173
 
173
 
174
vmode          db  '/sys/drivers/VMODE.MDR',0
174
vmode          db  '/sys/drivers/VMODE.MDR',0
175
;vrr_m          db  'VRR_M',0
175
;vrr_m          db  'VRR_M',0
176
kernel_file_load:
176
kernel_file_load:
177
; load kernel.mnt to 0x7000:0
177
; load kernel.mnt to 0x7000:0
178
        dd      0       ; subfunction
178
        dd      0       ; subfunction
179
        dq      0       ; offset in file
179
        dq      0       ; offset in file
180
        dd      0x30000 ; number of bytes to read
180
        dd      0x30000 ; number of bytes to read
181
        dd      OS_BASE + 0x70000 ; buffer for data
181
        dd      OS_BASE + 0x70000 ; buffer for data
182
        db      '/RD/1/KERNEL.MNT',0
182
        db      '/RD/1/KERNEL.MNT',0
183
 
183
 
184
dev_data_path  db '/RD/1/DRIVERS/DEVICES.DAT',0
184
dev_data_path  db '/RD/1/DRIVERS/DEVICES.DAT',0
185
 
185
 
186
align 4
186
align 4
187
 
187
 
188
shmem_list:
188
shmem_list:
189
 .bk           dd shmem_list
189
 .bk           dd shmem_list
190
 .fd           dd shmem_list
190
 .fd           dd shmem_list
191
 
191
 
192
dll_list:
192
dll_list:
193
 .bk           dd dll_list
193
 .bk           dd dll_list
194
 .fd           dd dll_list
194
 .fd           dd dll_list
195
 
195
 
196
pcidev_list:
196
pcidev_list:
197
 .bk           dd pcidev_list
197
 .bk           dd pcidev_list
198
 .fd           dd pcidev_list
198
 .fd           dd pcidev_list
199
 
199
 
200
MAX_DEFAULT_DLL_ADDR = 0x80000000
200
MAX_DEFAULT_DLL_ADDR = 0x80000000
201
MIN_DEFAULT_DLL_ADDR = 0x70000000
201
MIN_DEFAULT_DLL_ADDR = 0x70000000
202
dll_cur_addr   dd MIN_DEFAULT_DLL_ADDR
202
dll_cur_addr   dd MIN_DEFAULT_DLL_ADDR
203
 
203
 
204
; supported videomodes
204
; supported videomodes
205
 
205
 
206
 
206
 
207
; mike.dld {
207
; mike.dld {
208
;db 0
208
;db 0
209
;dd servetable-0x10000
209
;dd servetable-0x10000
210
;align 4
210
;align 4
211
;draw_line       dd __sys_draw_line
211
;draw_line       dd __sys_draw_line
212
;draw_pointer    dd __sys_draw_pointer
212
;draw_pointer    dd __sys_draw_pointer
213
;//mike.dld, 2006-08-02 [
213
;//mike.dld, 2006-08-02 [
214
;;drawbar         dd __sys_drawbar
214
;;drawbar         dd __sys_drawbar
215
;;drawbar         dd __sys_drawbar.forced
215
;;drawbar         dd __sys_drawbar.forced
216
;drawbar         dd vesa20_drawbar
216
;drawbar         dd vesa20_drawbar
217
;//mike.dld, 2006-08-02 ]
217
;//mike.dld, 2006-08-02 ]
218
;putpixel        dd __sys_putpixel
218
;putpixel        dd __sys_putpixel
219
; } mike.dld
219
; } mike.dld
220
 
220
 
221
 
221
 
222
align 4
222
align 4
223
keyboard   dd 1
223
keyboard   dd 1
224
syslang    dd 1
224
syslang    dd 1
225
 
225
 
226
boot_y     dd 10
226
boot_y     dd 10
227
 
227
 
228
pci_bios_entry  dd 0
228
pci_bios_entry  dd 0
229
                dw pci_code_sel
229
                dw pci_code_sel
230
 
230
 
231
if __DEBUG__ eq 1
231
if __DEBUG__ eq 1
232
  include_debug_strings
232
  include_debug_strings
233
end if
233
end if
234
 
234
 
235
IncludeIGlobals
235
IncludeIGlobals
236
 
236
 
237
align 16
237
align 16
238
gdts:
238
gdts:
239
 
239
 
240
        dw     gdte-$-1
240
        dw     gdte-$-1
241
        dd     gdts
241
        dd     gdts
242
        dw     0
242
        dw     0
243
 
243
 
244
; Attention! Do not change the order of the first four selectors. They are used in Fast System Call
244
; Attention! Do not change the order of the first four selectors. They are used in Fast System Call
245
; must be : os_code, os_data, app_code, app_data, ....
245
; must be : os_code, os_data, app_code, app_data, ....
246
 
246
 
247
int_code_l:
247
int_code_l:
248
os_code_l:
248
os_code_l:
249
        dw     0xffff
249
        dw     0xffff
250
        dw     0x0000
250
        dw     0x0000
251
        db     0x00
251
        db     0x00
252
        dw     11011111b *256 +10011010b
252
        dw     11011111b *256 +10011010b
253
        db     0x00
253
        db     0x00
254
 
254
 
255
int_data_l:
255
int_data_l:
256
os_data_l:
256
os_data_l:
257
        dw     0xffff
257
        dw     0xffff
258
        dw     0x0000
258
        dw     0x0000
259
        db     0x00
259
        db     0x00
260
        dw     11011111b *256 +10010010b
260
        dw     11011111b *256 +10010010b
261
        db     0x00
261
        db     0x00
262
 
262
 
263
app_code_l:
263
app_code_l:
264
        dw 0xFFFF
264
        dw 0xFFFF
265
        dw 0
265
        dw 0
266
        db 0
266
        db 0
267
        db cpl3
267
        db cpl3
268
        dw G32+D32+0xF;
268
        dw G32+D32+0xF;
269
 
269
 
270
app_data_l:
270
app_data_l:
271
        dw 0xFFFF
271
        dw 0xFFFF
272
        dw 0
272
        dw 0
273
        db 0
273
        db 0
274
        db drw3
274
        db drw3
275
        dw G32+D32+0xF;
275
        dw G32+D32+0xF;
276
 
276
 
277
; ------------- PCI BIOS ------------------
277
; ------------- PCI BIOS ------------------
278
 
278
 
279
pci_code_32:
279
pci_code_32:
280
        dw 0         ;lim  0-15
280
        dw 0         ;lim  0-15
281
        dw 0         ;base 0-15
281
        dw 0         ;base 0-15
282
        db 0         ;base 16-23
282
        db 0         ;base 16-23
283
        db cpl0      ;type
283
        db cpl0      ;type
284
        db D32       ;lim 16-19+props
284
        db D32       ;lim 16-19+props
285
        db 0         ;base 24-31
285
        db 0         ;base 24-31
286
 
286
 
287
pci_data_32:
287
pci_data_32:
288
        dw 0         ;lim  0-15
288
        dw 0         ;lim  0-15
289
        dw 0         ;base 0-15
289
        dw 0         ;base 0-15
290
        db 0         ;base 16-23
290
        db 0         ;base 16-23
291
        db dpl0      ;type
291
        db dpl0      ;type
292
        db D32       ;lim 16-19+props
292
        db D32       ;lim 16-19+props
293
        db 0         ;base 24-31
293
        db 0         ;base 24-31
294
 
294
 
295
; --------------- APM ---------------------
295
; --------------- APM ---------------------
296
apm_code_32:
296
apm_code_32:
297
        dw     0x0f        ; limit 64kb
297
        dw     0x0f        ; limit 64kb
298
        db     0, 0, 0
298
        db     0, 0, 0
299
        dw     11010000b *256 +10011010b
299
        dw     11010000b *256 +10011010b
300
        db     0x00
300
        db     0x00
301
apm_code_16:
301
apm_code_16:
302
        dw     0x0f
302
        dw     0x0f
303
        db     0, 0, 0
303
        db     0, 0, 0
304
        dw     10010000b *256 +10011010b
304
        dw     10010000b *256 +10011010b
305
        db     0x00
305
        db     0x00
306
apm_data_16:
306
apm_data_16:
307
        dw     0x0f
307
        dw     0x0f
308
        db     0, 0, 0
308
        db     0, 0, 0
309
        dw     10010000b *256 +10010010b
309
        dw     10010000b *256 +10010010b
310
        db     0x00
310
        db     0x00
311
; -----------------------------------------
311
; -----------------------------------------
312
 
312
 
313
graph_data_l:
313
graph_data_l:
314
 
314
 
315
        dw     0x7ff
315
        dw     0x7ff
316
        dw     0x0000
316
        dw     0x0000
317
        db     0x00
317
        db     0x00
318
        dw     11010000b *256 +11110010b
318
        dw     11010000b *256 +11110010b
319
        db     0x00
319
        db     0x00
320
tss0_l:
320
tss0_l:
321
        dw     sizeof.TSS-1
321
        dw     sizeof.TSS-1
322
        dw     tss and 0xFFFF
322
        dw     tss and 0xFFFF
323
        db     (tss shr 16) and 0xFF
323
        db     (tss shr 16) and 0xFF
324
        db     10001001b
324
        db     10001001b
325
        dw     (tss shr 16) and 0xFF00
325
        dw     (tss shr 16) and 0xFF00
326
 
326
 
327
tls_data_l:
327
tls_data_l:
328
        dw 0x0FFF
328
        dw 0x0FFF
329
        dw 0
329
        dw 0
330
        db 0
330
        db 0
331
        db drw3
331
        db drw3
332
        dw D32
332
        dw D32
333
 
333
 
334
endofcode:
334
endofcode:
335
gdte:
335
gdte:
336
 
336
 
337
diff16 "end of .data segment",0,$
337
diff16 "end of .data segment",0,$
338
 
338
 
339
align 16
339
align 16
340
cur_saved_data:
340
cur_saved_data:
341
                    rb 4096
341
                    rb 4096
342
fpu_data:
342
fpu_data:
343
                    rb 512
343
                    rb 512
344
 
344
 
345
mem_block_list      rd 64*2
345
mem_block_list      rd 64*2
346
mem_used_list       rd 64*2
346
mem_used_list       rd 64*2
347
mem_hash_cnt        rd 64
347
mem_hash_cnt        rd 64
348
 
348
 
349
cpu_freq            rq 1
349
cpu_freq            rq 1
350
 
350
 
351
heap_mutex          MUTEX
351
heap_mutex          MUTEX
352
heap_size           rd 1
352
heap_size           rd 1
353
heap_free           rd 1
353
heap_free           rd 1
354
heap_blocks         rd 1
354
heap_blocks         rd 1
355
free_blocks         rd 1
355
free_blocks         rd 1
356
 
356
 
357
mem_block_mask      rd 2
357
mem_block_mask      rd 2
358
next_memblock       rd 1
358
next_memblock       rd 1
359
 
359
 
360
 
360
 
361
mst                 MEM_STATE
361
mst                 MEM_STATE
362
 
362
 
363
page_start          rd 1
363
page_start          rd 1
364
page_end            rd 1
364
page_end            rd 1
365
sys_page_map        rd 1
365
sys_page_map        rd 1
366
os_stack_seg        rd 1
366
os_stack_seg        rd 1
367
 
367
 
368
 
368
 
369
srv.fd              rd 1
369
srv.fd              rd 1
370
srv.bk              rd 1
370
srv.bk              rd 1
371
 
371
 
372
 
372
 
373
align 16
373
align 16
374
 
374
 
375
_display            display_t
375
_display            display_t
376
 
376
 
377
_WinMapAddress      rd 1
377
_WinMapAddress      rd 1
378
_WinMapSize         rd 1
378
_WinMapSize         rd 1
379
 
379
 
380
LFBAddress          rd 1
380
LFBAddress          rd 1
381
Screen_Max_X        rd 1
381
Screen_Max_X        rd 1
382
Screen_Max_Y        rd 1
382
Screen_Max_Y        rd 1
383
 
383
 
384
SCR_MODE            rw 2
384
SCR_MODE            rw 2
385
 
385
 
386
PUTPIXEL            rd 1
386
PUTPIXEL            rd 1
387
GETPIXEL            rd 1
387
GETPIXEL            rd 1
388
 
388
 
389
if VESA_1_2_VIDEO
389
if VESA_1_2_VIDEO
390
BANK_SWITCH         rd 1  reserved for vesa 1.2
390
BANK_SWITCH         rd 1  reserved for vesa 1.2
391
BANK_RW             rd 1
391
BANK_RW             rd 1
392
end if
392
end if
393
 
393
 
394
REDRAW_BACKGROUND   rb 4
394
REDRAW_BACKGROUND   rb 4
395
 
395
 
396
align 4
396
align 4
397
draw_data:          rb 32*256
397
draw_data:          rb 32*256
398
BPSLine_calc_area   rd 1440
398
BPSLine_calc_area   rd 1440
399
d_width_calc_area   rd 1140
399
d_width_calc_area   rd 1140
400
 
400
 
401
mouseunder          rd 16*24
401
mouseunder          rd 16*24
402
 
402
 
403
MOUSE_PICTURE       rd 1
403
MOUSE_PICTURE       rd 1
404
 
404
 
405
MOUSE_SCROLL_H      rw 1
405
MOUSE_SCROLL_H      rw 1
406
MOUSE_X:            rw 1
406
MOUSE_X:            rw 1
407
MOUSE_Y:            rw 1
407
MOUSE_Y:            rw 1
408
MOUSE_SCROLL_V      rw 1
408
MOUSE_SCROLL_V      rw 1
409
 
409
 
410
X_UNDER             rw 1
410
X_UNDER             rw 1
411
Y_UNDER             rw 1
411
Y_UNDER             rw 1
412
COLOR_TEMP          rd 1
412
COLOR_TEMP          rd 1
413
MOUSE_COLOR_MEM     rd 1
413
MOUSE_COLOR_MEM     rd 1
414
 
414
 
415
BTN_DOWN:           rb 4
415
BTN_DOWN:           rb 4
416
 
416
 
417
align 4
417
align 4
418
def_cursor          rd 1
418
def_cursor          rd 1
419
def_cursor_clock    rd 1
419
def_cursor_clock    rd 1
420
current_cursor      rd 1
420
current_cursor      rd 1
421
hw_cursor           rd 1
421
hw_cursor           rd 1
422
cur_saved_base      rd 1
422
cur_saved_base      rd 1
423
 
423
 
424
cur.lock            rd 1   ;1 - lock update, 2- hide
424
cur.lock            rd 1   ;1 - lock update, 2- hide
425
cur.left            rd 1   ;cursor clip box
425
cur.left            rd 1   ;cursor clip box
426
cur.top             rd 1
426
cur.top             rd 1
427
cur.right           rd 1
427
cur.right           rd 1
428
cur.bottom          rd 1
428
cur.bottom          rd 1
429
cur.w               rd 1
429
cur.w               rd 1
430
cur.h               rd 1
430
cur.h               rd 1
431
 
431
 
432
ipc_tmp             rd 1
432
ipc_tmp             rd 1
433
ipc_pdir            rd 1
433
ipc_pdir            rd 1
434
ipc_ptab            rd 1
434
ipc_ptab            rd 1
435
 
435
 
436
proc_mem_map        rd 1
436
proc_mem_map        rd 1
437
proc_mem_pdir       rd 1
437
proc_mem_pdir       rd 1
438
proc_mem_tab        rd 1
438
proc_mem_tab        rd 1
439
 
439
 
440
tmp_task_pdir       rd 1
440
tmp_task_pdir       rd 1
441
tmp_task_ptab       rd 1
441
tmp_task_ptab       rd 1
442
 
442
 
443
default_io_map      rd 1
443
default_io_map      rd 1
444
 
444
 
445
LFBSize             rd 1
445
LFBSize             rd 1
446
 
446
 
447
current_slot        rd 1
447
current_slot        rd 1
448
 
448
 
449
; status
449
; status
450
hd1_status                      rd 1  ; 0 - free : other - pid
450
hd1_status                      rd 1  ; 0 - free : other - pid
451
application_table_owner         rd 1  ; 0 - free : other - pid
451
application_table_owner         rd 1  ; 0 - free : other - pid
452
application_table_mutex         MUTEX
452
application_table_mutex         MUTEX
453
 
453
 
454
; device addresses
454
; device addresses
455
mididp                          rd 1
455
mididp                          rd 1
456
midisp                          rd 1
456
midisp                          rd 1
457
 
457
 
458
cdbase                          rd 1
458
cdbase                          rd 1
459
cdid                            rd 1
459
cdid                            rd 1
460
 
460
 
461
hdbase                          rd 1    ; for boot 0x1f0
461
hdbase                          rd 1    ; for boot 0x1f0
462
hdid                            rd 1
462
hdid                            rd 1
463
hdpos                           rd 1    ; for boot 0x1
463
hdpos                           rd 1    ; for boot 0x1
464
cdpos                           rd 1
464
cdpos                           rd 1
465
 
465
 
466
;CPUID information
466
;CPUID information
467
cpu_vendor                      rd 3
467
cpu_vendor                      rd 3
468
cpu_sign                        rd 1
468
cpu_sign                        rd 1
469
cpu_info                        rd 1
469
cpu_info                        rd 1
470
cpu_caps                        rd 4
470
cpu_caps                        rd 4
471
 
471
 
472
 
472
 
473
pg_data                         PG_DATA
473
pg_data                         PG_DATA
474
heap_test                       rd 1
474
heap_test                       rd 1
475
 
475
 
476
buttontype                      rd 1
476
buttontype                      rd 1
477
windowtypechanged               rd 1
477
windowtypechanged               rd 1
478
 
478
 
479
hd_entries                      rd 1     ;unused ? 0xfe10
479
hd_entries                      rd 1     ;unused ? 0xfe10
480
 
480
 
481
mouse_active                    rd 1
481
mouse_active                    rd 1
482
mouse_pause                     rd 1
482
mouse_pause                     rd 1
483
 
483
 
484
redrawmouse_unconditional       rd 1
484
redrawmouse_unconditional       rd 1
485
 
485
 
486
img_background                  rd 1
486
img_background                  rd 1
487
mem_BACKGROUND                  rd 1
487
mem_BACKGROUND                  rd 1
488
static_background_data          rd 1
488
static_background_data          rd 1
489
 
489
 
490
BgrDrawMode                     rd 1
490
BgrDrawMode                     rd 1
491
BgrDataWidth                    rd 1
491
BgrDataWidth                    rd 1
492
BgrDataHeight                   rd 1
492
BgrDataHeight                   rd 1
493
 
493
 
494
skin_data                       rd 1
494
skin_data                       rd 1
495
 
-
 
496
cache_ide0:
-
 
497
cache_ide0_pointer              rd 1
-
 
498
cache_ide0_size                 rd 1   ; not use
-
 
499
cache_ide0_data_pointer         rd 1
-
 
500
cache_ide0_system_data_size     rd 1   ; not use
-
 
501
cache_ide0_appl_data_size       rd 1   ; not use
-
 
502
cache_ide0_system_data          rd 1
-
 
503
cache_ide0_appl_data            rd 1
-
 
504
cache_ide0_system_sad_size      rd 1
-
 
505
cache_ide0_appl_sad_size        rd 1
-
 
506
cache_ide0_search_start         rd 1
-
 
507
cache_ide0_appl_search_start    rd 1
-
 
508
 
-
 
509
cache_ide1:
-
 
510
cache_ide1_pointer              rd 1
-
 
511
cache_ide1_size                 rd 1   ; not use
-
 
512
cache_ide1_data_pointer         rd 1
-
 
513
cache_ide1_system_data_size     rd 1   ; not use
-
 
514
cache_ide1_appl_data_size       rd 1   ; not use
-
 
515
cache_ide1_system_data          rd 1
-
 
516
cache_ide1_appl_data            rd 1
-
 
517
cache_ide1_system_sad_size      rd 1
-
 
518
cache_ide1_appl_sad_size        rd 1
-
 
519
cache_ide1_search_start         rd 1
-
 
520
cache_ide1_appl_search_start    rd 1
-
 
521
 
-
 
522
cache_ide2:
-
 
523
cache_ide2_pointer              rd 1
-
 
524
cache_ide2_size                 rd 1   ; not use
-
 
525
cache_ide2_data_pointer         rd 1
-
 
526
cache_ide2_system_data_size     rd 1   ; not use
-
 
527
cache_ide2_appl_data_size       rd 1   ; not use
-
 
528
cache_ide2_system_data          rd 1
-
 
529
cache_ide2_appl_data            rd 1
-
 
530
cache_ide2_system_sad_size      rd 1
-
 
531
cache_ide2_appl_sad_size        rd 1
-
 
532
cache_ide2_search_start         rd 1
-
 
533
cache_ide2_appl_search_start    rd 1
-
 
534
 
-
 
535
cache_ide3:
-
 
536
cache_ide3_pointer              rd 1
-
 
537
cache_ide3_size                 rd 1   ; not use
-
 
538
cache_ide3_data_pointer         rd 1
-
 
539
cache_ide3_system_data_size     rd 1   ; not use
-
 
540
cache_ide3_appl_data_size       rd 1   ; not use
-
 
541
cache_ide3_system_data          rd 1
-
 
542
cache_ide3_appl_data            rd 1
-
 
543
cache_ide3_system_sad_size      rd 1
-
 
544
cache_ide3_appl_sad_size        rd 1
-
 
545
cache_ide3_search_start         rd 1
-
 
546
cache_ide3_appl_search_start    rd 1
-
 
547
 
495
 
548
debug_step_pointer              rd 1
496
debug_step_pointer              rd 1
549
 
497
 
550
lba_read_enabled                rd 1  ; 0 = disabled , 1 = enabled
498
lba_read_enabled                rd 1  ; 0 = disabled , 1 = enabled
551
pci_access_enabled              rd 1  ; 0 = disabled , 1 = enabled
499
pci_access_enabled              rd 1  ; 0 = disabled , 1 = enabled
552
 
500
 
553
cpu_phys_addr_width             rb 1  ; also known as MAXPHYADDR in Intel manuals
501
cpu_phys_addr_width             rb 1  ; also known as MAXPHYADDR in Intel manuals
554
hdd_appl_data                   rb 1  ; 0 = system cache, 1 - application cache
502
hdd_appl_data                   rb 1  ; 0 = system cache, 1 - application cache
555
cd_appl_data                    rb 1  ; 0 = system cache, 1 - application cache
503
cd_appl_data                    rb 1  ; 0 = system cache, 1 - application cache
556
 
504
 
557
timer_ticks_enable              rb 1  ; for cd driver
505
timer_ticks_enable              rb 1  ; for cd driver
558
 
506
 
559
align 4
507
align 4
560
NumBiosDisks                    rd 1
508
NumBiosDisks                    rd 1
561
BiosDisksData                   rb 200h
509
BiosDisksData                   rb 200h
562
BiosDiskCaches                  rb 80h*(cache_ide1-cache_ide0)
510
BiosDiskCaches                  rb 80h*(cache_ide1-cache_ide0)
563
BiosDiskPartitions              rd 80h
511
BiosDiskPartitions              rd 80h
564
 
512
 
565
align 16
513
align 16
566
DRIVE_DATA:                     rb DRIVE_DATA_SIZE
514
DRIVE_DATA:                     rb DRIVE_DATA_SIZE
567
 
515
 
568
IncludeUGlobals
516
IncludeUGlobals
569
 
517
 
570
uglobals_size = $ - endofcode
518
uglobals_size = $ - endofcode
571
 
519
 
572
if ~ lang eq sp
520
if ~ lang eq sp
573
diff16 "end of .bss",0,$
521
diff16 "end of .bss",0,$
574
end if
522
end if
575
 
523
 
576
org (OS_BASE+0x0100000)
524
org (OS_BASE+0x0100000)
577
 
525
 
578
RAMDISK:                        rb 2880*512
526
RAMDISK:                        rb 2880*512
579
                                rb 2856*4               ; not used
527
                                rb 2856*4               ; not used
580
 
528
 
581
_CLEAN_ZONE:
529
_CLEAN_ZONE:
582
 
530
 
583
align 4096
531
align 4096
584
_IDE_DMA                        rb 16*512
532
_IDE_DMA                        rb 16*512
585
BgrAuxTable                     rb 32768
533
BgrAuxTable                     rb 32768
586
BUTTON_INFO                     rb 64*1024
534
BUTTON_INFO                     rb 64*1024
587
RESERVED_PORTS:                 rb 64*1024
535
RESERVED_PORTS:                 rb 64*1024
588
FLOPPY_BUFF:                    rb 18*512           ;one track
536
FLOPPY_BUFF:                    rb 18*512           ;one track
589
 
537
 
590
sys_pgmap:                      rb 1024*1024/8
538
sys_pgmap:                      rb 1024*1024/8
591
>
539
>