merged trunk

git-svn-id: svn://kolibrios.org@438 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge) 2007-03-29 11:57:39 +00:00
parent 54dc123015
commit f72fabb279
11 changed files with 198 additions and 230 deletions

View File

@ -1,10 +1,14 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$Revision$
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;;
;; ;;
;; RAMDISK functions ;;
;; (C) 2004 Ville Turjanmaa, License: GPL ;;
;; Addings by M.Lisovin ;;
;; LFN support by diamond ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; calculate fat chain
@ -1873,6 +1877,9 @@ fs_RamdiskRewrite:
mov byte [edi-32+11], 10h
mov eax, [esp+16+8]
mov word [edi-32+26], ax
xor eax, eax
mov ecx, (512-32*2)/4
rep stosd
pop edi edi ecx edx
add esp, 20
popad

View File

@ -1,11 +1,18 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; BOOTCODE.INC ;;
;; ;;
;; KolibriOS 16-bit loader, ;;
;; based on bootcode for MenuetOS ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$Revision: 437 $
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;;
;; Copyright (C) MenuetOS 2000-2004 Ville Mikael Turjanmaa ;;
;; Distributed under terms of the GNU General Public License ;;
;; ;;
;; BOOTCODE.INC ;;
;; ;;
;; KolibriOS 16-bit loader, ;;
;; based on bootcode for MenuetOS ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;==========================================================================
;
@ -126,11 +133,11 @@ start_of_code:
if lang eq ru
; Load & set russian VGA font (RU.INC)
mov bp, RU_FNT1 ; RU_FNT1 - First part
mov bx,1000h ; 768 bytes
mov cx,30h ; 48 symbols
mov dx,80h ; 128 - position of first symbol
mov bx,1000h ; 768 bytes
mov cx,30h ; 48 symbols
mov dx,80h ; 128 - position of first symbol
mov ax,1100h
int 10h
int 10h
mov bp,RU_FNT2 ; RU_FNT2 -Second part
mov bx,1000h ; 512 bytes
@ -289,9 +296,7 @@ wait_loop: ; variant 2
mov [si + 5], ah
mov [si + 7], al
_setcursor 0, 3
call printplain
_setcursor d80x25_top_num,0
; ------------------
mov ax, 0x5304 ; Disconnect interface
@ -310,11 +315,13 @@ wait_loop: ; variant 2
mov [es:0x9054], dx
apm_end:
_setcursor d80x25_top_num, 0
; -----------------------------------------
; DISPLAY VESA INFORMATION
push 0
pop es
push 0
pop es
mov ax,0x4f00
mov di,0xa000
int 0x10
@ -549,9 +556,10 @@ virtual at novesa
.bSettingsChanged db ?
.timer dd ?
end virtual
org $+0x10000
.loader_block dd -1
org $-0x10000
.gettime:
mov ah, 0
int 1Ah
xchg ax, cx
@ -992,18 +1000,16 @@ sayerr_floppy:
; readdone:
; pop ax
mov si,backspace2
call printplain
mov si,okt
call printplain
no_sys_on_floppy:
no_sys_on_floppy:
xor ax, ax ; reset drive
xor dx, dx
int 0x13
mov dx,0x3f2 ; floppy motor off
mov al,0
out dx,al
mov dx,0x3f2 ; floppy motor off
mov al,0
out dx,al
; SET GRAPHICS
@ -1023,7 +1029,6 @@ setgr:
test ah,ah
mov si, fatalsel
jnz sayerr
; set mode 0x12 graphics registers:
cmp bx,0x12
jne gmok2

View File

@ -1,49 +1,10 @@
$Revision: 437 $
;======================================================================
;
; BOOT DATA
;
;======================================================================
macro line_full_top {
db 201
times 78 db 205
db 187
}
macro line_full_bottom {
db 200
times 78 db 205
db 188
}
macro line_half {
db 186,' '
times 76 db 0xc4
db ' ',186
}
macro line_space {
db 186
times 78 db 32
db 186
}
d80x25_top:
line_full_top
space_msg: line_space
verstr:
; line_space
; version string
db 186,32
repeat 78
load a byte from version+%-1
if a = 13
break
end if
db a
end repeat
repeat 78 - ($-verstr)
db ' '
end repeat
db 32,186
line_half
d80x25_top_num = 4
d80x25_bottom:
db 186,' KolibriOS based on MenuetOS and comes with ABSOLUTELY '
db 'NO WARRANTY ',186

