Rev 3555 | Rev 3626 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3555 | Rev 3589 | ||
---|---|---|---|
Line 69... | Line 69... | ||
69 | format binary as "mnt" |
69 | format binary as "mnt" |
Line 70... | Line 70... | ||
70 | 70 | ||
71 | include 'macros.inc' |
71 | include 'macros.inc' |
Line 72... | Line 72... | ||
72 | include 'struct.inc' |
72 | include 'struct.inc' |
Line 73... | Line 73... | ||
73 | 73 | ||
Line 74... | Line 74... | ||
74 | $Revision: 3555 $ |
74 | $Revision: 3589 $ |
75 | 75 | ||
76 | 76 | ||
77 | USE_COM_IRQ equ 1 ; make irq 3 and irq 4 available for PCI devices |
77 | USE_COM_IRQ equ 1 ; make irq 3 and irq 4 available for PCI devices |
Line 78... | Line 78... | ||
78 | 78 | ||
79 | ; Enabling the next line will enable serial output console |
79 | ; Enabling the next line will enable serial output console |
Line 161... | Line 161... | ||
161 | 161 | ||
162 | include "boot/bootcode.inc" ; 16 bit system boot code |
162 | include "boot/bootcode.inc" ; 16 bit system boot code |
163 | include "bus/pci/pci16.inc" |
163 | include "bus/pci/pci16.inc" |
Line 164... | Line -... | ||
164 | include "detect/biosdisk.inc" |
- | |
165 | - | ||
166 | FDD_BUFF equ (OS_BASE+0x000D000) |
- | |
167 | - | ||
168 | sys_pgdir equ (OS_BASE+0x006F000) |
- | |
169 | - | ||
170 | VGABasePtr equ (OS_BASE+0x00A0000) |
- | |
171 | - | ||
172 | RAMDISK equ (OS_BASE+0x0100000) |
- | |
173 | - | ||
174 | CLEAN_ZONE equ 0x284000 |
- | |
175 | IDE_DMA equ 0x284000 |
- | |
176 | - | ||
177 | BOOT_VAR equ (OS_BASE+0x02E0000) |
- | |
178 | - | ||
179 | TASK_COUNT equ (CURRENT_TASK+0x04) |
- | |
180 | TASK_BASE equ (CURRENT_TASK+0x10) |
- | |
181 | TASK_DATA equ (CURRENT_TASK+0x20) |
- | |
182 | TASK_EVENT equ (CURRENT_TASK+0x20) |
- | |
183 | - | ||
184 | BPSLine_calc_area equ (OS_BASE+0x02C4000) |
- | |
185 | - | ||
186 | d_width_calc_area equ (OS_BASE+0x02CA000) |
- | |
187 | - | ||
188 | stack_data_start equ (OS_BASE+0x02F0000) |
- | |
189 | eth_data_start equ (OS_BASE+0x02F0000) |
- | |
190 | stack_data equ (OS_BASE+0x02F4000) |
- | |
191 | stack_data_end equ (OS_BASE+0x030ffff) |
- | |
192 | resendQ equ (OS_BASE+0x0310000) |
- | |
193 | 164 | include "detect/biosdisk.inc" |
|
194 | 165 | ||
195 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
166 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
196 | ;; ;; |
167 | ;; ;; |
197 | ;; SWITCH TO 32 BIT PROTECTED MODE ;; |
168 | ;; SWITCH TO 32 BIT PROTECTED MODE ;; |
Line 432... | Line 403... | ||
432 | mov [_display.height], eax |
403 | mov [_display.height], eax |
433 | mov [display_height_standard], eax |
404 | mov [display_height_standard], eax |
434 | dec eax |
405 | dec eax |
435 | mov [Screen_Max_Y], eax |
406 | mov [Screen_Max_Y], eax |
436 | mov [screen_workarea.bottom], eax |
407 | mov [screen_workarea.bottom], eax |
437 | mov ax, word [BOOT_VAR+BOOT_VESA_MODE] ; screen mode |
408 | movzx eax, word [BOOT_VAR+BOOT_VESA_MODE]; screen mode |
438 | mov [SCR_MODE], ax |
409 | mov [SCR_MODE], eax |
- | 410 | ; mov eax, [BOOT_VAR+0x9014] ; Vesa 1.2 bnk sw add |
|
- | 411 | ; mov [BANK_SWITCH], eax |
|
439 | mov [BytesPerScanLine], 640*4 ; Bytes PerScanLine |
412 | mov [BytesPerScanLine], word 640*4 ; Bytes PerScanLine |
440 | cmp [SCR_MODE], 0x13 ; 320x200 |
413 | cmp [SCR_MODE], word 0x13 ; 320x200 |
441 | je @f |
414 | je @f |
442 | cmp [SCR_MODE], 0x12 ; VGA 640x480 |
415 | cmp [SCR_MODE], word 0x12 ; VGA 640x480 |
443 | je @f |
416 | je @f |
444 | movzx eax, word[BOOT_VAR+BOOT_PITCH] ; for other modes |
417 | movzx eax, word[BOOT_VAR+BOOT_PITCH] ; for other modes |
445 | mov [BytesPerScanLine], eax |
418 | mov [BytesPerScanLine], ax |
446 | mov [_display.pitch], eax |
419 | mov [_display.pitch], eax |
447 | @@: |
420 | @@: |
448 | mov eax, [_display.width] |
421 | mov eax, [_display.width] |
449 | mul [_display.height] |
422 | mul [_display.height] |
450 | mov [_WinMapSize], eax |
423 | mov [_WinMapSize], eax |
Line 1266... | Line 1239... | ||
1266 | call wakeup_osloop |
1239 | call wakeup_osloop |
Line 1267... | Line 1240... | ||
1267 | 1240 | ||
1268 | xor eax, eax |
1241 | xor eax, eax |
Line -... | Line 1242... | ||
- | 1242 | mov [BTN_ADDR], dword BUTTON_INFO ; address of button list |
|
1269 | mov [BTN_ADDR], dword BUTTON_INFO ; address of button list |
1243 | |
1270 | 1244 | mov byte [MOUSE_BUFF_COUNT], al ; mouse buffer |
|
1271 | mov byte [KEY_COUNT], al ; keyboard buffer |
1245 | mov byte [KEY_COUNT], al ; keyboard buffer |
Line 1272... | Line 1246... | ||
1272 | mov byte [BTN_COUNT], al ; button buffer |
1246 | mov byte [BTN_COUNT], al ; button buffer |
Line 4993... | Line 4967... | ||
4993 | 4967 | ||
4994 | 4968 | ||
4995 | .1: ; resolution |
4969 | .1: ; resolution |
4996 | mov eax, [Screen_Max_X] |
4970 | mov eax, [Screen_Max_X] |
4997 | shl eax, 16 |
4971 | shl eax, 16 |
4998 | mov ax, word [Screen_Max_Y] |
4972 | mov ax, [Screen_Max_Y] |
4999 | add eax, 0x00010001 |
4973 | add eax, 0x00010001 |
5000 | mov [esp+32], eax |
4974 | mov [esp+32], eax |
5001 | ret |
4975 | ret |
Line 5092... | Line 5066... | ||
5092 | .drectr: |
5066 | .drectr: |
5093 | ret |
5067 | ret |
Line 5094... | Line 5068... | ||
5094 | 5068 | ||
5095 | align 4 |
5069 | align 4 |
5096 | syscall_getscreensize: ; GetScreenSize |
5070 | syscall_getscreensize: ; GetScreenSize |
5097 | mov eax, [Screen_Max_X] |
5071 | mov ax, [Screen_Max_X] |
5098 | shl eax, 16 |
5072 | shl eax, 16 |
5099 | mov ax, word [Screen_Max_Y] |
5073 | mov ax, [Screen_Max_Y] |
5100 | mov [esp + 32], eax |
5074 | mov [esp + 32], eax |
Line 5101... | Line 5075... | ||
5101 | ret |
5075 | ret |