Subversion Repositories Kolibri OS

Rev

Rev 2434 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2434 Rev 2441
Line 155... Line 155...
155
; set up esp
155
; set up esp
156
        movzx   esp, sp
156
        movzx   esp, sp
Line 157... Line 157...
157
 
157
 
158
        push    0
158
        push    0
159
        pop     es
159
        pop     es
160
        and     word [es:0x9031], 0
160
        and     word [es:BOOT_IDE_BASE_ADDR], 0
161
; \begin{Mario79}
161
; \begin{Mario79}
162
; find HDD IDE DMA PCI device
162
; find HDD IDE DMA PCI device
163
; check for PCI BIOS
163
; check for PCI BIOS
164
        mov     ax, 0xB101
164
        mov     ax, 0xB101
Line 192... Line 192...
192
        mov     ax, 0xB10A
192
        mov     ax, 0xB10A
193
        mov     di, 0x20        ; memory base is config register at 0x20
193
        mov     di, 0x20        ; memory base is config register at 0x20
194
        int     0x1A
194
        int     0x1A
195
        jc      .nopci
195
        jc      .nopci
196
        and     cx, 0xFFF0      ; clear address decode type
196
        and     cx, 0xFFF0      ; clear address decode type
197
        mov     [es:0x9031], cx
197
        mov     [es:BOOT_IDE_BASE_ADDR], cx
198
.nopci:
198
.nopci:
199
; \end{Mario79}
199
; \end{Mario79}
Line 200... Line 200...
200
 
200
 
201
        mov     al, 0xf6        ; Ñáðîñ êëàâèàòóðû, ðàçðåøèòü ñêàíèðîâàíèå
201
        mov     al, 0xf6        ; Ñáðîñ êëàâèàòóðû, ðàçðåøèòü ñêàíèðîâàíèå
Line 224... Line 224...
224
        in      al, 64h
224
        in      al, 64h
225
        test    al, 2
225
        test    al, 2
226
        loopnz  @b
226
        loopnz  @b
227
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
227
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
228
; --------------- APM ---------------------
228
; --------------- APM ---------------------
229
        and     word [es:0x9044], 0     ; ver = 0.0 (APM not found)
229
        and     word [es:BOOT_APM_VERSION], 0     ; ver = 0.0 (APM not found)
230
        mov     ax, 0x5300
230
        mov     ax, 0x5300
231
        xor     bx, bx
231
        xor     bx, bx
232
        int     0x15
232
        int     0x15
233
        jc      apm_end                 ; APM not found
233
        jc      apm_end                 ; APM not found
234
        test    cx, 2
234
        test    cx, 2
235
        jz      apm_end                 ; APM 32-bit protected-mode interface not supported
235
        jz      apm_end                 ; APM 32-bit protected-mode interface not supported
236
        mov     [es:0x9044], ax         ; Save APM Version
236
        mov     [es:BOOT_APM_VERSION], ax         ; Save APM Version
237
        mov     [es:0x9046], cx         ; Save APM flags
237
        mov     [es:BOOT_APM_FLAGS], cx         ; Save APM flags
Line 238... Line 238...
238
 
238
 
239
        ; Write APM ver ----
239
        ; Write APM ver ----
240
        and     ax, 0xf0f
240
        and     ax, 0xf0f
241
        add     ax, '00'
241
        add     ax, '00'
Line 251... Line 251...
251
        int     0x15
251
        int     0x15
252
        mov     ax, 0x5303              ; Connect 32 bit mode interface
252
        mov     ax, 0x5303              ; Connect 32 bit mode interface
253
        xor     bx, bx
253
        xor     bx, bx
254
        int     0x15
254
        int     0x15
Line 255... Line 255...
255
 
255
 
256
        mov     [es:0x9040], ebx
256
        mov     [es:BOOT_APM_ENTRY], ebx
257
        mov     [es:0x9050], ax
257
        mov     [es:BOOT_APM_CODE_32], ax
258
        mov     [es:0x9052], cx
258
        mov     [es:BOOT_APM_CODE_16], cx
Line 259... Line 259...
259
        mov     [es:0x9054], dx
259
        mov     [es:BOOT_APM_DATA_16], dx
260
 
260
 
Line 261... Line 261...
261
apm_end:
261
apm_end:
Line 668... Line 668...
668
 
668
 
Line 669... Line 669...
669
        call    set_vmode
669
        call    set_vmode
670
 
670
 
671
; GRAPHICS ACCELERATION
671
; GRAPHICS ACCELERATION
Line 672... Line 672...
672
; force yes
672
; force yes
Line 673... Line 673...
673
        mov     [es:0x901C], byte 1
673
        mov     [es:BOOT_MTRR], byte 1
674
 
674
 
Line 675... Line 675...
675
; DMA ACCESS TO HD
675
; DMA ACCESS TO HD
Line 676... Line 676...
676
 
676
 
677
        mov     al, [preboot_dma]
677
        mov     al, [preboot_dma]
678
        mov     [es:0x901F], al
-
 
Line 679... Line 678...
679
 
678
        mov     [es:BOOT_DMA], al
Line 680... Line 679...
680
; VRR_M USE
679
 
681
 
680
; VRR_M USE
Line 696... Line 695...
696
 
695
 
697
;;;;;;;;;;; set videomode
696
;;;;;;;;;;; set videomode
698
        xor     ax, ax
697
        xor     ax, ax
Line 699... Line 698...
699
        mov     es, ax
698
        mov     es, ax
700
 
699
 
701
        mov     ax, [es:0x9008]         ; vga & 320x200
700
        mov     ax, [es:BOOT_VESA_MODE]         ; vga & 320x200
702
        mov     bx, ax
701
        mov     bx, ax
703
        cmp     ax, 0x13
702
        cmp     ax, 0x13
704
        je      setgr
703
        je      setgr