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