* kernel.asm: 18.1 is now safe (correction of rev. 748)

* vesa20.inc: comments were correct! Restored (correction of rev. 753)
* fasm from last AZ

git-svn-id: svn://kolibrios.org@755 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Evgeny Grechnikov (Diamond) 2008-02-23 10:16:37 +00:00
parent 1ab9baa0a6
commit a85d73c061
4 changed files with 29 additions and 20 deletions

View File

@ -2029,7 +2029,7 @@ sys_end:
iglobal iglobal
align 4 align 4
sys_system_table: sys_system_table:
dd 0 ; 1 = system shutdown dd exit_for_anyone ; 1 = obsolete
dd sysfn_terminate ; 2 = terminate thread dd sysfn_terminate ; 2 = terminate thread
dd sysfn_activate ; 3 = activate window dd sysfn_activate ; 3 = activate window
dd sysfn_getidletime ; 4 = get idle time dd sysfn_getidletime ; 4 = get idle time

View File

@ -864,7 +864,7 @@ vesa20_drawbackground_stretch:
call [disable_mouse] call [disable_mouse]
pushad pushad
; Helper variables ; Helper variables
; calculate 2^32*(BgrDataWidth-1) mod (Screen_Max_X-1) ; calculate 2^32*(BgrDataWidth-1) mod (ScreenWidth-1)
mov eax, [BgrDataWidth] mov eax, [BgrDataWidth]
dec eax dec eax
xor edx, edx xor edx, edx
@ -908,7 +908,7 @@ vesa20_drawbackground_stretch:
mov eax, ebx mov eax, ebx
imul ebx, dword [esp+12] imul ebx, dword [esp+12]
mul dword [esp+8] mul dword [esp+8]
add edx, ebx ; edx:eax = y * 2^32*(BgrDataHeight-1)/(Screen_Max_Y-1) add edx, ebx ; edx:eax = y * 2^32*(BgrDataHeight-1)/(ScreenHeight-1)
mov esi, edx mov esi, edx
imul esi, [BgrDataWidth] imul esi, [BgrDataWidth]
push edx push edx
@ -919,7 +919,7 @@ vesa20_drawbackground_stretch:
mov eax, [esp+12] mov eax, [esp+12]
mul dword [esp+28] mul dword [esp+28]
add [esp], edx add [esp], edx
pop edx ; edx:eax = x * 2^32*(BgrDataWidth-1)/(Screen_Max_X-1) pop edx ; edx:eax = x * 2^32*(BgrDataWidth-1)/(ScreenWidth-1)
add esi, edx add esi, edx
lea esi, [esi*3] lea esi, [esi*3]
add esi, [img_background] add esi, [img_background]
@ -957,13 +957,13 @@ sdp3:
; esi = offset in current line, edi -> output ; esi = offset in current line, edi -> output
; ebp = offset in WinMapAddress ; ebp = offset in WinMapAddress
; dword [esp] = offset in bgr data ; dword [esp] = offset in bgr data
; qword [esp+4] = x * 2^32 * (BgrDataWidth-1) / (Screen_Max_X-1) ; qword [esp+4] = x * 2^32 * (BgrDataWidth-1) / (ScreenWidth-1)
; qword [esp+12] = y * 2^32 * (BgrDataHeight-1) / (Screen_Max_Y-1) ; qword [esp+12] = y * 2^32 * (BgrDataHeight-1) / (ScreenHeight-1)
; dword [esp+20] = x ; dword [esp+20] = x
; dword [esp+24] = y ; dword [esp+24] = y
; precalculated constants: ; precalculated constants:
; qword [esp+28] = 2^32*(BgrDataHeight-1)/(Screen_Max_Y-1) ; qword [esp+28] = 2^32*(BgrDataHeight-1)/(ScreenHeight-1)
; qword [esp+36] = 2^32*(BgrDataWidth-1)/(Screen_Max_X-1) ; qword [esp+36] = 2^32*(BgrDataWidth-1)/(ScreenWidth-1)
sdp3a: sdp3a:
cmp [ebp+WinMapAddress], byte 1 cmp [ebp+WinMapAddress], byte 1
jnz snbgp jnz snbgp

View File

@ -43,6 +43,11 @@ START: ; Start of execution
mov ecx, (fileinfos_end-fileinfos)/4 mov ecx, (fileinfos_end-fileinfos)/4
or eax, -1 or eax, -1
rep stosd rep stosd
push 68
pop eax
push 11
pop ebx
mcall
cmp [params],0 cmp [params],0
jz red jz red
@ -586,6 +591,7 @@ program_base dd ?
buffer_address dd ? buffer_address dd ?
memory_setting dd ? memory_setting dd ?
start_time dd ? start_time dd ?
memblock dd ?
predefinitions rb 1000h predefinitions rb 1000h

View File

@ -59,26 +59,29 @@ filepos dd 0x0
; ~5/8 - main memory ; ~5/8 - main memory
init_memory: init_memory:
mcall 18, 16 mcall 18, 16
cmp eax, 0xFFFFFFFF shr 9 cmp ecx, 0x38000000 shr 9
jbe @f jbe @f
mov eax, 0xFFFFFFFF shr 9 mov ecx, 0x38000000 shr 9
@@: @@:
shl eax, 9 shl ecx, 9
lea ecx, [eax+stacktop] mcall 68, 12
mcall 64, 1 mov [memory_start], eax
mov [memory_start], stacktop mov [memblock], eax
mov [additional_memory_end], ecx push eax
sub ecx, stacktop add eax, ecx
mov [additional_memory_end], eax
pop eax
shr ecx, 3 shr ecx, 3
lea ecx, [ecx*5+stacktop] add eax, ecx
mov [memory_end],ecx lea eax, [ecx*4+eax]
mov [additional_memory],ecx mov [memory_end],eax
mov [additional_memory],eax
ret ret
exit_program: exit_program:
cmp [_mode],NORMAL_MODE cmp [_mode],NORMAL_MODE
jne @f jne @f
mcall 64, 1, stacktop mcall 68, 13, [memblock]
jmp still jmp still
@@: @@:
or eax,-1 or eax,-1