* 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
align 4
sys_system_table:
dd 0 ; 1 = system shutdown
dd exit_for_anyone ; 1 = obsolete
dd sysfn_terminate ; 2 = terminate thread
dd sysfn_activate ; 3 = activate window
dd sysfn_getidletime ; 4 = get idle time

View File

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

View File

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

View File

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