View File

@ -1,49 +1,10 @@
$Revision: 437 $
;======================================================================
;
; BOOT DATA
;
;======================================================================
macro line_full_top {
db 201
times 78 db 205
db 187
}
macro line_full_bottom {
db 200
times 78 db 205
db 188
}
macro line_half {
db 186,' '
times 76 db 0xc4
db ' ',186
}
macro line_space {
db 186
times 78 db 32
db 186
}
d80x25_top:
line_full_top
space_msg: line_space
verstr:
; line_space
; version string
db 186,32
repeat 78
load a byte from version+%-1
if a = 13
break
end if
db a
end repeat
repeat 78 - ($-verstr)
db ' '
end repeat
db 32,186
line_half
d80x25_top_num = 4
d80x25_bottom:
db 186,' KolibriOS based on MenuetOS and comes with ABSOLUTELY '
db 'NO WARRANTY ',186

View File

@ -1,49 +1,10 @@
$Revision: 437 $
;======================================================================
;
; BOOT DATA
;
;======================================================================
macro line_full_top {
db 201
times 78 db 205
db 187
}
macro line_full_bottom {
db 200
times 78 db 205
db 188
}
macro line_half {
db 186,' '
times 76 db 0xc4
db ' ',186
}
macro line_space {
db 186
times 78 db 32
db 186
}
d80x25_top:
line_full_top
space_msg: line_space
verstr:
; line_space
; version string
db 186,32
repeat 78
load a byte from version+%-1
if a = 13
break
end if
db a
end repeat
repeat 78 - ($-verstr)
db ' '
end repeat
db 32,186
line_half
d80x25_top_num = 4
d80x25_bottom:
; db 186,' KolibriOS based on MenuetOS and comes with ABSOLUTELY '
; db 'NO WARRANTY ',186

View File

@ -1,49 +1,10 @@
$Revision: 437 $
;======================================================================
;
; BOOT DATA
;
;======================================================================
macro line_full_top {
db 201
times 78 db 205
db 187
}
macro line_full_bottom {
db 200
times 78 db 205
db 188
}
macro line_half {
db 186,' '
times 76 db 0xc4
db ' ',186
}
macro line_space {
db 186
times 78 db 32
db 186
}
d80x25_top:
line_full_top
space_msg: line_space
verstr:
; line_space
; version string
db 186,32
repeat 78
load a byte from version+%-1
if a = 13
break
end if
db a
end repeat
repeat 78 - ($-verstr)
db ' '
end repeat
db 32,186
line_half
d80x25_top_num = 4
d80x25_bottom:
db 186,' Kolibri OS ®á­®¢ ­  ­  Menuet OS ¨ ­¥ ¯à¥¤®áâ ¢«ï¥â '
db '­¨ª ª¨å £ àa­â¨©. ',186

View File

@ -0,0 +1,52 @@
; boot data: common strings (for all languages)
macro line_full_top {
db 201
times 78 db 205
db 187
}
macro line_full_bottom {
db 200
times 78 db 205
db 188
}
macro line_half {
db 186,' '
times 76 db 0xc4
db ' ',186
}
macro line_space {
db 186
times 78 db 32
db 186
}
d80x25_top:
line_full_top
cur_line_pos = 75
store byte ' ' at d80x25_top+cur_line_pos+1
rev_var = __REV__
while rev_var > 0
store byte rev_var mod 10 + '0' at d80x25_top+cur_line_pos
cur_line_pos = cur_line_pos - 1
rev_var = rev_var / 10
end while
store byte ' ' at d80x25_top+cur_line_pos
store dword ' SVN' at d80x25_top+cur_line_pos-4
space_msg: line_space
verstr:
; line_space
; version string
db 186,32
repeat 78
load a byte from version+%-1
if a = 13
break
end if
db a
end repeat
repeat 78 - ($-verstr)
db ' '
end repeat
db 32,186
line_half
d80x25_top_num = 4

