2010-06-25 18:47:51 +02:00
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
;; ;;
|
2011-08-14 11:08:02 +02:00
|
|
|
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;;
|
2010-06-25 18:47:51 +02:00
|
|
|
;; Copyright (C) MenuetOS 2000-2004 Ville Mikael Turjanmaa ;;
|
|
|
|
;; Distributed under terms of the GNU General Public License ;;
|
|
|
|
;; ;;
|
|
|
|
;; BOOTCODE.INC ;;
|
|
|
|
;; ;;
|
2011-08-14 11:08:02 +02:00
|
|
|
;; Kolibri-A auxiliary 16-bit code, ;;
|
|
|
|
;; based on bootcode for KolibriOS ;;
|
2010-06-25 18:47:51 +02:00
|
|
|
;; ;;
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
|
|
|
$Revision$
|
|
|
|
|
2013-01-15 00:19:38 +01:00
|
|
|
boot_dev db 0 ; 0=floppy, 1=hd
|
2010-06-25 18:47:51 +02:00
|
|
|
|
|
|
|
|
|
|
|
;=========================================================================
|
|
|
|
;
|
|
|
|
; 16 BIT CODE
|
|
|
|
;
|
|
|
|
;=========================================================================
|
|
|
|
|
2013-01-15 00:19:38 +01:00
|
|
|
diff16 "start_of_code: ",0,$
|
2010-06-25 18:47:51 +02:00
|
|
|
|
|
|
|
start_of_code:
|
2010-11-01 12:30:29 +01:00
|
|
|
cld
|
2010-06-25 18:47:51 +02:00
|
|
|
|
|
|
|
; set up stack
|
2010-11-01 12:30:29 +01:00
|
|
|
mov ax, 3000h
|
|
|
|
mov ss, ax
|
|
|
|
mov sp, 0EC00h
|
2010-06-25 18:47:51 +02:00
|
|
|
; set up segment registers
|
2010-11-01 12:30:29 +01:00
|
|
|
push cs
|
|
|
|
pop ds
|
|
|
|
push cs
|
|
|
|
pop es
|
2010-06-25 18:47:51 +02:00
|
|
|
|
|
|
|
|
2010-11-16 00:04:33 +01:00
|
|
|
cpugood:
|
2013-01-22 23:47:49 +01:00
|
|
|
xor ax, ax
|
2013-01-17 01:08:55 +01:00
|
|
|
push ax
|
2010-11-01 12:30:29 +01:00
|
|
|
popf
|
|
|
|
sti
|
2010-06-25 18:47:51 +02:00
|
|
|
|
|
|
|
; set up esp
|
2010-11-01 12:30:29 +01:00
|
|
|
movzx esp, sp
|
2010-06-25 18:47:51 +02:00
|
|
|
|
2013-01-17 01:08:55 +01:00
|
|
|
push ax
|
2010-11-01 12:30:29 +01:00
|
|
|
pop es
|
2010-06-25 18:47:51 +02:00
|
|
|
|
|
|
|
cfgmanager:
|
|
|
|
|
|
|
|
|
2013-01-17 01:08:55 +01:00
|
|
|
; DMA ACCESS TO HD
|
2010-06-25 18:47:51 +02:00
|
|
|
|
2013-01-22 23:47:49 +01:00
|
|
|
; mov al, 1
|
2010-06-25 18:47:51 +02:00
|
|
|
|
|
|
|
; GRAPHICS ACCELERATION
|
|
|
|
; force yes
|
2013-01-22 23:47:49 +01:00
|
|
|
; mov [es:0x901C], al
|
2010-06-25 18:47:51 +02:00
|
|
|
|
|
|
|
|
|
|
|
; BOOT DEVICE
|
|
|
|
|
2013-01-17 01:08:55 +01:00
|
|
|
xor ax, ax
|
2010-11-01 12:30:29 +01:00
|
|
|
mov [boot_dev], al
|
2013-01-22 23:47:49 +01:00
|
|
|
; mov es, ax
|
2010-06-25 18:47:51 +02:00
|
|
|
|
|
|
|
; SET GRAPHICS
|
|
|
|
|
2013-01-11 18:03:03 +01:00
|
|
|
mov ax, 0xA000 ; AtomBIOS Fn00
|
|
|
|
mov cx, 0x550A ; 1024x768, 32bpp, ARGB8888
|
2010-06-25 18:47:51 +02:00
|
|
|
setgr:
|
2010-11-01 12:30:29 +01:00
|
|
|
int 0x10
|
|
|
|
test ah, ah
|
2010-11-16 00:04:33 +01:00
|
|
|
jnz $
|
2013-01-11 18:03:03 +01:00
|
|
|
mov ax, 0xA006 ; AtomBIOS Fn06
|
|
|
|
int 0x10
|
|
|
|
mov [es:0x9018], ebx ; LFB
|
|
|
|
|
2010-06-25 18:47:51 +02:00
|
|
|
gmok2:
|
2010-11-01 12:30:29 +01:00
|
|
|
push ds
|
|
|
|
pop es
|