View File

@ -839,8 +839,6 @@ proc new_sys_threads
rep stosd ;clean extended information about new thread
mov esi,ebx
mov edi,edx
mov byte [edi], '@'
inc edi
mov ecx,11
rep movsb ;copy process name
@ -1018,7 +1016,7 @@ proc set_app_params stdcall,slot:dword, params:dword,\
mov eax, [esi+0x08] ;app_eip
mov [ebx+REG_EIP], eax ;app_entry
mov [ebx+REG_CS], dword app_code
mov [ebx+REG_EFLAGS], dword 0x1202
mov [ebx+REG_EFLAGS], dword 0x3202
mov eax, [esi+0x0C] ;app_esp
mov [ebx+REG_APP_ESP], eax ;app_stack

View File

@ -52,7 +52,9 @@
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; $Revision$
include 'macros.inc'
$Revision$
include "proc32.inc"
include "kglobals.inc"
@ -107,6 +109,7 @@ use16
version db 'Kolibri OS version 0.6.5.0 ',13,10,13,10,0
include "boot/bootstr.inc" ; language-independent boot messages
include "boot/preboot.inc"
if lang eq en
@ -5034,6 +5037,8 @@ yes_shutdown_param:
include "data32.inc"
__REV__ = __REV
uglobals_size = $ - endofcode
diff16 "end of kernel code",0,$

View File

@ -1,40 +0,0 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; KERNEL16.INC ;;
;; ;;
;; Included 16 bit kernel files for MenuetOS ;;
;; ;;
;; This file is kept separate as it will be easier to ;;
;; maintain and compile with an automated SETUP program ;;
;; in the future. ;;
;; ;;
;; Copyright Ville Turjanmaa, see file COPYING for details. ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;% +include
;!!!
if lang eq en
include "boot/booteng.inc" ; english system boot messages
else if lang eq ru
include "boot/bootru.inc" ; russian system boot messages
else if lang eq et
include "boot/bootet.inc" ; estonian system boot messages
else
include "boot/bootge.inc" ; german system boot messages
;!!!
end if
if lang eq et
include "boot/et.inc" ; Estonian font
else
include "boot/ru.inc" ; Russian font
end if
org $-0x10000
include "boot/bootcode.inc" ; 16 bit system boot code
include "bus/pci/pci16.inc"
;% -include

View File

@ -0,0 +1,97 @@
__REV = 0
macro $Revision a {
match =: Num =$,a \{
if __REV < Num
__REV = Num
end if
\}
}
$Revision: 426 $
; structure definition helper
macro struct name, [arg]
{
common
name@struct equ name
struc name arg {
}
macro struct_helper name
{
match xname,name
\{
virtual at 0
xname xname
sizeof.#xname = $ - xname
name equ sizeof.#xname
end virtual
\}
}
ends fix } struct_helper name@struct
;// mike.dld, 2006-29-01 [
; macros definition
macro diff16 title,l1,l2
{
local s,d
s = l2-l1
display title,': 0x'
repeat 8
d = 48 + s shr ((8-%) shl 2) and $0F
if d > 57
d = d + 65-57-1
end if
display d
end repeat
display 13,10
}
macro diff10 title,l1,l2
{
local s,d,z,m
s = l2-l1
z = 0
m = 1000000000
display title,': '
repeat 10
d = '0' + s / m
s = s - (s/m)*m
m = m / 10
if d <> '0'
z = 1
end if
if z <> 0
display d
end if
end repeat
display 13,10
}
; \begin{diamond}[29.09.2006]
; may be useful for kernel debugging
; example 1:
; dbgstr 'Hello, World!'
; example 2:
; dbgstr 'Hello, World!', save_flags
macro dbgstr string*, f
{
local a
iglobal_nested
a db 'K : ',string,13,10,0
endg_nested
if ~ f eq
pushfd
end if
push esi
mov esi, a
call sys_msg_board_str
pop esi
if ~ f eq
popfd
end if
}
; \end{diamond}[29.09.2006]